what does "virsh destroy" really ?

Martin Kletzander mkletzan at redhat.com
Tue Oct 6 08:35:35 UTC 2020


On Tue, Oct 06, 2020 at 10:22:03AM +0200, Michael Hierweck wrote:
>On 06.10.20 10:16, Daniel P. Berrangé wrote:
>>
>> You don't need to be so scared of virsh destroy. It is simply akin to pulling
>> out the power plug, and modern OS with a decent journaling filesystem will
>> recover from that quite reasonably. Sure you'll loose state of what's running,
>> but 99% of the time your guest will boot up again just fine.
>
>In case one of our (many) VMs crash we "destroy" it. We never experiencend any Problem you
>would not expect in case of physical server crashes.
>
>Over the last 10 years this happened more than 1000 times...
>

I was a bit too harsh when saying you should not use it.  Of course when the VM
is not running then destroy gets rid of the process.  In case it helps, you can
also set what libvirt is supposed to do when the VM crashes (at least visibly
for libvirt, not when something inside the guest crashes) using the <on_crash/>
element [0].

Have a nice day,
Martin

[0] https://libvirt.org/formatdomain.html#events-configuration

>Michael
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20201006/22f44192/attachment.sig>


More information about the libvirt-users mailing list