XCP-NG:如何使用命令行关闭所有运行中的域(VM)
此 bash 脚本将使用命令行关闭 XCP-NG 主机上所有运行中的域(VM):
shutdown_xcpng_vms.sh
for vm in $(xe vm-list power-state=running --minimal | tr ',' ' '); do
xe vm-shutdown uuid=$vm
done之后,你通常想强制关闭仍在运行的所有域,可以使用:
force_shutdown_xcpng_vms.sh
for vm in $(xe vm-list power-state=running --minimal | tr ',' ' '); do
xe vm-shutdown uuid=$vm force=true
doneCheck out similar posts by category:
XCP-NG, Virtualization
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow