Set VM RTC date and time issue - Suse Enterpise 15 SP3 VM

mf1979

Member
Apr 24, 2020
19
0
6
East side of US
Hello,

I am trying to set specific date to vm and not getting date/time info from ntp or proxmox host.

It's Suse Enterprise 15 SP3.

I changed RTC start date and did not work. NTP service disabled in Suse settings.

I tried to change in VM SUSE date settings but whenever I reboot VM and it's date time info from Proxmox host

I tried hwclock --debug --systohc --localtime but still same issue

I found a useful " qemu-system-x86_64 [...] -rtc clock=vm,base=2010-12-03T01:02:00 "

But in Proxmox " qm " command it does not have " clock" option.

I don't want to change this settings on all VM systems just for specific one. RTC start date option worked on Redhat VM but not suse.

How can I set specific RTC time for SUSE 15 VM ? I don't want to make script in VM. I want to get proper solution from proxmox settings for specific host. I don't VM gets date/time info from proxmox host. VM should get date/time info from RTC start date parameter but it does not work for this VM.

Please help me.

Thank you
 
in vm options, there is a 'rtc startdate' option which corresponds to the '-rtc base' option in qemu
i just tested it here (with arch + no network) and it worked
 
I already changed that settings even at VM setting by GUI and VM configuration file in OS level with "startdate: 2021-10-27"

But it does not work. It works in Redhat but not Suse.
 
qemu-system-x86_64 has a command option with rtc clock to set "vm" means vm guest will only check setting as "base" given date. When you set "clock=vm" it does not get info from Proxmox host but I don't see any "qm" settings for "clock=vm" option.


qemu-system-x86_64 [...] -rtc clock=vm,base=2010-12-03T01:02:00
 
But it does not work. It works in Redhat but not Suse.
seems like a configuration issue in the guest?

qemu-system-x86_64 has a command option with rtc clock to set "vm" means vm guest will only check setting as "base" given date. When you set "clock=vm" it does not get info from Proxmox host but I don't see any "qm" settings for "clock=vm" option.
thats currently not directly possible, but you can use the 'args' parameter to add a generic qemu parameter to the vm, e.g.
Code:
qm set ID -args "-rtc clock=vm,base=2010-12-03T01:02:00"
also, you could open an enhancement request here: https://bugzilla.proxmox.com
 
I did run command and it's same result as i did for "rtc start date" option;

#date
Wed 12 Jan 2022 11:53:10 AM EST

# timedatectl
Local time: Wed 2022-01-12 11:53:21 EST
Universal time: Wed 2022-01-12 16:53:21 UTC
RTC time: Wed 2021-10-27 10:10:52
Time zone: America/New_York (EST, -0500)
System clock synchronized: no
NTP service: inactive
RTC in local TZ: no

As you see Local Time is as real time as like Proxmox host. But RTC time is what i want.

How can I set Local time as like RTC?

Thank you
 
so it seems it works, but your guest is not configured right. sorry i have no idea how to properly do that in suse. normally i would check that no ntp service is running (timesyncd, chrony, etc.) but you said you deactivated ntp already.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!