[CentOS] NTP and virtual guests

Mon May 28 20:39:23 UTC 2012
Stephen Harris <lists at spuddy.org>

On Mon, May 28, 2012 at 12:21:54PM -0400, James B. Byrne wrote:

> I cannot find anything in the logs that explain what is happening to
> me.  The evidence I have indicates that when the host kvm system is
> powered off and restarted then the guests do not restart.  This
> behaviour is at variance with a controlled shutdown wherein active
> guests are (usually) restarted when the host reboots. I infer from
> this observation that system scripts already handle this more or less
> correctly.

On a clean shutdown, the host will "suspend" running VMs and then "resume"
them at powerup.  In the event of an unclean shutdown then the VMs aren't
suspended (obviously) and only VMs marked as autostart will be started
at powerup.

> I suppose that I could just create an init script that read a custom
> status file and restated every domain that it found therein using
> virsh.  However, if such a beast already exists then I would rather
> not have to reinvent the wheel.

Just mark 'em as "autostart" in virt-manager or create symlinks in
/etc/libvirt/qemu/autostart to the xml in /etc/libvirt/qemu for the
guests you want autostarted.

-- 

rgds
Stephen