I'm looking at the <clock> libvirt parameters. Is there a way to set the guests clock to a specific time/date at virt startup? I'm trying to virtualize a system with pci passthrough for a hardware device that wants to always live in pre-2011. The license manager for the software/hardware has 31-bit overflow of time calculations. The current process on the physical machine is to power it on, use the bios to set the hardware date to Jan 1 2010, boot the system, use an RC script to ntp-set the date now that the hardware is up and running, and then everything works till next boot. We even have a nice rc script that will set the clock back to 2010 if you do a clean shutdown/reboot. I see I can set my clock sync to variable and specify a negative offset - is there a way to just say "always be jan 10 2010 when you power on"? Fred -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20220422/8e0d3b51/attachment.htm>
Can the admin please remove me from the mailing list? Regards, Deepti On Sat, Apr 23, 2022 at 12:24 AM Fred Clift <fred at clift.org> wrote:> I'm looking at the <clock> libvirt parameters. > > Is there a way to set the guests clock to a specific time/date at virt > startup? I'm trying to virtualize a system with pci passthrough for a > hardware device that wants to always live in pre-2011. The license manager > for the software/hardware has 31-bit overflow of time calculations. > > The current process on the physical machine is to power it on, use the > bios to set the hardware date to Jan 1 2010, boot the system, use an RC > script to ntp-set the date now that the hardware is up and running, and > then everything works till next boot. We even have a nice rc script that > will set the clock back to 2010 if you do a clean shutdown/reboot. > > I see I can set my clock sync to variable and specify a negative offset - > is there a way to just say "always be jan 10 2010 when you power on"? > > Fred >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20220423/99a5ace6/attachment.htm>
On Fri, Apr 22, 2022 at 12:54:35 -0600, Fred Clift wrote:> I'm looking at the <clock> libvirt parameters. > > Is there a way to set the guests clock to a specific time/date at virt > startup? I'm trying to virtualize a system with pci passthrough for a > hardware device that wants to always live in pre-2011. The license manager > for the software/hardware has 31-bit overflow of time calculations.Hi, currently there is no such thing, only stuff that would allow you to set an arbitrary offset to the current time, which would not be zero maintenance. However it's very simple to implement https://listman.redhat.com/archives/libvir-list/2022-April/230492.html That patchset introduces an 'absolute' mode for clock with an element 'start' where you can put an arbitrary unix epoch timestamp which is set always on boot of the VM.