解决了

关闭集群

  • 2021年8月11日
  • 5个答复
  • 298意见

关闭集群的说明是在群集中的CVM上使用“ sudo shutdown -p now”以关闭每个群集,但是该命令仅在第一个CVM上使用。该命令将其余的CVM误解,因为它们无法达到关闭的第一个CVM。我想念什么吗?

图标

最好的答案nupur.Sakhalkar2021年8月17日,23:25

@TimothyGray<\/user-mention>\u00a0The commands -\u00a0\u201csudo shutdown -P now\u201d\u00a0 or\u00a0\u00a0\u201ccvm_shutdown -P now\u201d won\u2019t work when you are trying to shut down multiple CVMs in the cluster because these commands check which CVM is currently having the shutdown token so that only that CVM can be powered down on the cluster.<\/p>

When you run this command on the first CVM, the first CVM will successfully grab\u00a0the shutdown token (since none of the other CVMs are currently holding this token as all CVMs are UP) and then power down the CVM. However, when you try to run the same command again on other CVMs when the first CVM is already down, the first CVM won't release the shutdown token while it is offline and so the above two commands won\u2019t work in this case as you observed for your cluster as well.\u00a0<\/p>

Since your end goal is to shut down multiple CVMs on the cluster at the same time, hence in this case, the standard Linux shutdown command must be used on each CVM to power\u00a0it down:\u00a0<\/p>

sudo shutdown -h now<\/code><\/pre>

The above linux command won\u2019t check for any shutdown tokens and so multiple CVMs can be taken down at the same time.<\/p>

An important point to note here\u00a0is that this command should only be used on CVMs when the cluster is in stopped state (user VMs are powered down already) and you want to shutdown multiple CVMs at the same time. For any other case, always use\u00a0\u201ccvm_shutdown -P now\u201d command to shutdown the CVM.\u00a0<\/p>

Kindly let us know if the above command helped to resolve your issue.\u00a0<\/p>","className":"post__content__best_answer"}">

查看原件

该主题已关闭以供评论

5个答复

Userlevel 1
徽章 +3

@timothygray请让我知道该文档是否有帮助:关闭AHV群需要撤离UVMS,需要停止群集服务,然后您可以使用“ CVM_SHUTDOWN -P现在”关闭CVMS

我已经做了很多时间。仅使用该命令关闭第一个CVM。其他CVM不会关闭,因为它们无法达到关闭的第一个CVM。

是ESXI还是AHV?

如果AHV:

AHV-关闭集群 - 维护或重新安置|Nutanix社区

如果Esxi:

关闭运行VMware vSphere的Nutanix群集以进行维护或搬迁

Userlevel 1
徽章 +3

你好 @timothygray您可以在这里发布错误吗?

UserLevel 3
徽章 +4

@timothygraythe commands - “sudo shutdown -P now” or “cvm_shutdown -P now” won’t work when you are trying to shut down multiple CVMs in the cluster because these commands check which CVM is currently having the shutdown token so that only that CVM can be powered down on the cluster.

当您在第一个CVM上运行此命令时,第一个CVM将成功抓住关闭令牌(因为其他CVM当前都没有持有此令牌,因为所有CVM都已启动),然后启动CVM。However, when you try to run the same command again on other CVMs when the first CVM is already down, the first CVM won't release the shutdown token while it is offline and so the above two commands won’t work in this case as you observed for your cluster as well.

由于您的最终目标是同时关闭群集上的多个CVM,因此在这种情况下,必须在每个CVM上使用标准Linux关闭命令来供电:

sudo关闭-H现在

上面的Linux命令不会检查任何关闭令牌,因此可以同时删除多个CVM。

这里要注意的一个重要点是,仅当群集处于停止状态时(用户VM已经关闭电源),才应在CVM上使用此命令,并且您想同时关闭多个CVM。对于任何其他情况,请务必使用“ CVM_SHUTDOWN -P NOW”命令来关闭CVM。

请让我们知道上述命令是否有助于解决您的问题。

Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Baidu