[libvirt-users] libvirt-guests and time sync on autostart vms

ıuoʎ yonjah at gmail.com
Mon Mar 20 03:28:30 UTC 2017

I have a host running a few guests all configured to autostart.
I'm also using libvirt-guests to suspend the guests when the host
restarts or shuts down
When the host comes back up I see a bunch of log messages  -
Resuming guest vm01 already active
Resuming guest vm02 already active

I guess this is because libvirt autostarts the guests when it starts
and before libvirt-guests has a chance
to start them.
I didn't think this is an issue until I noticed the time on the guests
is totally out of sync.
SYNC_TIME=1 is enabled in the conf file but this doesn't seem to work
I can see from the code at libvirt-guests.sh that the time sync
function will only run if the guest is started by libvirt-guests ans
will be skipped for guests that are already running

So I'm not sure if this is a bug in libvirt-guests.sh or if I'm doing
something wrong by using both libvirt-guests and autostart.
I assume libvirt-guests will always resume guests on proper reboot but
I'm think if there is any unexpected failure where guests weren't
properly suspended before boot I still want them to come backup when
the server boots


More information about the libvirt-users mailing list