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