[libvirt] Enhancement: Random Clock Offset

Martin Kletzander mkletzan at redhat.com
Mon Mar 14 09:55:55 UTC 2016


On Fri, Mar 11, 2016 at 10:46:24PM +0000, bancfc at openmailbox.org wrote:
>On 2016-03-02 10:22, Daniel P. Berrange wrote:
>>
>> Agreed, this feature is really a specific usage policy. Libvirt aims to
>> focus on providing mechanism, letting specific policies be implemented
>> by the management applications using libvirt. We already allow the time
>> offset to be set to an arbitrary number of seconds, so apps starting a
>> guest can change that value as desired each time. So I don't think
>> there is anything should do in libvirt for this.
>>
>>
>> Regards,
>> Daniel
>
>:( I can't really use the guest-agent because its advised against
>running it in an untrusted environment. Has this situation changed?
>
>Also the changes we can do on the host side is really limited to just a
>VMs configuration XML to keep things simple and self contained.
>

In that case qemu can still help.  And libvirt has a way to configure
that.  There's just one downside being that if the guest resets the time
itself (e.g. based on ntp or whatever), it will not be reset.

Example configuration:

  <clock offset='variable' adjustment='-12' basis='utc'/>

This should set up the RTC in a way that it starts with the time of UTC
minus 12 seconds.  You can also set up the RTC to be in a specific
timezone, but that's not as finely grained as you'd like, I guess.  More
info on how to set that up in our docs [1].

HTH,
Martin

[1] https://libvirt.org/formatdomain.html#elementsTime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160314/a9a92617/attachment-0001.sig>


More information about the libvir-list mailing list