12

I'm trying to find the corresponding command to the buttons in virt-manager,

I read about virsh help domain and I found start, shutdown and reset etc. But the one for Force Off is missing.

Anyone know what that is?

2 Answers 2

13

virsh destroy, from 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
  • 3
    This is confusing to me (and probably the OP hence the question). Destroy seems like you're deleting the VM. Jul 15, 2022 at 17:40
  • @SridharSarnobat considering that the answer was accepted years ago, it probably wasn't confusing to the OP. if you think ripping out a power cord deletes a physical machine, then i can understand the confusion though.
    – llua
    Jul 21, 2022 at 2:25
0

virsh reset domain is what you need,

$ 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .