How the set the clock offset for VMs to localtime

asked 2018-12-11 22:46:01 -0500

ChrisOnTour gravatar image

Hello

We having the situation where our hypervisors time is in UTC +7. Since the standard clock offset in the xml is utc the linux guest hwclock is off by 7 hours. How to set <clock offset="localtime"> ?

[root@xxx ~]# date; hwclock
Wed Dec 12 11:43:28 +07 2018 Wed 12
Dec 2018 04:43:29 AM +07  -1.003255 seconds
edit retag flag offensive close merge delete

Comments

Easiest is /etc/localtime -> ../usr/share/zoneinfo/continet/country

tjoen gravatar imagetjoen ( 2018-12-12 05:00:01 -0500 )edit

Its already set

[root@xxx ~]# ll /etc/localtime
lrwxrwxrwx. 1 root root 34 Aug 31  2016 /etc/localtime -> ../usr/share/zoneinfo/Asia/Bangkok
ChrisOnTour gravatar imageChrisOnTour ( 2018-12-12 23:57:56 -0500 )edit

Yes, that is okay. hwclock best in UTC and that /etc/localtime shows the time if you type $ date. Or is it the hwclock you want as localtime like in Windows? That means configuring /var/lib/hwclock/adjtime because NTP only with UTC

tjoen gravatar imagetjoen ( 2018-12-13 07:25:31 -0500 )edit