Page 1 of 2

time in OpenVMS X86-64

Posted: Fri Jun 02, 2023 4:37 am
by joukj
Hi all,

I run X86-64 using Qemu/KVM on a Fedora-linux system. Every time I reboot the machine the time is set to UTC (although I configured it as CET (Europe/Amsterdam). It is logical because the internal clock of Fedora runs UTC (which is in Fedora translated to CET). Qemu just picks up UTC.
It is annoying to set the time correct every time by hand. How is this to be solved?

regards
Jouk

Re: time in OpenVMS X86-64

Posted: Fri Jun 02, 2023 8:58 am
by hb
There is probably a

Code: Select all

<clock offset='utc'>
in your xml file. I changed that to

Code: Select all

<clock offset='timezone' timezone='Europe/Berlin'>
and that works for me. You probably want to edit the xml file with

Code: Select all

virsh edit <your-domain>

Re: time in OpenVMS X86-64

Posted: Sat Jun 03, 2023 2:28 pm
by martin
I checked that on my machine (AlmaLinux 8.8, QEMU/KVM) and it was also showing GMT instead of BST. The fix above works beautifully, many thanks.

Re: time in OpenVMS X86-64

Posted: Mon Jun 05, 2023 5:35 am
by joukj
virsh does not work for me. Seems to find no domains. I created the virtual macine using "Virtual Machine Manager". However I located the xml file in /etc/libvirt/qemu. I made the change and now the system time is CET.

Re: time in OpenVMS X86-64

Posted: Mon Jun 05, 2023 7:32 am
by martin
joukj wrote:
Mon Jun 05, 2023 5:35 am
virsh does not work for me. Seems to find no domains. I created the virtual macine using "Virtual Machine Manager". However I located the xml file in /etc/libvirt/qemu. I made the change and now the system time is CET.
Then there may be something odd in your setup. I created my VMS machine via VMM though I usually launch it via cockpit. To edit the XML file I used:

Code: Select all

# virsh edit gemini
as root and when I'd finished exited the editor as normal and it updated the XML. Probably the VM should be shut down during this and will only pick it up on a subsequent boot.

Just a thought, try

Code: Select all

# command -v virsh
/bin/virsh
When you say "Seems to find no domains" which command are you using? with all my VMs shut off:

Code: Select all

# virsh list
 Id   Name   State
--------------------
# virsh list --all
 Id   Name     State
-------------------------
 -    XXXXXX   shut off
 -    XXXXXX   shut off
 -    XXXXXX   shut off
 -    gemini    shut off
 -    XXXXXX   shut off
 -    XXXXXX   shut off
 -    XXXXXX   shut off

Re: time in OpenVMS X86-64

Posted: Mon Jun 05, 2023 8:06 am
by cct
Interesting. Just checked mine, and found the same.
@Martin - what did you out in for England?

I have:

<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>

Are you running NTP?

Chris

Re: time in OpenVMS X86-64

Posted: Mon Jun 05, 2023 9:30 am
by martin
I changed the UTC to timezone Europe/London:

Code: Select all

  <clock offset='timezone' timezone='Europe/London'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
I'm running chrony on the server (a sort of windows-like replacement for NTP that RH impose) but nothing specific on the VMS VM, unless it has been installed by default. Since this is a hobbyist set up I usually shut down at night, so any drift of the clock on the VM would only be over at most 16 hours.

Re: time in OpenVMS X86-64

Posted: Mon Jun 05, 2023 1:31 pm
by cct
Thanks, updated and will see how it goes.

I have set up NTP as a client linked to my router, which offers an NTP service, but as yet it is failing. Need to dig further

Sadly I now have to reboot the VMS guest after an uptime of nearly 33 days! I still remember when they had to extend the field in a show system to allows for > 999 days! We hit that a few times...

Chris

Re: time in OpenVMS X86-64

Posted: Mon Jun 05, 2023 2:55 pm
by martin
I remember getting close to that on an IRIX system (Silicon Graphics' version of UNIX). 998 days as I recall, then the sparkies insisted on some down time for tests of the HV ring. grr, two more days - if only!

Re: time in OpenVMS X86-64

Posted: Sun Jun 11, 2023 2:46 am
by gdwnldsksc
martin wrote:
Mon Jun 05, 2023 2:55 pm
I remember getting close to that on an IRIX system (Silicon Graphics' version of UNIX). 998 days as I recall, then the sparkies insisted on some down time for tests of the HV ring. grr, two more days - if only!
I had a UPS battery failure (I forgot to swap out on schedule....) take out a switch after 5 years of uptime. (Don't worry, totally secure, it was on the latest firmware version!) ;) Last screenshot I got before the power fluctuation that took it out... https://i.imgur.com/A2l6Q2S.png - strongest trendnet in the land...