11

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?

daisy
  • 53,527
  • 78
  • 236
  • 383

2 Answers2

11

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.  
llua
  • 6,760
  • 24
  • 30
  • 2
    This is confusing to me (and probably the OP hence the question). Destroy seems like you're deleting the VM. – Sridhar Sarnobat Jul 15 '22 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 '22 at 02: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.

Coiby
  • 155
  • 6