It doesn't seem to be implemented in libvirt's XML.

You can still try and hack it though:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<qemu:commandline>
    <qemu:arg value='-rtc base="xxx"'/>
  </qemu:commandline>
</domain>

It will mark this domain "tainted" in libvirt's log.


--Regards, Aleksei



From: Matt Xtlm
Sent: Tuesday, February 21, 2017 2:07PM
To: Libvirt-users
Subject: [libvirt-users] How to set manually starting date/time for guest kvm
Hi there,

is there a way to set a guest to start with a specific date and time. (e.g. when guest boots, starting guest time should always be (2017-02-05T12:00:00)).

I've tried something like this in my kvm domain:

  <clock offset='variable' adjustment='-86400' basis='localtime'>
    <timer name='rtc' tickpolicy='delay' track='guest'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>

However, i can't insert a specific date and time statement (like starting kvm with -rtc base="2017-02-05T12:00:00").

The date/time must be set before starting the vm and must always be the same.

Cheers,
Matt





_______________________________________________
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users