解决了

关闭群集

  • 2021年8月11日
  • 5回复
  • 301意见

关闭群集的说明是在群集中的CVM中使用“sudo shutdown -p”,以关闭每一个,但命令仅在第一个CVM上工作。该命令会错误出现CVM的其余部分,因为它们无法达到关闭的第一个CVM。我错过了什么?

图标

最好的答案nupur.sakhalkar.2021年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集群需要疏散UVM,需要停止群集服务,然后您可以使用“CVM_Shutdown -P”关闭CVMS

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

是ESXi还是AHV?

如果ahv:

AHV - 关闭群集 - 维护或重新定位|Nutanix社区

如果ESXi:

关闭Nutanix群集运行VMware vSphere以进行维护或重定位

UserLevel 1.
徽章 +3

你好 @timothygray.你能发布你在这里看到的错误吗?

UserLevel 3.
徽章 +4

@timothygray.T.he 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 Shutdown命令来为其供电:

sudo shutdown -h现在

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

这里有一个重要的要点是,这里应该只应在群集处于停止状态时使用此命令(用户VMS已关闭),并且要同时关闭多个CVM。对于任何其他情况,始终使用“cvm_shutdown -p -p -p”命令关闭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