[libvirt] vm can not be shutdown

Eric Blake eblake at redhat.com
Mon Mar 4 21:27:11 UTC 2013


On 03/04/2013 01:21 AM, Peter Krempa wrote:
> On 03/04/13 03:51, yue wrote:
> 
> Hi,
> 
>> i use libvirt-python call shutdownFlags, but it can not assure VM can be
>> shutdown.
>> how to make shutdownFlags call work?   install  or configure something?
>> thanks
> 
> There are two ways how the shutdown API works:
> 
> 1) by default an ACPI shutdown event is emitted by qemu and the guests
> ACPI daemon is responsible for taking down the host. Some linux distros
> don't install it by default in minimal installations, so you may need to
> do this manually.
> 
> 2) In case you have a guest agent configured, you have to start the
> guest agent in the guest OS.

virDomainShutdown requires guest cooperation.  No matter WHAT you do on
the host side, you can have an uncooperative guest that refuses to shut
down gracefully.  When using the shutdown API, you MUST be prepared to
give up if the guest doesn't react in the time frame that you want, and
fall back on virDomainDestroy (which is guaranteed to work, because it
does not require guest cooperation).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130304/5b99f07c/attachment-0001.sig>


More information about the libvir-list mailing list