[libvirt-users] quickest way to stop VM

Hello Which is the quickest way to stop KVM guest VM. I am not interested in saving anything; I just have to make sure that VM apps are ended quickly. i) virsh shutdown ii) virsh suspend iii) virsh destroy
From little descriptions I have, looks like destroy is the fastest way and acts like a removal of a power plug. Pls let me know.
Thanks
Harish

On 08/13/2012 04:05 PM, Harish Patil wrote:
Hello Which is the quickest way to stop KVM guest VM. I am not interested in saving anything; I just have to make sure that VM apps are ended quickly. i) virsh shutdown
Depends on the guest honoring your request, which means it might not succeed at all.
ii) virsh suspend
Doesn't actually stop the guest, just pauses it, so the KVM process is still around.
iii) virsh destroy
Bingo. Kills the qemu process, and thus instantly frees the KVM resources. Use with care if you plan to restart things later (it is the same as yanking a power cord), but for a one-shot usage, this is what you want.
From little descriptions I have, looks like destroy is the fastest way and acts like a removal of a power plug. Pls let me know.
You got it. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Thx lot, Eric Sent from my iPhone4S On Aug 13, 2012, at 3:21 PM, Eric Blake <eblake@redhat.com> wrote:
On 08/13/2012 04:05 PM, Harish Patil wrote:
Hello Which is the quickest way to stop KVM guest VM. I am not interested in saving anything; I just have to make sure that VM apps are ended quickly. i) virsh shutdown
Depends on the guest honoring your request, which means it might not succeed at all.
ii) virsh suspend
Doesn't actually stop the guest, just pauses it, so the KVM process is still around.
iii) virsh destroy
Bingo. Kills the qemu process, and thus instantly frees the KVM resources. Use with care if you plan to restart things later (it is the same as yanking a power cord), but for a one-shot usage, this is what you want.
From little descriptions I have, looks like destroy is the fastest way and acts like a removal of a power plug. Pls let me know.
You got it.
-- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 08/13/2012 03:05 PM, Harish Patil wrote:
Which is the quickest way to stop KVM guest VM. I am not interested in saving anything; I just have to make sure that VM apps are ended quickly. i) virsh shutdown ii) virsh suspend iii) virsh destroy
From little descriptions I have, looks like destroy is the fastest way and acts like a removal of a power plug. Yes, destroy.
participants (3)
-
Eric Blake
-
Harish Patil
-
Joe Julian