2008-05-07 14:44:20 +00:00
|
|
|
<domain type='xen' id='3'>
|
|
|
|
<name>fvtest</name>
|
|
|
|
<uuid>b5d70dd2-75cd-aca5-1776-9660b059d8bc</uuid>
|
2012-02-23 00:48:38 +00:00
|
|
|
<memory unit='KiB'>409600</memory>
|
|
|
|
<currentMemory unit='KiB'>409600</currentMemory>
|
2012-05-08 16:04:36 +00:00
|
|
|
<vcpu placement='static'>1</vcpu>
|
2008-05-07 14:44:20 +00:00
|
|
|
<os>
|
|
|
|
<type>hvm</type>
|
2014-08-06 11:18:53 +00:00
|
|
|
<loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
|
2008-05-07 14:44:20 +00:00
|
|
|
<boot dev='hd'/>
|
|
|
|
</os>
|
|
|
|
<features>
|
|
|
|
<acpi/>
|
|
|
|
</features>
|
Xen: Fix <clock> handling
XenD-3.1 introduced managed domains. HV-domains have rtc_timeoffset
(hgd24f37b31030 from 2007-04-03), which tracks the offset between the
hypervisors clock and the domains RTC, and is persisted by XenD.
In combination with localtime=1 this had a bug until XenD-3.4
(hg5d701be7c37b from 2009-04-01) (I'm not 100% sure how that bug
manifests, but at least for me in TZ=Europe/Berlin I see the previous
offset relative to utc being applied to localtime again, which manifests
in an extra hour being added)
XenD implements the following variants for clock/@offset:
- PV domains don't have a RTC → 'localtime' | 'utc'
- <3.1: no managed domains → 'localtime' | 'utc'
- ≥3.1: the offset is tracked for HV → 'variable'
due to the localtime=1 bug → 'localtime' | 'utc'
- ≥3.4: the offset is tracked for HV → 'variable'
Current libvirtd still thinks XenD only implements <clock offset='utc'/>
and <clock offset='localtime'/>, which is wrong, since the semantic of
'utc' and 'localtime' specifies, that the offset will be reset on
domain-restart, while with 'variable' the offset is kept. (keeping the
offset over "virsh edit" is important, since otherwise the clock might
jump, which confuses certain guest OSs)
xendConfigVersion was last incremented to 4 by the xen-folks for
xen-3.1.0. I know of no way to reliably detect the version of XenD
(user space tools), which may be different from the version of the
hypervisor (kernel) version! Because of this only the change from
'utc'/'localtime' to 'variable' in XenD-3.1 is handled, not the buggy
behaviour of XenD-3.1 until XenD-3.4.
For backward compatibility with previous versions of libvirt Xen-HV
still accepts 'utc' and 'localtime', but they are returned as 'variable'
on the next read-back from Xend to libvirt, since this is what XenD
implements: The RTC is NOT reset back to the specified time on next
restart, but the previous offset is kept.
This behaviour can be turned off by adding the additional attribute
adjustment='reset', in which case libvirt will report an error instead
of doing the conversion. The attribute can also be used as a shortcut to
offset='variable' with basis='...'.
With these changes, it is also necessary to adjust the xen tests:
"localtime = 0" is always inserted, because otherwise on updates the
value is not changed within XenD.
adjustment='reset' is inserted for all cases, since they're all <
XEND_CONFIG_VERSION_3_1_0, only 3.1 introduced persistent
rtc_timeoffset.
Some statements change their order because code was moved around.
Signed-off-by: Philipp Hahn <hahn@univention.de>
2012-02-08 16:32:34 +00:00
|
|
|
<clock offset='utc' adjustment='reset'/>
|
2008-07-25 10:49:33 +00:00
|
|
|
<on_poweroff>destroy</on_poweroff>
|
|
|
|
<on_reboot>restart</on_reboot>
|
|
|
|
<on_crash>restart</on_crash>
|
2008-05-07 14:44:20 +00:00
|
|
|
<devices>
|
|
|
|
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
|
|
|
|
<disk type='file' device='disk'>
|
|
|
|
<driver name='file'/>
|
|
|
|
<source file='/root/foo.img'/>
|
2014-04-17 13:22:32 +00:00
|
|
|
<backingStore/>
|
2008-05-08 14:41:56 +00:00
|
|
|
<target dev='hda' bus='ide'/>
|
2008-05-07 14:44:20 +00:00
|
|
|
</disk>
|
|
|
|
<disk type='file' device='cdrom'>
|
|
|
|
<driver name='file'/>
|
|
|
|
<source file='/root/boot.iso'/>
|
2014-04-17 13:22:32 +00:00
|
|
|
<backingStore/>
|
2008-05-08 14:41:56 +00:00
|
|
|
<target dev='hdc' bus='ide'/>
|
2008-05-07 14:44:20 +00:00
|
|
|
<readonly/>
|
|
|
|
</disk>
|
2008-07-25 10:49:33 +00:00
|
|
|
<interface type='bridge'>
|
|
|
|
<mac address='00:16:3e:1b:b1:47'/>
|
|
|
|
<source bridge='xenbr0'/>
|
2009-01-22 18:29:13 +00:00
|
|
|
<script path='vif-bridge'/>
|
2008-07-25 10:49:33 +00:00
|
|
|
<target dev='vif3.0'/>
|
|
|
|
</interface>
|
2008-05-07 14:44:20 +00:00
|
|
|
<input type='mouse' bus='ps2'/>
|
2014-02-17 10:17:53 +00:00
|
|
|
<input type='keyboard' bus='ps2'/>
|
2008-07-25 10:49:33 +00:00
|
|
|
<graphics type='vnc' port='5903' autoport='no' keymap='ja'/>
|
2008-05-07 14:44:20 +00:00
|
|
|
<sound model='sb16'/>
|
|
|
|
<sound model='es1370'/>
|
|
|
|
</devices>
|
|
|
|
</domain>
|