[Nut-upsuser] Best way to shut down RH KVM/QEMU based VMs via NUT
fahnoe at fahnoetech.com
Sun Jun 11 15:45:48 UTC 2017
Thanks Ben & yes as you noted in your next message, I'm running linux
While off-topic as far as NUT is concerned, for the sake of completeness
and in case it may be of help to others, on RHEL/CentOS 7 there are two
areas involved with guest shutdown/reboot vs suspend/resume: systemd and
libvirt-guests. On host boot, systemd-machined starts first and starts
guests marked "autostart", libvirt-guests comes along later and either
resumes or reboots guests that were running when the host was shut down.
Regarding my guest time issue, I noticed that some of my guests were marked
autostart, and were thus being brought back up by machined and it was one
of these guests that wasn't waking up with a correct clock. A manual
restart of chronyd on that guest would get the time set correctly, but
that's not a solution. My theory is that machined and libvirt-guests have
different guest clock initialization mechanisms, so I have now disabled
autostart on all of my guests thus letting libvirt-guests handle the
suspend/resume & will monitor to ensure all guests have accurate time next
time a host reboots. I also set SYNC_TIME=1 in
/etc/sysconfig/libvirt-guests to cover my bases.
On Sun, Jun 11, 2017 at 9:25 AM, Ben <bkamen at benjammin.net> wrote:
> On 06/11/2017 07:00 AM, Larry Fahnoe wrote:
> > Hi Ben,
> > On RHEL/CentOS 7, libvirt-guests (which comes from libvirt-client) on
> the host controls the suspend vs. shutdown behavior of the guests. By
> default the guests suspend, but if you want them to shutdown, change the
> ON_SHUTDOWN setting in /etc/sysconfig/libvirt-guests. I don't have any
> Windows guests, but the linux guests work nicely with the default suspend.
> That said, I have only recently begun to see an issue with one of my
> CentOS7 guests being resumed with incorrect time--haven't gotten to the
> bottom of that one yet.
> Thank you.
> As for your time issue, I might be able to help there.
> As it already stands, KVM/QEMU (and linux) handles the hardware RTC time
> in UTC and Windows seems the like handling it in local time.
> When I build this Win10 VM, it always came up the timezone+/- DST off.
> I had to add a Windows registry setting to tell it the RTC was UTC and not
> > Windows Registry Editor Version 5.00
> > [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\
> > "RealTimeIsUniversal"=dword:00000001
> did you do this yet? (just wondering if it'll help if you haven't.)
Larry Fahnoe, Fahnoe Technology Consulting, fahnoe at FahnoeTech.com
Minneapolis, Minnesota www.FahnoeTech.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nut-upsuser