mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-28 00:25:23 +00:00
c391e07eb0
libxl supports setting the domain real time clock to local time or UTC via the localtime field of libxl_domain_build_info. Adjustment of the clock is also supported via the rtc_timeoffset field. The libvirt libxl driver has never supported these settings, instead relying on libxl's default of a UTC real time clock with adjustment set to 0. There is at least one user that would like the ability to change the defaults https://www.redhat.com/archives/libvirt-users/2018-February/msg00059.html Add support for specifying a local time clock and for specifying an adjustment for both local time and UTC clocks. Add a test case to verify the XML to libxl_domain_config conversion. Local time clock and clock adjustment is already supported by the XML <-> xl.cfg converter. What is missing is an explicit test for the conversion. There are plenty of existing tests that all use UTC with 0 adjustment. Hijack test-fullvirt-tsc-timer to test a local time clock with 1 hour adjustment. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
37 lines
998 B
XML
37 lines
998 B
XML
<domain type='xen'>
|
|
<name>test-hvm</name>
|
|
<description>None</description>
|
|
<uuid>2147d599-9cc6-c0dc-92ab-4064b5446e9b</uuid>
|
|
<memory>1048576</memory>
|
|
<currentMemory>1048576</currentMemory>
|
|
<vcpu>4</vcpu>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>destroy</on_crash>
|
|
<clock offset='localtime' adjustment='3600'/>
|
|
<os>
|
|
<type>hvm</type>
|
|
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
|
<boot dev='hd'/>
|
|
</os>
|
|
<features>
|
|
<apic/>
|
|
<acpi/>
|
|
<pae/>
|
|
</features>
|
|
<devices>
|
|
<emulator>/bin/true</emulator>
|
|
<disk type='file' device='disk'>
|
|
<driver name='qemu'/>
|
|
<source file='/var/lib/xen/images/test-hvm.img'/>
|
|
<target dev='hda'/>
|
|
</disk>
|
|
<interface type='bridge'>
|
|
<source bridge='br0'/>
|
|
<mac address='00:16:3e:66:12:b4'/>
|
|
<script path='/etc/xen/scripts/vif-bridge'/>
|
|
</interface>
|
|
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
|
|
</devices>
|
|
</domain>
|