Re: Why there is no "autostop"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/13/2014 02:33 PM, Peng Yu wrote:
> 
> OK. I see the following file. I just need to change
> "ON_SHUTDOWN=suspend" to "ON_SHUTDOWN=shutdown"? After I change it,
> then I can restart the host. How to know whether the guested have been
> gracefully shutdown or not? With "ON_SHUTDOWN=shutdown", the host will
> be shutdown only after all the guests are shutdown? Thanks.

The point of the libvirt-guests service is to make sure that guests are
in a safe state before allowing the host to shutdown.  Personally, I
like the ON_SHUTDOWN=suspend action, because when I next reboot, the
guests automatically pick up running where they last left off (modulo
incorrect times, depending on clock policy and guest tolerance to big
gaps in clock ticks); but yes, ON_SHUTDOWN=shutdown will hold the host
from shutting down until either all guests complete shutdown or until
timeouts expire (remember, graceful guest shutdown requires guest
cooperation, and not all guests cooperate).

> pengy@hydrogen:/usr$ grep ON_SHUTDOWN /usr/lib/libvirt/libvirt-guests.sh

No, that's not the file you want to edit.  Instead, figure out what file
gets sourced a few lines later.  On my Fedora machine,
/usr/libexec/libvirt-guests.sh contains:

sysconfdir="/etc"
...
test -f "$sysconfdir"/sysconfig/libvirt-guests &&
    . "$sysconfdir"/sysconfig/libvirt-guests

so my modifications would be to /etc/sysconfig/libvirt-guests.

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

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux