virsh 中的哪些命令对应于 virt-manager 中的“强制关闭”按钮?

virsh 中的哪些命令对应于 virt-manager 中的“强制关闭”按钮?

我试图在 virt-manager 中找到与按钮相对应的命令,

我读到了相关内容virsh help domain,发现了启动、关闭和重置等。但是Force Off缺少了 。

有人知道那是什么吗?

答案1

virsh destroy, 从man virsh

Immediately terminate the domain domain.  
This doesn't give the domain OS any chance to react, 
and it's the equivalent of ripping the power cord out on a physical machine.  

答案2

virsh reset domain就是你需要的,

$ man virsh|grep "reset domain" -A5 -B4
   reset
       Syntax:

          reset domain

       Reset a domain immediately without any guest shutdown. reset emulates the power reset button on a machine, where all guest hardware sees the RST line set and reinitializes inter‐nal state.

       Note: Reset without any guest OS shutdown risks data loss.

相关内容