set fixed time at vm guest startup?

Peter Krempa pkrempa at redhat.com
Tue Apr 26 15:37:21 UTC 2022


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.


More information about the libvirt-users mailing list