2008-09-09 13:53:58 +00:00
|
|
|
<domain type='xen' id='6'>
|
|
|
|
<name>pvtest</name>
|
|
|
|
<uuid>596a5d21-71f4-8fb2-e068-e2386a5c413e</uuid>
|
2012-02-23 00:48:38 +00:00
|
|
|
<memory unit='KiB'>430080</memory>
|
|
|
|
<currentMemory unit='KiB'>430080</currentMemory>
|
2012-05-08 16:04:36 +00:00
|
|
|
<vcpu placement='static'>2</vcpu>
|
2008-09-09 13:53:58 +00:00
|
|
|
<os>
|
|
|
|
<type>linux</type>
|
|
|
|
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
|
|
|
|
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
|
|
|
|
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
|
|
|
|
</os>
|
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-09-09 13:53:58 +00:00
|
|
|
<on_poweroff>destroy</on_poweroff>
|
|
|
|
<on_reboot>destroy</on_reboot>
|
|
|
|
<on_crash>destroy</on_crash>
|
|
|
|
<devices>
|
|
|
|
<disk type='file' device='disk'>
|
|
|
|
<driver name='file'/>
|
|
|
|
<source file='/root/some.img'/>
|
2014-04-17 13:22:32 +00:00
|
|
|
<backingStore/>
|
2008-09-09 13:53:58 +00:00
|
|
|
<target dev='xvda' bus='xen'/>
|
|
|
|
</disk>
|
|
|
|
<console type='pty'>
|
2010-07-22 17:56:21 +00:00
|
|
|
<target type='xen' port='0'/>
|
2008-09-09 13:53:58 +00:00
|
|
|
</console>
|
|
|
|
<input type='mouse' bus='xen'/>
|
2014-02-17 10:17:53 +00:00
|
|
|
<input type='keyboard' bus='xen'/>
|
conf: add <listen> subelement to domain <graphics> element
Once it's plugged in, the <listen> element will be an optional
replacement for the "listen" attribute that graphics elements already
have. If the <listen> element is type='address', it will have an
attribute called 'address' which will contain an IP address or dns
name that the guest's display server should listen on. If, however,
type='network', the <listen> element should have an attribute called
'network' that will be set to the name of a network configuration to
get the IP address from.
* docs/schemas/domain.rng: updated to allow the <listen> element
* docs/formatdomain.html.in: document the <listen> element and its
attributes.
* src/conf/domain_conf.[hc]:
1) The domain parser, formatter, and data structure are modified to
support 0 or more <listen> subelements to each <graphics>
element. The old style "legacy" listen attribute is also still
accepted, and will be stored internally just as if it were a
separate <listen> element. On output (i.e. format), the address
attribute of the first <listen> element of type 'address' will be
duplicated in the legacy "listen" attribute of the <graphic>
element.
2) The "listenAddr" attribute has been removed from the unions in
virDomainGRaphicsDef for graphics types vnc, rdp, and spice.
This attribute is now in the <listen> subelement (aka
virDomainGraphicsListenDef)
3) Helper functions were written to provide simple access
(both Get and Set) to the listen elements and their attributes.
* src/libvirt_private.syms: export the listen helper functions
* src/qemu/qemu_command.c, src/qemu/qemu_hotplug.c,
src/qemu/qemu_migration.c, src/vbox/vbox_tmpl.c,
src/vmx/vmx.c, src/xenxs/xen_sxpr.c, src/xenxs/xen_xm.c
Modify all these files to use the listen helper functions rather
than directly referencing the (now missing) listenAddr
attribute. There can be multiple <listen> elements to a single
<graphics>, but the drivers all currently only support one, so all
replacements of direct access with a helper function indicate index
"0".
* tests/* - only 3 of these are new files added explicitly to test the
new <listen> element. All the others have been modified to reflect
the fact that any legacy "listen" attributes passed in to the domain
parse will be saved in a <listen> element (i.e. one of the
virDomainGraphicsListenDefs), and during the domain format function,
both the <listen> element as well as the legacy attributes will be
output.
2011-07-07 04:20:28 +00:00
|
|
|
<graphics type='vnc' port='5925' autoport='no' listen='0.0.0.0' keymap='ja'>
|
|
|
|
<listen type='address' address='0.0.0.0'/>
|
|
|
|
</graphics>
|
2016-04-12 12:58:43 +00:00
|
|
|
<video>
|
2016-05-12 12:19:52 +00:00
|
|
|
<model type='xen' vram='4096' heads='1' primary='yes'/>
|
2016-04-12 12:58:43 +00:00
|
|
|
</video>
|
2015-11-28 04:33:55 +00:00
|
|
|
<memballoon model='xen'/>
|
2008-09-09 13:53:58 +00:00
|
|
|
</devices>
|
|
|
|
</domain>
|