Wrong timezone in VMs: where the value for qubesdb-read /qubes-timezone comes from?

250 views
Skip to first unread message

Pablo Di Noto

unread,
Aug 31, 2016, 7:48:16 AM8/31/16
to qubes-users
Hello,

Somewhere along the update from 3.1 to 3.2rc1 I started to have all my VMs take UTC as their timezone.

dom0 has the correct "America/Argentina/Cordoba" timezone, but all VMs get incorrectly set to "Argentina/Cordoba", which does not exists thus leaving them at UTC.

I know may have manually set somehow the wrong timezone (without the required "America/" prefix) at install or update. Now all my templates get set to "Argentina/Cordoba", which is the value they get from "qubesdb-read /qubes-timezone" at every boot by qubes-sysinit.sh script.

I cannot figure out where that values comes from and how to fix it.

Thanks in advance,
///Pablo

Andrew David Wong

unread,
Aug 31, 2016, 8:26:42 AM8/31/16
to Pablo Di Noto, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
It might be worth trying to set the locale in your TemplateVM(s). For example,
these commands should work on fedora-23 (and some other distros):

To display your currently set locale:

$ locale

To set a locale:

# localectl set-locale <your_locale>

For a list of available locales:

$ localectl list-locales

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXxst9AAoJENtN07w5UDAw+0cP/RTPei1sTPFIryrOIfzn8HKE
rgi13ApkCAwD/Am7qfvrv39RHuNm1R5n/WA4qZzjgxGNV/vMaKbjgIQZeS5iqG76
WKIHy/1T66a0bvBs0A6IJ29dWtLzFguDeJTio7c/4pCrMdRFK5aMI0BlTJHssn/3
tsAGg/d4zlvTsCt9MoEeRjpIqp7EV9GTZV6+F1id1F8MEzNtYJ/Fk/LL9wyMF384
YWJxqvm/2HrzaIiMDnPepcD4BAPO6krPjfe8iFzJtfyPrKhS3wtXMqwJZ6Ed+keE
8qgtd9p4MWz4J7I+xXw/FCaB/aIWBUomSbtrKGYicGIC5o/Ghw7uzoopl7+TUvgy
6w1dBHpwYWEDqgmqxPCWKDl6KHyyV8pyM3KZ8ni5PtEcvbQxTAewun1WWvRNm+8u
9LRZYOqATWbJFkwlQ63OjRFgmYtlEZYvoY98pg2ul105FCsnmlFGyIbEJhyZOY/R
/AUJgJPU5bKMmYV6/mEolKYQcMsdzt+4WLpX1Q05iPHI/V8H357x0wA5gOxD/A6J
3DgCfl3auVbEWlCl5piWTON9D2gcETyNZQfDKSfflLXrBblIWwYe2WVrbfeRNEd3
LUWp0qmr792lvbezdUWf2Qk3gNZ4IRKBVtEyOjXFEqlHXOueu0WnOTqYQ2D4SBAp
LQEsDV4u3WwIliPdsrPT
=T+WS
-----END PGP SIGNATURE-----

Pablo Di Noto

unread,
Aug 31, 2016, 8:42:02 AM8/31/16
to qubes-users, pdi...@gmail.com
El miércoles, 31 de agosto de 2016, 12:26:42 (UTC), Andrew David Wong escribió:

> On 2016-08-31 04:48, Pablo Di Noto wrote:
> > Hello,
> >
> > Somewhere along the update from 3.1 to 3.2rc1 I started to have all my VMs
> > take UTC as their timezone.
> >
> > dom0 has the correct "America/Argentina/Cordoba" timezone, but all VMs get
> > incorrectly set to "Argentina/Cordoba", which does not exists thus leaving
> > them at UTC.
> >
> > I know may have manually set somehow the wrong timezone (without the
> > required "America/" prefix) at install or update. Now all my templates get
> > set to "Argentina/Cordoba", which is the value they get from "qubesdb-read
> > /qubes-timezone" at every boot by qubes-sysinit.sh script.
> >
> > I cannot figure out where that values comes from and how to fix it.
> >
> > Thanks in advance, ///Pablo
> >
>
> It might be worth trying to set the locale in your TemplateVM(s). For example,
> these commands should work on fedora-23 (and some other distros):
>
> To display your currently set locale:
>
> $ locale
>
> To set a locale:
>
> # localectl set-locale <your_locale>
>
> For a list of available locales:
>
> $ localectl list-locales
>

Thanks for the suggestion. In fact, something similar is what I use as workaround into the browsing VMs.

The drawback is that I have to set the correct timezone for each VM upon booting, each time, as the setting will be overriden at next boot by the init script.

Regards,
///Pablo

Andrew David Wong

unread,
Aug 31, 2016, 9:02:06 AM8/31/16
to Pablo Di Noto, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Two options:

1. Change the locale in the TemplateVM instead of the AppVM so that the
overriding value is the desired one.

2. Add the command to change to the desired locale to /rw/config/rc.local (in
the AppVM), then make that file executable (chmod +x). Every command in that
file is executed as root each time the AppVM is started.

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXxtU4AAoJENtN07w5UDAws1cP/ijJ6FvWPhyxYlHpmFCrc+5m
U8ZsZnvUz9Al5xzmeQsZPmTkQDEVZpisaoL6QTS40iaCOZMS4Mq9E6eofZj6mPb3
gk+tfvIYfdS0ND0N0cfW7blyt63k/L2FoLjjplzFGDcYQrYKjhARoi9QjcuCFVx3
QoCbJFibXG8WFs9ad22pUatVTrs0hyH2dFPXPXDkcjubxMJ6fAz2liN05bkrSbBN
Fe/SfZTbK8RZqomH4wlnmY8dG+ADMpFX2zYdq7VWY0qkrcZ35W8fCezAYc046aGx
wo8kHnaFixwh20myYXVPXIXB2E1nTTv12TqI80xcuRiyyONLRQsbgmSiHIAW92e6
Kp6KBjPcb3QGOZHPKFZUzb+PK/GBkvOcRqxCDM5YySS21Kd1LRCcSQR8zHgc8oXn
tb6dCUjn7llSdjDLVydVyeckk4lR/Idcq5Vf/91OQyc+mNX/PfrS+5q+aawTA/98
s7J0TkDXuR8S+d5pnCs2vzl50W5pAwvf8KVBv2SSMulmt0xfW9t3KnbLhW4uw69/
xejPoYK2t9CTSQGuM7a4mV98FZqK2Q6cioiTSAanv15tmGB1FN4Y5A/qrn1OaL3Z
YBmdYUn10mIY6wiMj4cMW2AEmuwRF8Ui1BxMDhluCD6HRxMSwSGerMBVgk3ZyxRt
Kn1y+HL0uN7qH4TR9E2g
=rAVS
-----END PGP SIGNATURE-----

Pablo Di Noto

unread,
Aug 31, 2016, 9:41:28 AM8/31/16
to qubes-users, pdi...@gmail.com
There is no difference setting it at the TemplateVM, as it is also overridden by the script there.

> 2. Add the command to change to the desired locale to /rw/config/rc.local (in
> the AppVM), then make that file executable (chmod +x). Every command in that
> file is executed as root each time the AppVM is started.

Thanks Andrew!

This works, but still makes you reset the timezone on each TemplateVM when traveling. Not a big deal. I will keep trying to find the root cause of this, albeit to understand the mechanics behind the scenes.

Regards,
///Pablo
Reply all
Reply to author
Forward
0 new messages