[libvirt] [PATCH 0/7] cleanup the input device code

This patch series is an attempt to make the code for input devices cleaner and readable and also follow some good practices whit rule that one function should do only one thing. We are really bad at this and our code is sometimes really hard to follow. Pavel Hrdina (7): vmware/vmx: use virDomainDefPostParse after parsing vmx config lxc: use virDomainDefPostParse for parsing LXC config string xen: use virDomainDefPostParse for parsing XM/XL/SEXPR cofings xen: fix timer bug found by updated test libxl: copy persistent domain definition while starting a guest device: cleanup input device code qemu_domain: cleanup default input device code src/Makefile.am | 2 +- src/conf/domain_conf.c | 77 +--------------------- src/esx/esx_driver.c | 4 +- src/libxl/libxl_domain.c | 8 +++ src/libxl/libxl_driver.c | 8 ++- src/lxc/lxc_driver.c | 5 +- src/lxc/lxc_native.c | 8 ++- src/lxc/lxc_native.h | 4 +- src/qemu/qemu_domain.c | 47 ++++++++----- src/qemu/qemu_domain.h | 1 + src/qemu/qemu_process.c | 3 + src/vmware/vmware_conf.c | 3 +- src/vmware/vmware_driver.c | 2 +- src/vmx/vmx.c | 5 ++ src/vmx/vmx.h | 1 + src/xen/xen_driver.c | 5 +- src/xen/xend_internal.c | 10 +++ src/xen/xm_internal.c | 2 +- src/xenapi/xenapi_driver.c | 8 +++ src/xenconfig/xen_common.c | 24 +++++++ src/xenconfig/xen_common.h | 2 + src/xenconfig/xen_sxpr.c | 18 ++++- src/xenconfig/xen_sxpr.h | 8 ++- src/xenconfig/xen_xl.c | 9 ++- src/xenconfig/xen_xl.h | 4 +- src/xenconfig/xen_xm.c | 7 +- src/xenconfig/xen_xm.h | 2 +- tests/Makefile.am | 2 +- tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml | 3 +- tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml | 3 +- tests/lxcconf2xmldata/lxcconf2xml-cputune.xml | 3 +- tests/lxcconf2xmldata/lxcconf2xml-idmap.xml | 3 +- .../lxcconf2xmldata/lxcconf2xml-macvlannetwork.xml | 3 +- tests/lxcconf2xmldata/lxcconf2xml-memtune.xml | 3 +- tests/lxcconf2xmldata/lxcconf2xml-nonenetwork.xml | 3 +- tests/lxcconf2xmldata/lxcconf2xml-nonetwork.xml | 3 +- tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml | 3 +- tests/lxcconf2xmldata/lxcconf2xml-simple.xml | 3 +- tests/lxcconf2xmldata/lxcconf2xml-vlannetwork.xml | 3 +- tests/lxcconf2xmltest.c | 18 ++++- .../qemuxml2argv-graphics-listen-network.xml | 2 - .../qemuxml2argv-graphics-listen-network2.xml | 2 - .../qemuxml2argv-graphics-sdl-fullscreen.xml | 2 - .../qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml | 2 - ...qemuxml2argv-graphics-spice-agent-file-xfer.xml | 1 - .../qemuxml2argv-graphics-spice-compression.xml | 2 - .../qemuxml2argv-graphics-spice-listen-network.xml | 1 - .../qemuxml2argv-graphics-spice-qxl-vga.xml | 2 - .../qemuxml2argv-graphics-spice-sasl.xml | 1 - .../qemuxml2argv-graphics-spice-timeout.xml | 2 - .../qemuxml2argv-graphics-spice.xml | 2 - .../qemuxml2argv-graphics-vnc-policy.xml | 2 - .../qemuxml2argv-graphics-vnc-sasl.xml | 2 - .../qemuxml2argv-graphics-vnc-socket.xml | 2 - .../qemuxml2argv-graphics-vnc-tls.xml | 2 - .../qemuxml2argv-graphics-vnc-websocket.xml | 2 - .../qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml | 2 - .../qemuxml2argv-pci-autoadd-addr.xml | 1 - .../qemuxml2argv-pci-autoadd-idx.xml | 1 - .../qemuxml2argvdata/qemuxml2argv-pseries-disk.xml | 2 +- .../qemuxml2xmlout-graphics-listen-network2.xml | 2 - .../qemuxml2xmlout-graphics-spice-timeout.xml | 2 - tests/sexpr2xmldata/sexpr2xml-boot-grub.xml | 1 + tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml | 1 + tests/sexpr2xmldata/sexpr2xml-curmem.xml | 3 +- .../sexpr2xml-disk-block-shareable.xml | 1 + tests/sexpr2xmldata/sexpr2xml-disk-block.xml | 1 + .../sexpr2xml-disk-drv-blktap-qcow.xml | 1 + .../sexpr2xml-disk-drv-blktap-raw.xml | 1 + .../sexpr2xml-disk-drv-blktap2-raw.xml | 1 + tests/sexpr2xmldata/sexpr2xml-disk-file.xml | 1 + tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 1 + tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml | 2 + tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 5 +- .../sexpr2xml-fv-serial-dev-2-ports.xml | 5 +- .../sexpr2xml-fv-serial-dev-2nd-port.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 5 +- .../sexpr2xml-fv-serial-tcp-telnet.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-fv.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-net-bridged.xml | 1 + tests/sexpr2xmldata/sexpr2xml-net-e1000.xml | 1 + tests/sexpr2xmldata/sexpr2xml-net-routed.xml | 1 + tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 5 +- tests/sexpr2xmldata/sexpr2xml-pci-devs.xml | 1 + .../sexpr2xml-pv-bootloader-cmdline.xml | 1 + tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml | 1 + tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml | 1 + tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml | 1 + .../sexpr2xml-pv-vfb-new-vncdisplay.xml | 3 +- tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml | 3 +- tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml | 3 +- .../sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml | 3 +- tests/sexpr2xmldata/sexpr2xml-pv.xml | 1 + tests/sexpr2xmltest.c | 10 ++- tests/vmx2xmldata/vmx2xml-graphics-vnc.xml | 2 - tests/vmx2xmltest.c | 2 +- .../test-fullvirt-direct-kernel-boot.xml | 4 +- tests/xlconfigdata/test-fullvirt-multiusb.xml | 4 +- tests/xlconfigdata/test-new-disk.xml | 5 +- tests/xlconfigdata/test-spice-features.xml | 4 +- tests/xlconfigdata/test-spice.xml | 4 +- tests/xlconfigtest.c | 2 +- tests/xmconfigdata/test-escape-paths.xml | 6 +- .../xmconfigdata/test-fullvirt-default-feature.xml | 5 +- tests/xmconfigdata/test-fullvirt-force-hpet.xml | 5 +- tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 5 +- tests/xmconfigdata/test-fullvirt-localtime.xml | 5 +- tests/xmconfigdata/test-fullvirt-net-ioemu.xml | 5 +- tests/xmconfigdata/test-fullvirt-net-netfront.xml | 5 +- tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 5 +- tests/xmconfigdata/test-fullvirt-old-cdrom.xml | 5 +- tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 5 +- .../test-fullvirt-serial-dev-2-ports.xml | 5 +- .../test-fullvirt-serial-dev-2nd-port.xml | 5 +- tests/xmconfigdata/test-fullvirt-serial-file.xml | 5 +- tests/xmconfigdata/test-fullvirt-serial-null.xml | 5 +- tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 5 +- tests/xmconfigdata/test-fullvirt-serial-pty.xml | 5 +- tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 5 +- .../test-fullvirt-serial-tcp-telnet.xml | 5 +- tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 5 +- tests/xmconfigdata/test-fullvirt-serial-udp.xml | 5 +- tests/xmconfigdata/test-fullvirt-serial-unix.xml | 5 +- tests/xmconfigdata/test-fullvirt-sound.xml | 5 +- tests/xmconfigdata/test-fullvirt-usbmouse.xml | 5 +- .../test-fullvirt-usbtablet-no-bus.xml | 4 +- tests/xmconfigdata/test-fullvirt-usbtablet.xml | 5 +- tests/xmconfigdata/test-fullvirt-utc.xml | 5 +- tests/xmconfigdata/test-no-source-cdrom.xml | 5 +- tests/xmconfigdata/test-paravirt-net-e1000.xml | 3 +- tests/xmconfigdata/test-paravirt-net-vifname.xml | 3 +- .../test-paravirt-new-pvfb-vncdisplay.xml | 3 +- tests/xmconfigdata/test-paravirt-new-pvfb.xml | 3 +- .../test-paravirt-old-pvfb-vncdisplay.xml | 3 +- tests/xmconfigdata/test-paravirt-old-pvfb.xml | 3 +- tests/xmconfigdata/test-paravirt-vcpu.xml | 1 + tests/xmconfigdata/test-pci-devs.xml | 5 +- tests/xmconfigtest.c | 3 +- 158 files changed, 429 insertions(+), 309 deletions(-) -- 2.6.3

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/esx/esx_driver.c | 4 ++-- src/vmware/vmware_conf.c | 3 ++- src/vmware/vmware_driver.c | 2 +- src/vmx/vmx.c | 5 +++++ src/vmx/vmx.h | 1 + tests/vmx2xmltest.c | 2 +- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index ebf23be..8d4b3fd 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -2743,7 +2743,7 @@ esxDomainGetXMLDesc(virDomainPtr domain, unsigned int flags) ctx.autodetectSCSIControllerModel = NULL; ctx.datacenterPath = priv->primary->datacenterPath; - def = virVMXParseConfig(&ctx, priv->xmlopt, vmx); + def = virVMXParseConfig(&ctx, priv->xmlopt, priv->caps, vmx); if (def) { if (powerState != esxVI_VirtualMachinePowerState_PoweredOff) @@ -2802,7 +2802,7 @@ esxConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat, ctx.autodetectSCSIControllerModel = NULL; ctx.datacenterPath = NULL; - def = virVMXParseConfig(&ctx, priv->xmlopt, nativeConfig); + def = virVMXParseConfig(&ctx, priv->xmlopt, priv->caps, nativeConfig); if (def) xml = virDomainDefFormat(def, VIR_DOMAIN_DEF_FORMAT_INACTIVE); diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c index f3cbbf5..b30b5de 100644 --- a/src/vmware/vmware_conf.c +++ b/src/vmware/vmware_conf.c @@ -166,7 +166,8 @@ vmwareLoadDomains(struct vmware_driver *driver) goto cleanup; if ((vmdef = - virVMXParseConfig(&ctx, driver->xmlopt, vmx)) == NULL) { + virVMXParseConfig(&ctx, driver->xmlopt, + driver->caps, vmx)) == NULL) { goto cleanup; } diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index a12b03a..7eedba3 100644 --- a/src/vmware/vmware_driver.c +++ b/src/vmware/vmware_driver.c @@ -1035,7 +1035,7 @@ vmwareConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat, ctx.autodetectSCSIControllerModel = NULL; ctx.datacenterPath = NULL; - def = virVMXParseConfig(&ctx, driver->xmlopt, nativeConfig); + def = virVMXParseConfig(&ctx, driver->xmlopt, driver->caps, nativeConfig); if (def != NULL) xml = virDomainDefFormat(def, VIR_DOMAIN_DEF_FORMAT_INACTIVE); diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 7c3c10a..2ae83f3 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -1276,6 +1276,7 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDomainDefPtr def, virDomainDefPtr virVMXParseConfig(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, + virCapsPtr caps, const char *vmx) { bool success = false; @@ -1811,6 +1812,10 @@ virVMXParseConfig(virVMXContext *ctx, def->namespaceData = namespaceData; } + if (virDomainDefPostParse(def, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, + xmlopt) < 0) + goto cleanup; + success = true; cleanup: diff --git a/src/vmx/vmx.h b/src/vmx/vmx.h index 90bd747..08b6277 100644 --- a/src/vmx/vmx.h +++ b/src/vmx/vmx.h @@ -82,6 +82,7 @@ char *virVMXConvertToUTF8(const char *encoding, const char *string); virDomainDefPtr virVMXParseConfig(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, + virCapsPtr caps, const char *vmx); int virVMXParseVNC(virConfPtr conf, virDomainGraphicsDefPtr *def); diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c index 2b14804..0bbf055 100644 --- a/tests/vmx2xmltest.c +++ b/tests/vmx2xmltest.c @@ -78,7 +78,7 @@ testCompareFiles(const char *vmx, const char *xml) if (virtTestLoadFile(vmx, &vmxData) < 0) goto cleanup; - if (!(def = virVMXParseConfig(&ctx, xmlopt, vmxData))) + if (!(def = virVMXParseConfig(&ctx, xmlopt, caps, vmxData))) goto cleanup; if (!virDomainDefCheckABIStability(def, def)) { -- 2.6.3

On 04/12/15 20:30, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Although the commit subject says exactly what the patch does (it adds virDomainDefPostParse call at the end of vmx parsing routine), it might be helpful to add a simple note for future reference why this change was necessary, especially if you'd like to prepare the driver for a bigger upcoming change/feature. ACK with a commit message added. Erik
--- src/esx/esx_driver.c | 4 ++-- src/vmware/vmware_conf.c | 3 ++- src/vmware/vmware_driver.c | 2 +- src/vmx/vmx.c | 5 +++++ src/vmx/vmx.h | 1 + tests/vmx2xmltest.c | 2 +- 6 files changed, 12 insertions(+), 5 deletions(-)

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/lxc/lxc_driver.c | 5 ++++- src/lxc/lxc_native.c | 8 +++++++- src/lxc/lxc_native.h | 4 +++- tests/Makefile.am | 2 +- tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-cputune.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-idmap.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-macvlannetwork.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-memtune.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-nonenetwork.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-nonetwork.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-simple.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-vlannetwork.xml | 3 ++- tests/lxcconf2xmltest.c | 18 +++++++++++++++++- 16 files changed, 54 insertions(+), 16 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 1a9550e..b2ab2c0 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -1055,6 +1055,8 @@ static char *lxcConnectDomainXMLFromNative(virConnectPtr conn, { char *xml = NULL; virDomainDefPtr def = NULL; + virLXCDriverPtr driver = conn->privateData; + virCapsPtr caps = virLXCDriverGetCapabilities(driver, false); virCheckFlags(0, NULL); @@ -1067,12 +1069,13 @@ static char *lxcConnectDomainXMLFromNative(virConnectPtr conn, goto cleanup; } - if (!(def = lxcParseConfigString(nativeConfig))) + if (!(def = lxcParseConfigString(nativeConfig, caps, driver->xmlopt))) goto cleanup; xml = virDomainDefFormat(def, 0); cleanup: + virObjectUnref(caps); virDomainDefFree(def); return xml; } diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c index 2f95597..8ff2253 100644 --- a/src/lxc/lxc_native.c +++ b/src/lxc/lxc_native.c @@ -991,7 +991,9 @@ lxcSetCapDrop(virDomainDefPtr def, virConfPtr properties) } virDomainDefPtr -lxcParseConfigString(const char *config) +lxcParseConfigString(const char *config, + virCapsPtr caps, + virDomainXMLOptionPtr xmlopt) { virDomainDefPtr vmdef = NULL; virConfPtr properties = NULL; @@ -1088,6 +1090,10 @@ lxcParseConfigString(const char *config) /* lxc.cap.drop */ lxcSetCapDrop(vmdef, properties); + if (virDomainDefPostParse(vmdef, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, + xmlopt) < 0) + goto cleanup; + goto cleanup; error: diff --git a/src/lxc/lxc_native.h b/src/lxc/lxc_native.h index a80f2b1..15fa0d5 100644 --- a/src/lxc/lxc_native.h +++ b/src/lxc/lxc_native.h @@ -27,6 +27,8 @@ # define LXC_CONFIG_FORMAT "lxc-tools" -virDomainDefPtr lxcParseConfigString(const char *config); +virDomainDefPtr lxcParseConfigString(const char *config, + virCapsPtr caps, + virDomainXMLOptionPtr xmlopt); #endif /* __LXC_NATIVE_H__ */ diff --git a/tests/Makefile.am b/tests/Makefile.am index e1e28ec..1d57b39 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -659,7 +659,7 @@ lxcxml2xmltest_SOURCES = \ lxcxml2xmltest_LDADD = $(lxc_LDADDS) lxcconf2xmltest_SOURCES = \ - lxcconf2xmltest.c \ + lxcconf2xmltest.c testutilslxc.c testutilslxc.h \ testutils.c testutils.h lxcconf2xmltest_LDADD = $(lxc_LDADDS) else ! WITH_LXC diff --git a/tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml b/tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml index c9c0469..641edb9 100644 --- a/tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml +++ b/tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml @@ -2,7 +2,7 @@ <name>migrate_test</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>65536</memory> - <currentMemory unit='KiB'>0</currentMemory> + <currentMemory unit='KiB'>65536</currentMemory> <blkiotune> <weight>500</weight> <device> @@ -33,6 +33,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> + <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/var/lib/lxc/migrate_test/rootfs'/> <target dir='/'/> diff --git a/tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml b/tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml index e7863fa..bafaa96 100644 --- a/tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml +++ b/tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml @@ -2,7 +2,7 @@ <name>migrate_test</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>65536</memory> - <currentMemory unit='KiB'>0</currentMemory> + <currentMemory unit='KiB'>65536</currentMemory> <vcpu placement='static' cpuset='1-2,5-7'>1</vcpu> <numatune> <memory mode='strict' nodeset='1-4'/> @@ -21,6 +21,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> + <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/var/lib/lxc/migrate_test/rootfs'/> <target dir='/'/> diff --git a/tests/lxcconf2xmldata/lxcconf2xml-cputune.xml b/tests/lxcconf2xmldata/lxcconf2xml-cputune.xml index 50c5358..f7f8041 100644 --- a/tests/lxcconf2xmldata/lxcconf2xml-cputune.xml +++ b/tests/lxcconf2xmldata/lxcconf2xml-cputune.xml @@ -2,7 +2,7 @@ <name>migrate_test</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>65536</memory> - <currentMemory unit='KiB'>0</currentMemory> + <currentMemory unit='KiB'>65536</currentMemory> <vcpu placement='static'>1</vcpu> <cputune> <shares>1024</shares> @@ -23,6 +23,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> + <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/var/lib/lxc/migrate_test/rootfs'/> <target dir='/'/> diff --git a/tests/lxcconf2xmldata/lxcconf2xml-idmap.xml b/tests/lxcconf2xmldata/lxcconf2xml-idmap.xml index 80a83ff..dd3843d 100644 --- a/tests/lxcconf2xmldata/lxcconf2xml-idmap.xml +++ b/tests/lxcconf2xmldata/lxcconf2xml-idmap.xml @@ -2,7 +2,7 @@ <name>migrate_test</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>65536</memory> - <currentMemory unit='KiB'>0</currentMemory> + <currentMemory unit='KiB'>65536</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type>exe</type> @@ -22,6 +22,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> + <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/var/lib/lxc/migrate_test/rootfs'/> <target dir='/'/> diff --git a/tests/lxcconf2xmldata/lxcconf2xml-macvlannetwork.xml b/tests/lxcconf2xmldata/lxcconf2xml-macvlannetwork.xml index 3105b8c..a345e8e 100644 --- a/tests/lxcconf2xmldata/lxcconf2xml-macvlannetwork.xml +++ b/tests/lxcconf2xmldata/lxcconf2xml-macvlannetwork.xml @@ -2,7 +2,7 @@ <name>migrate_test</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>65536</memory> - <currentMemory unit='KiB'>0</currentMemory> + <currentMemory unit='KiB'>65536</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type>exe</type> @@ -17,6 +17,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> + <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/var/lib/lxc/migrate_test/rootfs'/> <target dir='/'/> diff --git a/tests/lxcconf2xmldata/lxcconf2xml-memtune.xml b/tests/lxcconf2xmldata/lxcconf2xml-memtune.xml index 7df1ef0..57e751a 100644 --- a/tests/lxcconf2xmldata/lxcconf2xml-memtune.xml +++ b/tests/lxcconf2xmldata/lxcconf2xml-memtune.xml @@ -2,7 +2,7 @@ <name>migrate_test</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>0</currentMemory> + <currentMemory unit='KiB'>1048576</currentMemory> <memtune> <hard_limit unit='KiB'>1048576</hard_limit> <soft_limit unit='KiB'>131072</soft_limit> @@ -23,6 +23,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> + <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/var/lib/lxc/migrate_test/rootfs'/> <target dir='/'/> diff --git a/tests/lxcconf2xmldata/lxcconf2xml-nonenetwork.xml b/tests/lxcconf2xmldata/lxcconf2xml-nonenetwork.xml index e002b99..0122ab0 100644 --- a/tests/lxcconf2xmldata/lxcconf2xml-nonenetwork.xml +++ b/tests/lxcconf2xmldata/lxcconf2xml-nonenetwork.xml @@ -2,7 +2,7 @@ <name>migrate_test</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>65536</memory> - <currentMemory unit='KiB'>0</currentMemory> + <currentMemory unit='KiB'>65536</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type>exe</type> @@ -17,6 +17,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> + <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/var/lib/lxc/migrate_test/rootfs'/> <target dir='/'/> diff --git a/tests/lxcconf2xmldata/lxcconf2xml-nonetwork.xml b/tests/lxcconf2xmldata/lxcconf2xml-nonetwork.xml index dc9d635..04ea280 100644 --- a/tests/lxcconf2xmldata/lxcconf2xml-nonetwork.xml +++ b/tests/lxcconf2xmldata/lxcconf2xml-nonetwork.xml @@ -2,7 +2,7 @@ <name>migrate_test</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>65536</memory> - <currentMemory unit='KiB'>0</currentMemory> + <currentMemory unit='KiB'>65536</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type>exe</type> @@ -18,6 +18,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> + <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/var/lib/lxc/migrate_test/rootfs'/> <target dir='/'/> diff --git a/tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml b/tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml index 79bcfa0..4fb3f95 100644 --- a/tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml +++ b/tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml @@ -2,7 +2,7 @@ <name>migrate_test</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>65536</memory> - <currentMemory unit='KiB'>0</currentMemory> + <currentMemory unit='KiB'>65536</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type>exe</type> @@ -17,6 +17,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> + <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/var/lib/lxc/migrate_test/rootfs'/> <target dir='/'/> diff --git a/tests/lxcconf2xmldata/lxcconf2xml-simple.xml b/tests/lxcconf2xmldata/lxcconf2xml-simple.xml index 45a2012..5234bab 100644 --- a/tests/lxcconf2xmldata/lxcconf2xml-simple.xml +++ b/tests/lxcconf2xmldata/lxcconf2xml-simple.xml @@ -2,7 +2,7 @@ <name>migrate_test</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>65536</memory> - <currentMemory unit='KiB'>0</currentMemory> + <currentMemory unit='KiB'>65536</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type arch='i686'>exe</type> @@ -21,6 +21,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> + <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/var/lib/lxc/migrate_test/rootfs'/> <target dir='/'/> diff --git a/tests/lxcconf2xmldata/lxcconf2xml-vlannetwork.xml b/tests/lxcconf2xmldata/lxcconf2xml-vlannetwork.xml index 712be3e..47ed898 100644 --- a/tests/lxcconf2xmldata/lxcconf2xml-vlannetwork.xml +++ b/tests/lxcconf2xmldata/lxcconf2xml-vlannetwork.xml @@ -2,7 +2,7 @@ <name>migrate_test</name> <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> <memory unit='KiB'>65536</memory> - <currentMemory unit='KiB'>0</currentMemory> + <currentMemory unit='KiB'>65536</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type>exe</type> @@ -17,6 +17,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> + <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/var/lib/lxc/migrate_test/rootfs'/> <target dir='/'/> diff --git a/tests/lxcconf2xmltest.c b/tests/lxcconf2xmltest.c index 6255942..ed21e8a 100644 --- a/tests/lxcconf2xmltest.c +++ b/tests/lxcconf2xmltest.c @@ -5,9 +5,14 @@ #ifdef WITH_LXC # include "lxc/lxc_native.h" +# include "lxc/lxc_conf.h" +# include "testutilslxc.h" # define VIR_FROM_THIS VIR_FROM_NONE +static virCapsPtr caps; +static virDomainXMLOptionPtr xmlopt; + static int blankProblemElements(char *data) { @@ -30,7 +35,7 @@ testCompareXMLToConfigFiles(const char *xml, if (virtTestLoadFile(configfile, &config) < 0) goto fail; - vmdef = lxcParseConfigString(config); + vmdef = lxcParseConfigString(config, caps, xmlopt); if ((vmdef && expectError) || (!vmdef && !expectError)) goto fail; @@ -93,6 +98,14 @@ mymain(void) { int ret = EXIT_SUCCESS; + if (!(caps = testLXCCapsInit())) + return EXIT_FAILURE; + + if (!(xmlopt = lxcDomainXMLConfInit())) { + virObjectUnref(caps); + return EXIT_FAILURE; + } + # define DO_TEST(name, expectError) \ do { \ const struct testInfo info = { name, expectError }; \ @@ -115,6 +128,9 @@ mymain(void) DO_TEST("cpusettune", false); DO_TEST("blkiotune", false); + virObjectUnref(xmlopt); + virObjectUnref(caps); + return ret; } -- 2.6.3

On 04/12/15 20:30, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> ---
Again, the patch is lacking commit message, feel free to re-use the one you'll provide for 1/7 in some way.
src/lxc/lxc_driver.c | 5 ++++- src/lxc/lxc_native.c | 8 +++++++- src/lxc/lxc_native.h | 4 +++- tests/Makefile.am | 2 +- tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-cputune.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-idmap.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-macvlannetwork.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-memtune.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-nonenetwork.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-nonetwork.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-simple.xml | 3 ++- tests/lxcconf2xmldata/lxcconf2xml-vlannetwork.xml | 3 ++- tests/lxcconf2xmltest.c | 18 +++++++++++++++++- 16 files changed, 54 insertions(+), 16 deletions(-)
@@ -93,6 +98,14 @@ mymain(void) { int ret = EXIT_SUCCESS;
+ if (!(caps = testLXCCapsInit())) + return EXIT_FAILURE; + + if (!(xmlopt = lxcDomainXMLConfInit())) { + virObjectUnref(caps);
looking at this ^^, it should also be fixed in lxcxml2xmltest.c (but within a separate patch) since this is supposed to be a tweak/refactor series.
+ return EXIT_FAILURE; + } +
ACK with those little adjustments after 1.3.0 release (same applies to 1/7). Erik

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/libxl/libxl_driver.c | 8 ++++++-- src/xen/xen_driver.c | 5 +++-- src/xen/xm_internal.c | 2 +- src/xenconfig/xen_sxpr.c | 16 ++++++++++++++-- src/xenconfig/xen_sxpr.h | 8 ++++++-- src/xenconfig/xen_xl.c | 9 ++++++++- src/xenconfig/xen_xl.h | 4 +++- src/xenconfig/xen_xm.c | 7 ++++++- src/xenconfig/xen_xm.h | 2 +- tests/sexpr2xmldata/sexpr2xml-boot-grub.xml | 1 + tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml | 1 + tests/sexpr2xmldata/sexpr2xml-curmem.xml | 1 + tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml | 1 + tests/sexpr2xmldata/sexpr2xml-disk-block.xml | 1 + tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml | 1 + tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml | 1 + tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml | 1 + tests/sexpr2xmldata/sexpr2xml-disk-file.xml | 1 + tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 1 + tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml | 2 ++ tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-fv.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-net-bridged.xml | 1 + tests/sexpr2xmldata/sexpr2xml-net-e1000.xml | 1 + tests/sexpr2xmldata/sexpr2xml-net-routed.xml | 1 + tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 3 +++ tests/sexpr2xmldata/sexpr2xml-pci-devs.xml | 1 + tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml | 1 + tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml | 1 + tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml | 1 + tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml | 1 + tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml | 1 + tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml | 1 + tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml | 1 + tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml | 1 + tests/sexpr2xmldata/sexpr2xml-pv.xml | 1 + tests/sexpr2xmltest.c | 10 +++++++++- tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml | 2 ++ tests/xlconfigdata/test-fullvirt-multiusb.xml | 2 ++ tests/xlconfigdata/test-new-disk.xml | 3 +++ tests/xlconfigdata/test-spice-features.xml | 2 ++ tests/xlconfigdata/test-spice.xml | 2 ++ tests/xlconfigtest.c | 2 +- tests/xmconfigdata/test-escape-paths.xml | 4 ++++ tests/xmconfigdata/test-fullvirt-default-feature.xml | 3 +++ tests/xmconfigdata/test-fullvirt-force-hpet.xml | 3 +++ tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 3 +++ tests/xmconfigdata/test-fullvirt-localtime.xml | 3 +++ tests/xmconfigdata/test-fullvirt-net-ioemu.xml | 3 +++ tests/xmconfigdata/test-fullvirt-net-netfront.xml | 3 +++ tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 3 +++ tests/xmconfigdata/test-fullvirt-old-cdrom.xml | 3 +++ tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 3 +++ tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml | 3 +++ tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml | 3 +++ tests/xmconfigdata/test-fullvirt-serial-file.xml | 3 +++ tests/xmconfigdata/test-fullvirt-serial-null.xml | 3 +++ tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 3 +++ tests/xmconfigdata/test-fullvirt-serial-pty.xml | 3 +++ tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 3 +++ tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml | 3 +++ tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 3 +++ tests/xmconfigdata/test-fullvirt-serial-udp.xml | 3 +++ tests/xmconfigdata/test-fullvirt-serial-unix.xml | 3 +++ tests/xmconfigdata/test-fullvirt-sound.xml | 3 +++ tests/xmconfigdata/test-fullvirt-usbmouse.xml | 3 +++ tests/xmconfigdata/test-fullvirt-usbtablet-no-bus.xml | 3 +++ tests/xmconfigdata/test-fullvirt-usbtablet.xml | 3 +++ tests/xmconfigdata/test-fullvirt-utc.xml | 3 +++ tests/xmconfigdata/test-no-source-cdrom.xml | 3 +++ tests/xmconfigdata/test-paravirt-net-e1000.xml | 1 + tests/xmconfigdata/test-paravirt-net-vifname.xml | 1 + tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml | 1 + tests/xmconfigdata/test-paravirt-new-pvfb.xml | 1 + tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml | 1 + tests/xmconfigdata/test-paravirt-old-pvfb.xml | 1 + tests/xmconfigdata/test-paravirt-vcpu.xml | 1 + tests/xmconfigdata/test-pci-devs.xml | 3 +++ tests/xmconfigtest.c | 3 ++- 103 files changed, 269 insertions(+), 16 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 0504130..f0198d9 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -2588,6 +2588,7 @@ libxlConnectDomainXMLFromNative(virConnectPtr conn, goto cleanup; if (!(def = xenParseXL(conf, cfg->caps, + driver->xmlopt, cfg->verInfo->xen_version_major))) goto cleanup; } else if (STREQ(nativeFormat, LIBXL_CONFIG_FORMAT_XM)) { @@ -2596,14 +2597,17 @@ libxlConnectDomainXMLFromNative(virConnectPtr conn, if (!(def = xenParseXM(conf, cfg->verInfo->xen_version_major, - cfg->caps))) + cfg->caps, + driver->xmlopt))) goto cleanup; } else if (STREQ(nativeFormat, LIBXL_CONFIG_FORMAT_SEXPR)) { /* only support latest xend config format */ if (!(def = xenParseSxprString(nativeConfig, XEND_CONFIG_VERSION_3_1_0, NULL, - -1))) { + -1, + cfg->caps, + driver->xmlopt))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("parsing sxpr config failed")); goto cleanup; diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index ce31f0f..285a553 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -1645,7 +1645,8 @@ xenUnifiedConnectDomainXMLFromNative(virConnectPtr conn, if (!conf) goto cleanup; - def = xenParseXM(conf, priv->xendConfigVersion, priv->caps); + def = xenParseXM(conf, priv->xendConfigVersion, + priv->caps, priv->xmlopt); } else if (STREQ(format, XEN_CONFIG_FORMAT_SEXPR)) { if (xenGetDomIdFromSxprString(config, priv->xendConfigVersion, &id) < 0) goto cleanup; @@ -1654,7 +1655,7 @@ xenUnifiedConnectDomainXMLFromNative(virConnectPtr conn, vncport = xenStoreDomainGetVNCPort(conn, id); xenUnifiedUnlock(priv); def = xenParseSxprString(config, priv->xendConfigVersion, tty, - vncport); + vncport, priv->caps, priv->xmlopt); } if (!def) goto cleanup; diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c index 75f98b1..00c63d3 100644 --- a/src/xen/xm_internal.c +++ b/src/xen/xm_internal.c @@ -139,7 +139,7 @@ xenXMConfigReadFile(virConnectPtr conn, const char *filename) if (!(conf = virConfReadFile(filename, 0))) return NULL; - def = xenParseXM(conf, priv->xendConfigVersion, priv->caps); + def = xenParseXM(conf, priv->xendConfigVersion, priv->caps, priv->xmlopt); virConfFree(conf); return def; diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c index 7fc9c9d..f9a3187 100644 --- a/src/xenconfig/xen_sxpr.c +++ b/src/xenconfig/xen_sxpr.c @@ -1491,7 +1491,11 @@ xenParseSxpr(const struct sexpr *root, */ virDomainDefPtr xenParseSxprString(const char *sexpr, - int xendConfigVersion, char *tty, int vncport) + int xendConfigVersion, + char *tty, + int vncport, + virCapsPtr caps, + virDomainXMLOptionPtr xmlopt) { struct sexpr *root = string2sexpr(sexpr); virDomainDefPtr def; @@ -1499,8 +1503,16 @@ xenParseSxprString(const char *sexpr, if (!root) return NULL; - def = xenParseSxpr(root, xendConfigVersion, NULL, tty, vncport); + if (!(def = xenParseSxpr(root, xendConfigVersion, NULL, tty, vncport))) + goto cleanup; + if (virDomainDefPostParse(def, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, + xmlopt) < 0) { + virDomainDefFree(def); + def = NULL; + } + + cleanup: sexpr_free(root); return def; diff --git a/src/xenconfig/xen_sxpr.h b/src/xenconfig/xen_sxpr.h index f354a50..e42a931 100644 --- a/src/xenconfig/xen_sxpr.h +++ b/src/xenconfig/xen_sxpr.h @@ -43,8 +43,12 @@ typedef enum { int xenGetDomIdFromSxprString(const char *sexpr, int xendConfigVersion, int *id); int xenGetDomIdFromSxpr(const struct sexpr *root, int xendConfigVersion, int *id); -virDomainDefPtr xenParseSxprString(const char *sexpr, int xendConfigVersion, - char *tty, int vncport); +virDomainDefPtr xenParseSxprString(const char *sexpr, + int xendConfigVersion, + char *tty, + int vncport, + virCapsPtr caps, + virDomainXMLOptionPtr xmlopt); virDomainDefPtr xenParseSxpr(const struct sexpr *root, int xendConfigVersion, const char *cpus, char *tty, int vncport); diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index 0cb88cb..98e345c 100644 --- a/src/xenconfig/xen_xl.c +++ b/src/xenconfig/xen_xl.c @@ -444,7 +444,10 @@ xenParseXLInputDevs(virConfPtr conf, virDomainDefPtr def) } virDomainDefPtr -xenParseXL(virConfPtr conf, virCapsPtr caps, int xendConfigVersion) +xenParseXL(virConfPtr conf, + virCapsPtr caps, + virDomainXMLOptionPtr xmlopt, + int xendConfigVersion) { virDomainDefPtr def = NULL; @@ -469,6 +472,10 @@ xenParseXL(virConfPtr conf, virCapsPtr caps, int xendConfigVersion) if (xenParseXLInputDevs(conf, def) < 0) goto cleanup; + if (virDomainDefPostParse(def, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, + xmlopt) < 0) + goto cleanup; + return def; cleanup: diff --git a/src/xenconfig/xen_xl.h b/src/xenconfig/xen_xl.h index 9838297..58dfcb5 100644 --- a/src/xenconfig/xen_xl.h +++ b/src/xenconfig/xen_xl.h @@ -27,7 +27,9 @@ # include "domain_conf.h" # include "xen_common.h" -virDomainDefPtr xenParseXL(virConfPtr conn, virCapsPtr caps, +virDomainDefPtr xenParseXL(virConfPtr conn, + virCapsPtr caps, + virDomainXMLOptionPtr xmlopt, int xendConfigVersion); virConfPtr xenFormatXL(virDomainDefPtr def, virConnectPtr, int xendConfigVersion); diff --git a/src/xenconfig/xen_xm.c b/src/xenconfig/xen_xm.c index a4d1203..13eedf1 100644 --- a/src/xenconfig/xen_xm.c +++ b/src/xenconfig/xen_xm.c @@ -469,7 +469,8 @@ xenParseXMInputDevs(virConfPtr conf, virDomainDefPtr def) virDomainDefPtr xenParseXM(virConfPtr conf, int xendConfigVersion, - virCapsPtr caps) + virCapsPtr caps, + virDomainXMLOptionPtr xmlopt) { virDomainDefPtr def = NULL; @@ -491,6 +492,10 @@ xenParseXM(virConfPtr conf, if (xenParseXMInputDevs(conf, def) < 0) goto cleanup; + if (virDomainDefPostParse(def, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, + xmlopt) < 0) + goto cleanup; + return def; cleanup: diff --git a/src/xenconfig/xen_xm.h b/src/xenconfig/xen_xm.h index 629a4b3..61f94db 100644 --- a/src/xenconfig/xen_xm.h +++ b/src/xenconfig/xen_xm.h @@ -34,6 +34,6 @@ virConfPtr xenFormatXM(virConnectPtr conn, virDomainDefPtr def, int xendConfigVersion); virDomainDefPtr xenParseXM(virConfPtr conf, int xendConfigVersion, - virCapsPtr caps); + virCapsPtr caps, virDomainXMLOptionPtr xmlopt); #endif /* __VIR_XEN_XM_H__ */ diff --git a/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml b/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml index 1220407..ebce566 100644 --- a/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml +++ b/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml @@ -23,5 +23,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml b/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml index 25a29fd..0444524 100644 --- a/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml +++ b/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml @@ -31,5 +31,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-curmem.xml b/tests/sexpr2xmldata/sexpr2xml-curmem.xml index 39d954a..4ac263e 100644 --- a/tests/sexpr2xmldata/sexpr2xml-curmem.xml +++ b/tests/sexpr2xmldata/sexpr2xml-curmem.xml @@ -34,5 +34,6 @@ <input type='mouse' bus='xen'/> <input type='keyboard' bus='xen'/> <graphics type='vnc' port='-1' autoport='yes'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml b/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml index 40e8903..18c7f4d 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml @@ -29,5 +29,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-block.xml b/tests/sexpr2xmldata/sexpr2xml-disk-block.xml index 51e3b3a..cce8af1 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-block.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-block.xml @@ -24,5 +24,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml index 315c68a..c61c046 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml @@ -24,5 +24,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml index c56582d..227e3bf 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml @@ -24,5 +24,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml index 7afc6b5..f74712b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml @@ -24,5 +24,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-file.xml b/tests/sexpr2xmldata/sexpr2xml-disk-file.xml index 36b8c1e..895605b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-disk-file.xml +++ b/tests/sexpr2xmldata/sexpr2xml-disk-file.xml @@ -24,5 +24,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml index 761952c..17e723e 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml @@ -23,6 +23,7 @@ <source dev='/iscsi/winxp'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:e8:18'/> @@ -47,5 +49,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5925' autoport='yes' keymap='en-us'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml index 2898098..9494ec2 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -40,5 +42,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml index a0fe30d..af1303b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml @@ -25,6 +25,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -32,6 +33,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -43,5 +45,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml index 851797d..406f3ed 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml @@ -25,6 +25,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -32,6 +33,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -43,5 +45,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml b/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml index 09cfe19..5723564 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml @@ -28,5 +28,6 @@ <console type='pty'> <target type='serial' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml b/tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml index 44c0f61..4f2a39b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml @@ -28,8 +28,10 @@ <source dev='/dev/zvol/dsk/export/s10u4-root'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' keymap='en-us'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml index 29007f0..bc2ccec 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -40,5 +42,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml b/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml index 3dbc999..ec75365 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -41,5 +43,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml index d96350e..f92ea4b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -41,5 +43,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml index 7ad377c..3bc6490 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -45,5 +47,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml index adba6cb..d1b5134 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -52,5 +54,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml index b6c3601..1c5a047 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -48,5 +50,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml index dabe679..680528e 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -48,5 +50,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml index fb19d74..1a7f866 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -46,5 +48,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml index 5aa425b..b15a1bc 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -48,5 +50,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml index 3c2ca21..e827f1d 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -46,5 +48,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml index 160edbd..3d79428 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -46,5 +48,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml index 4396efc..7dec0c8 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -50,5 +52,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml index 3d17b58..4f4b89b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -50,5 +52,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml index fc3d457..cf1fc3b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -50,5 +52,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml index 14b54f1..a1d15f5 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -48,5 +50,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml index 912df56..4311b0c 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -42,5 +44,6 @@ <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> <sound model='sb16'/> <sound model='es1370'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml index 912df56..4311b0c 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -42,5 +44,6 @@ <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> <sound model='sb16'/> <sound model='es1370'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml index 19eac3b..103cfbe 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -41,5 +43,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml index 40ac8a9..728e852 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -41,5 +43,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml index 97f2beb..7899baa 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -40,5 +42,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml index 493d1b5..af5fbe1 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -40,5 +42,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' keymap='ja'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv.xml b/tests/sexpr2xmldata/sexpr2xml-fv.xml index 97f2beb..7899baa 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv.xml @@ -23,6 +23,7 @@ <source file='/root/foo.img'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> @@ -30,6 +31,7 @@ <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:1b:b1:47'/> @@ -40,5 +42,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml b/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml index ce7954d..a6b765e 100644 --- a/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml +++ b/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml @@ -30,5 +30,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml b/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml index 286209b..631ca07 100644 --- a/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml +++ b/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml @@ -31,5 +31,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-net-routed.xml b/tests/sexpr2xmldata/sexpr2xml-net-routed.xml index c03e40b..5e1fbce 100644 --- a/tests/sexpr2xmldata/sexpr2xml-net-routed.xml +++ b/tests/sexpr2xmldata/sexpr2xml-net-routed.xml @@ -30,5 +30,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml index a3cd7be..384ff8b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml +++ b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml @@ -25,11 +25,13 @@ <source dev='/dev/sda8'/> <backingStore/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:0a:7b:39'/> @@ -45,5 +47,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml b/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml index a404484..1dd00d5 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml @@ -34,5 +34,6 @@ <address domain='0x0000' bus='0x01' slot='0x13' function='0x0'/> </source> </hostdev> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml index 0e92d0e..a7cd347 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml @@ -24,5 +24,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml index bafe97f..6c12636 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml @@ -23,5 +23,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml index fc57fa9..c0ebf66 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml @@ -24,5 +24,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml index a55f83e..d1983cb 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml @@ -24,5 +24,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml index 9ae7bff..eacfc97 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml @@ -29,5 +29,6 @@ <graphics type='vnc' port='5925' autoport='no' listen='0.0.0.0' keymap='ja'> <listen type='address' address='0.0.0.0'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml index c2eb798..f5b80c8 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml @@ -29,5 +29,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='ja'> <listen type='address' address='0.0.0.0'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml index c2eb798..f5b80c8 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml @@ -29,5 +29,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='ja'> <listen type='address' address='0.0.0.0'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml index 0fee41c..0aebf20 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml @@ -32,5 +32,6 @@ <input type='mouse' bus='xen'/> <input type='keyboard' bus='xen'/> <graphics type='vnc' port='-1' autoport='yes'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv.xml b/tests/sexpr2xmldata/sexpr2xml-pv.xml index 36b8c1e..895605b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv.xml @@ -24,5 +24,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c index 99999f1..f7f61cc 100644 --- a/tests/sexpr2xmltest.c +++ b/tests/sexpr2xmltest.c @@ -17,6 +17,7 @@ #define VIR_FROM_THIS VIR_FROM_NONE static virCapsPtr caps; +static virDomainXMLOptionPtr xmlopt; static int testCompareFiles(const char *xml, const char *sexpr, int xendConfigVersion) @@ -53,7 +54,8 @@ testCompareFiles(const char *xml, const char *sexpr, int xendConfigVersion) vncport = xenStoreDomainGetVNCPort(conn, id); xenUnifiedUnlock(&priv); - if (!(def = xenParseSxprString(sexprData, xendConfigVersion, tty, vncport))) + if (!(def = xenParseSxprString(sexprData, xendConfigVersion, + tty, vncport, caps, xmlopt))) goto fail; if (!virDomainDefCheckABIStability(def, def)) { @@ -116,6 +118,11 @@ mymain(void) if (!(caps = testXenCapsInit())) return EXIT_FAILURE; + if (!(xmlopt = xenDomainXMLConfInit())) { + virObjectUnref(caps); + return EXIT_FAILURE; + } + #define DO_TEST(in, out, version) \ do { \ struct testInfo info = { in, out, version }; \ @@ -186,6 +193,7 @@ mymain(void) DO_TEST("boot-grub", "boot-grub", 1); virObjectUnref(caps); + virObjectUnref(xmlopt); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml index 414f645..d59aa21 100644 --- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml +++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml @@ -27,12 +27,14 @@ <driver name='phy' type='raw'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> diff --git a/tests/xlconfigdata/test-fullvirt-multiusb.xml b/tests/xlconfigdata/test-fullvirt-multiusb.xml index 642c242..0e6d0b6 100644 --- a/tests/xlconfigdata/test-fullvirt-multiusb.xml +++ b/tests/xlconfigdata/test-fullvirt-multiusb.xml @@ -24,12 +24,14 @@ <driver name='phy' type='raw'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> diff --git a/tests/xlconfigdata/test-new-disk.xml b/tests/xlconfigdata/test-new-disk.xml index 1c96a62..718a2da 100644 --- a/tests/xlconfigdata/test-new-disk.xml +++ b/tests/xlconfigdata/test-new-disk.xml @@ -24,17 +24,20 @@ <driver name='phy' type='raw'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/XenGuest2-home'/> <target dev='hdb' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> diff --git a/tests/xlconfigdata/test-spice-features.xml b/tests/xlconfigdata/test-spice-features.xml index 8f3fcf5..3160c2b 100644 --- a/tests/xlconfigdata/test-spice-features.xml +++ b/tests/xlconfigdata/test-spice-features.xml @@ -24,12 +24,14 @@ <driver name='phy' type='raw'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> diff --git a/tests/xlconfigdata/test-spice.xml b/tests/xlconfigdata/test-spice.xml index e5b43d9..30415fb 100644 --- a/tests/xlconfigdata/test-spice.xml +++ b/tests/xlconfigdata/test-spice.xml @@ -24,12 +24,14 @@ <driver name='phy' type='raw'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> diff --git a/tests/xlconfigtest.c b/tests/xlconfigtest.c index 952b504..21f760d 100644 --- a/tests/xlconfigtest.c +++ b/tests/xlconfigtest.c @@ -113,7 +113,7 @@ testCompareFormatXML(const char *xmcfg, const char *xml, int xendConfigVersion) if (!(conf = virConfReadMem(xmcfgData, strlen(xmcfgData), 0))) goto fail; - if (!(def = xenParseXL(conf, caps, xendConfigVersion))) + if (!(def = xenParseXL(conf, caps, xmlopt, xendConfigVersion))) goto fail; if (!(gotxml = virDomainDefFormat(def, VIR_DOMAIN_XML_INACTIVE | diff --git a/tests/xmconfigdata/test-escape-paths.xml b/tests/xmconfigdata/test-escape-paths.xml index 623eaa1..d2ec843 100644 --- a/tests/xmconfigdata/test-escape-paths.xml +++ b/tests/xmconfigdata/test-escape-paths.xml @@ -24,17 +24,20 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='block' device='disk'> <driver name='phy'/> <source dev='/dev/HostVG/XenGuest'"'/> <target dev='hdb' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso&test'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -49,5 +52,6 @@ </graphics> <sound model='sb16'/> <sound model='es1370'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-default-feature.xml b/tests/xmconfigdata/test-fullvirt-default-feature.xml index 57a6531..06ad44e 100644 --- a/tests/xmconfigdata/test-fullvirt-default-feature.xml +++ b/tests/xmconfigdata/test-fullvirt-default-feature.xml @@ -26,12 +26,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -44,5 +46,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-force-hpet.xml b/tests/xmconfigdata/test-fullvirt-force-hpet.xml index 57a6531..06ad44e 100644 --- a/tests/xmconfigdata/test-fullvirt-force-hpet.xml +++ b/tests/xmconfigdata/test-fullvirt-force-hpet.xml @@ -26,12 +26,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -44,5 +46,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml index f6ebcf6..148c372 100644 --- a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml +++ b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml @@ -26,12 +26,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -44,5 +46,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-localtime.xml b/tests/xmconfigdata/test-fullvirt-localtime.xml index 36ab389..5db392c 100644 --- a/tests/xmconfigdata/test-fullvirt-localtime.xml +++ b/tests/xmconfigdata/test-fullvirt-localtime.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -42,5 +44,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-net-ioemu.xml b/tests/xmconfigdata/test-fullvirt-net-ioemu.xml index 3618bae..ad15dde 100644 --- a/tests/xmconfigdata/test-fullvirt-net-ioemu.xml +++ b/tests/xmconfigdata/test-fullvirt-net-ioemu.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -42,5 +44,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-net-netfront.xml b/tests/xmconfigdata/test-fullvirt-net-netfront.xml index 6a2a439..4d23802 100644 --- a/tests/xmconfigdata/test-fullvirt-net-netfront.xml +++ b/tests/xmconfigdata/test-fullvirt-net-netfront.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -42,5 +44,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml index 3618bae..ad15dde 100644 --- a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml +++ b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -42,5 +44,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-old-cdrom.xml b/tests/xmconfigdata/test-fullvirt-old-cdrom.xml index 7d6014d..dd5fd3f 100644 --- a/tests/xmconfigdata/test-fullvirt-old-cdrom.xml +++ b/tests/xmconfigdata/test-fullvirt-old-cdrom.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -42,5 +44,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml index 9b1fd26..a2897f1 100644 --- a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml +++ b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -47,5 +49,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml index a64d40b..5cbca37 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -54,5 +56,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml index ce2cddb..27c29c6 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -50,5 +52,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-serial-file.xml b/tests/xmconfigdata/test-fullvirt-serial-file.xml index 36883de..092c062 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-file.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-file.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -50,5 +52,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-serial-null.xml b/tests/xmconfigdata/test-fullvirt-serial-null.xml index 982f9d6..a1394d9 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-null.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-null.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -48,5 +50,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml index 82a1d9b..321d309 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -50,5 +52,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-serial-pty.xml b/tests/xmconfigdata/test-fullvirt-serial-pty.xml index 56ccbea..05c82fe 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-pty.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-pty.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -48,5 +50,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml index e2e9330..c6c702c 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -48,5 +50,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml index d68d77c..72c169e 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -52,5 +54,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml index aa3ed5c..ab179ec 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -52,5 +54,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-serial-udp.xml b/tests/xmconfigdata/test-fullvirt-serial-udp.xml index 256c722..8c8d19a 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-udp.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-udp.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -52,5 +54,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-serial-unix.xml b/tests/xmconfigdata/test-fullvirt-serial-unix.xml index 235c8d4..0e25cac 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-unix.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-unix.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -50,5 +52,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-sound.xml b/tests/xmconfigdata/test-fullvirt-sound.xml index 1429d10..25364eb 100644 --- a/tests/xmconfigdata/test-fullvirt-sound.xml +++ b/tests/xmconfigdata/test-fullvirt-sound.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -44,5 +46,6 @@ </graphics> <sound model='sb16'/> <sound model='es1370'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.xml b/tests/xmconfigdata/test-fullvirt-usbmouse.xml index 25857f1..c7526ae 100644 --- a/tests/xmconfigdata/test-fullvirt-usbmouse.xml +++ b/tests/xmconfigdata/test-fullvirt-usbmouse.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -43,5 +45,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet-no-bus.xml b/tests/xmconfigdata/test-fullvirt-usbtablet-no-bus.xml index c82c8df..23535eb 100644 --- a/tests/xmconfigdata/test-fullvirt-usbtablet-no-bus.xml +++ b/tests/xmconfigdata/test-fullvirt-usbtablet-no-bus.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -41,5 +43,6 @@ <graphics type='vnc' port='-1' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.xml b/tests/xmconfigdata/test-fullvirt-usbtablet.xml index 31b1176..aa16eb1 100644 --- a/tests/xmconfigdata/test-fullvirt-usbtablet.xml +++ b/tests/xmconfigdata/test-fullvirt-usbtablet.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -43,5 +45,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-fullvirt-utc.xml b/tests/xmconfigdata/test-fullvirt-utc.xml index 3618bae..ad15dde 100644 --- a/tests/xmconfigdata/test-fullvirt-utc.xml +++ b/tests/xmconfigdata/test-fullvirt-utc.xml @@ -24,12 +24,14 @@ <driver name='phy'/> <source dev='/dev/HostVG/XenGuest2'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='file'/> <source file='/root/boot.iso'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:66:92:9c'/> @@ -42,5 +44,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-no-source-cdrom.xml b/tests/xmconfigdata/test-no-source-cdrom.xml index 74f1be1..a0952e8 100644 --- a/tests/xmconfigdata/test-no-source-cdrom.xml +++ b/tests/xmconfigdata/test-no-source-cdrom.xml @@ -24,11 +24,13 @@ <driver name='phy'/> <source dev='/dev/sda8'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='block' device='cdrom'> <driver name='phy'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:0a:7b:39'/> @@ -45,5 +47,6 @@ <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes'/> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-paravirt-net-e1000.xml b/tests/xmconfigdata/test-paravirt-net-e1000.xml index 3466344..0db020f 100644 --- a/tests/xmconfigdata/test-paravirt-net-e1000.xml +++ b/tests/xmconfigdata/test-paravirt-net-e1000.xml @@ -32,5 +32,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-paravirt-net-vifname.xml b/tests/xmconfigdata/test-paravirt-net-vifname.xml index 20d96aa..ff17aee 100644 --- a/tests/xmconfigdata/test-paravirt-net-vifname.xml +++ b/tests/xmconfigdata/test-paravirt-net-vifname.xml @@ -33,5 +33,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml b/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml index c02963d..ce7bfb9 100644 --- a/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml +++ b/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml @@ -31,5 +31,6 @@ <graphics type='vnc' port='5925' autoport='no' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-paravirt-new-pvfb.xml b/tests/xmconfigdata/test-paravirt-new-pvfb.xml index ee25550..cba6dff 100644 --- a/tests/xmconfigdata/test-paravirt-new-pvfb.xml +++ b/tests/xmconfigdata/test-paravirt-new-pvfb.xml @@ -31,5 +31,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml b/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml index c02963d..ce7bfb9 100644 --- a/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml +++ b/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml @@ -31,5 +31,6 @@ <graphics type='vnc' port='5925' autoport='no' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-paravirt-old-pvfb.xml b/tests/xmconfigdata/test-paravirt-old-pvfb.xml index ee25550..cba6dff 100644 --- a/tests/xmconfigdata/test-paravirt-old-pvfb.xml +++ b/tests/xmconfigdata/test-paravirt-old-pvfb.xml @@ -31,5 +31,6 @@ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-paravirt-vcpu.xml b/tests/xmconfigdata/test-paravirt-vcpu.xml index 52463d8..3b0e0ce 100644 --- a/tests/xmconfigdata/test-paravirt-vcpu.xml +++ b/tests/xmconfigdata/test-paravirt-vcpu.xml @@ -26,5 +26,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigdata/test-pci-devs.xml b/tests/xmconfigdata/test-pci-devs.xml index 1911734..bdb1e82 100644 --- a/tests/xmconfigdata/test-pci-devs.xml +++ b/tests/xmconfigdata/test-pci-devs.xml @@ -24,11 +24,13 @@ <driver name='phy'/> <source dev='/dev/sda8'/> <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='block' device='cdrom'> <driver name='phy'/> <target dev='hdc' bus='ide'/> <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <interface type='bridge'> <mac address='00:16:3e:0a:7b:39'/> @@ -55,5 +57,6 @@ <address domain='0x0000' bus='0x01' slot='0x13' function='0x0'/> </source> </hostdev> + <memballoon model='xen'/> </devices> </domain> diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index 79b09ca..804f9ee 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -120,7 +120,8 @@ testCompareFormatXML(const char *xmcfg, const char *xml, int xendConfigVersion) if (!(conf = virConfReadMem(xmcfgData, strlen(xmcfgData), 0))) goto fail; - if (!(def = xenParseXM(conf, priv.xendConfigVersion, priv.caps))) + if (!(def = xenParseXM(conf, priv.xendConfigVersion, + caps, xmlopt))) goto fail; if (!(gotxml = virDomainDefFormat(def, VIR_DOMAIN_DEF_FORMAT_SECURE))) -- 2.6.3

On 04/12/15 20:30, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> ---
Don't forget the commit message :) Otherwise looks fine, ACK after release. Erik

Only 'tsc' timer allows set mode and track is valid only for 'rtc' and 'platform' timers. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/xenconfig/xen_common.c | 2 ++ src/xenconfig/xen_sxpr.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 0890c73..ed6978f 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -553,6 +553,8 @@ xenParseCPUFeatures(virConfPtr conf, virDomainDefPtr def) timer->name = VIR_DOMAIN_TIMER_NAME_HPET; timer->present = val; timer->tickpolicy = -1; + timer->mode = -1; + timer->track = -1; def->clock.ntimers = 1; def->clock.timers[0] = timer; diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c index f9a3187..09989ac 100644 --- a/src/xenconfig/xen_sxpr.c +++ b/src/xenconfig/xen_sxpr.c @@ -1262,6 +1262,8 @@ xenParseSxpr(const struct sexpr *root, timer->name = VIR_DOMAIN_TIMER_NAME_HPET; timer->present = sexpr_int(root, "domain/image/hvm/hpet"); timer->tickpolicy = -1; + timer->mode = -1; + timer->track = -1; def->clock.ntimers = 1; def->clock.timers[0] = timer; -- 2.6.3

On 04/12/15 20:30, Pavel Hrdina wrote:
Only 'tsc' timer allows set mode and track is valid only for 'rtc' and 'platform' timers.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/xenconfig/xen_common.c | 2 ++ src/xenconfig/xen_sxpr.c | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 0890c73..ed6978f 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -553,6 +553,8 @@ xenParseCPUFeatures(virConfPtr conf, virDomainDefPtr def) timer->name = VIR_DOMAIN_TIMER_NAME_HPET; timer->present = val; timer->tickpolicy = -1; + timer->mode = -1; + timer->track = -1;
def->clock.ntimers = 1; def->clock.timers[0] = timer; diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c index f9a3187..09989ac 100644 --- a/src/xenconfig/xen_sxpr.c +++ b/src/xenconfig/xen_sxpr.c @@ -1262,6 +1262,8 @@ xenParseSxpr(const struct sexpr *root, timer->name = VIR_DOMAIN_TIMER_NAME_HPET; timer->present = sexpr_int(root, "domain/image/hvm/hpet"); timer->tickpolicy = -1; + timer->mode = -1; + timer->track = -1;
def->clock.ntimers = 1; def->clock.timers[0] = timer;
ACK after release. Erik

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/libxl/libxl_domain.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index ef92974..9551f2e 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -995,6 +995,10 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm, VIR_FREE(managed_save_path); } + if (virDomainObjSetDefTransient(cfg->caps, driver->xmlopt, + vm, true) < 0) + goto cleanup; + if (libxlBuildDomainConfig(driver->reservedGraphicsPorts, vm->def, cfg->ctx, &d_config) < 0) goto cleanup; -- 2.6.3

On 04/12/15 20:30, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> ---
commit message again, also the subject says "copy", but copy where, "save persistent domain" might be better wording I think.
src/libxl/libxl_domain.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index ef92974..9551f2e 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -995,6 +995,10 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm, VIR_FREE(managed_save_path); }
+ if (virDomainObjSetDefTransient(cfg->caps, driver->xmlopt, + vm, true) < 0) + goto cleanup; + if (libxlBuildDomainConfig(driver->reservedGraphicsPorts, vm->def, cfg->ctx, &d_config) < 0) goto cleanup;
ACK with those adjustments mentioned above. Erik

The current code was a little bit odd. At first we've removed all possible implicit input devices from domain definition to add them later back if there was any graphics device defined while parsing XML description. That's not all, while formating domain definition to XML description we at first ignore any input devices with bus different to USB and VIRTIO and few lines later we add implicit input devices to XML. This seems to me as a lot of code for nothing. This patch could seems to be more complicated than original approach, but this is a preferred way to modify/add driver specific staff only in those drivers and not deal with them in common parsing/formating functions. The update is to add those implicit input devices only into running XML and don't put them automatically to offline XML. In addition we won't remove any input devices specified by user. There was also inconsistence between our behavior and QEMU's in the way, that in QEMU there is no way how to disable those implicit input devices and they are available always, even without graphics device. This applies also to XEN hypervisor. VZ driver already does its part by putting correct implicit devices into live XML. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/Makefile.am | 2 +- src/conf/domain_conf.c | 77 +--------------------- src/libxl/libxl_domain.c | 4 ++ src/qemu/qemu_domain.c | 19 ++++++ src/qemu/qemu_domain.h | 1 + src/qemu/qemu_process.c | 3 + src/xen/xend_internal.c | 10 +++ src/xenapi/xenapi_driver.c | 8 +++ src/xenconfig/xen_common.c | 22 +++++++ src/xenconfig/xen_common.h | 2 + .../qemuxml2argv-graphics-listen-network.xml | 2 - .../qemuxml2argv-graphics-listen-network2.xml | 2 - .../qemuxml2argv-graphics-sdl-fullscreen.xml | 2 - .../qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml | 2 - ...qemuxml2argv-graphics-spice-agent-file-xfer.xml | 1 - .../qemuxml2argv-graphics-spice-compression.xml | 2 - .../qemuxml2argv-graphics-spice-listen-network.xml | 1 - .../qemuxml2argv-graphics-spice-qxl-vga.xml | 2 - .../qemuxml2argv-graphics-spice-sasl.xml | 1 - .../qemuxml2argv-graphics-spice-timeout.xml | 2 - .../qemuxml2argv-graphics-spice.xml | 2 - .../qemuxml2argv-graphics-vnc-policy.xml | 2 - .../qemuxml2argv-graphics-vnc-sasl.xml | 2 - .../qemuxml2argv-graphics-vnc-socket.xml | 2 - .../qemuxml2argv-graphics-vnc-tls.xml | 2 - .../qemuxml2argv-graphics-vnc-websocket.xml | 2 - .../qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml | 2 - .../qemuxml2argv-pci-autoadd-addr.xml | 1 - .../qemuxml2argv-pci-autoadd-idx.xml | 1 - .../qemuxml2xmlout-graphics-listen-network2.xml | 2 - .../qemuxml2xmlout-graphics-spice-timeout.xml | 2 - tests/sexpr2xmldata/sexpr2xml-curmem.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 2 - .../sexpr2xml-fv-serial-dev-2-ports.xml | 2 - .../sexpr2xml-fv-serial-dev-2nd-port.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 2 - .../sexpr2xml-fv-serial-tcp-telnet.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 2 - tests/sexpr2xmldata/sexpr2xml-fv.xml | 2 - tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 2 - .../sexpr2xml-pv-vfb-new-vncdisplay.xml | 2 - tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml | 2 - tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml | 2 - .../sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml | 2 - tests/vmx2xmldata/vmx2xml-graphics-vnc.xml | 2 - .../test-fullvirt-direct-kernel-boot.xml | 2 - tests/xlconfigdata/test-fullvirt-multiusb.xml | 2 - tests/xlconfigdata/test-new-disk.xml | 2 - tests/xlconfigdata/test-spice-features.xml | 2 - tests/xlconfigdata/test-spice.xml | 2 - tests/xmconfigdata/test-escape-paths.xml | 2 - .../xmconfigdata/test-fullvirt-default-feature.xml | 2 - tests/xmconfigdata/test-fullvirt-force-hpet.xml | 2 - tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 2 - tests/xmconfigdata/test-fullvirt-localtime.xml | 2 - tests/xmconfigdata/test-fullvirt-net-ioemu.xml | 2 - tests/xmconfigdata/test-fullvirt-net-netfront.xml | 2 - tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 2 - tests/xmconfigdata/test-fullvirt-old-cdrom.xml | 2 - tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 2 - .../test-fullvirt-serial-dev-2-ports.xml | 2 - .../test-fullvirt-serial-dev-2nd-port.xml | 2 - tests/xmconfigdata/test-fullvirt-serial-file.xml | 2 - tests/xmconfigdata/test-fullvirt-serial-null.xml | 2 - tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 2 - tests/xmconfigdata/test-fullvirt-serial-pty.xml | 2 - tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 2 - .../test-fullvirt-serial-tcp-telnet.xml | 2 - tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 2 - tests/xmconfigdata/test-fullvirt-serial-udp.xml | 2 - tests/xmconfigdata/test-fullvirt-serial-unix.xml | 2 - tests/xmconfigdata/test-fullvirt-sound.xml | 2 - tests/xmconfigdata/test-fullvirt-usbmouse.xml | 2 - .../test-fullvirt-usbtablet-no-bus.xml | 1 - tests/xmconfigdata/test-fullvirt-usbtablet.xml | 2 - tests/xmconfigdata/test-fullvirt-utc.xml | 2 - tests/xmconfigdata/test-no-source-cdrom.xml | 2 - tests/xmconfigdata/test-paravirt-net-e1000.xml | 2 - tests/xmconfigdata/test-paravirt-net-vifname.xml | 2 - .../test-paravirt-new-pvfb-vncdisplay.xml | 2 - tests/xmconfigdata/test-paravirt-new-pvfb.xml | 2 - .../test-paravirt-old-pvfb-vncdisplay.xml | 2 - tests/xmconfigdata/test-paravirt-old-pvfb.xml | 2 - tests/xmconfigdata/test-pci-devs.xml | 2 - 103 files changed, 73 insertions(+), 255 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 7219f7c..efb0e72 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1210,7 +1210,7 @@ libvirt_driver_xen_impl_la_CFLAGS = \ -I$(srcdir)/xenconfig \ $(AM_CFLAGS) libvirt_driver_xen_impl_la_LDFLAGS = $(AM_LDFLAGS) -libvirt_driver_xen_impl_la_LIBADD = $(XEN_LIBS) +libvirt_driver_xen_impl_la_LIBADD = $(XEN_LIBS) libvirt_xenconfig.la libvirt_driver_xen_impl_la_SOURCES = $(XEN_DRIVER_SOURCES) endif WITH_XEN diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2f5c0ed..2812e8d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15804,27 +15804,6 @@ virDomainDefParseXML(xmlDocPtr xml, goto error; } - /* With QEMU / KVM / Xen graphics, mouse + PS/2 is implicit - * with graphics, so don't store it. - * XXX will this be true for other virt types ? */ - if ((def->os.type == VIR_DOMAIN_OSTYPE_HVM && - input->bus == VIR_DOMAIN_INPUT_BUS_PS2 && - (input->type == VIR_DOMAIN_INPUT_TYPE_MOUSE || - input->type == VIR_DOMAIN_INPUT_TYPE_KBD)) || - (def->os.type == VIR_DOMAIN_OSTYPE_XEN && - input->bus == VIR_DOMAIN_INPUT_BUS_XEN && - (input->type == VIR_DOMAIN_INPUT_TYPE_MOUSE || - input->type == VIR_DOMAIN_INPUT_TYPE_KBD)) || - (def->os.type == VIR_DOMAIN_OSTYPE_EXE && - (def->virtType == VIR_DOMAIN_VIRT_VZ || - def->virtType == VIR_DOMAIN_VIRT_PARALLELS) && - input->bus == VIR_DOMAIN_INPUT_BUS_PARALLELS && - (input->type == VIR_DOMAIN_INPUT_TYPE_MOUSE || - input->type == VIR_DOMAIN_INPUT_TYPE_KBD))) { - virDomainInputDefFree(input); - continue; - } - def->inputs[def->ninputs++] = input; } VIR_FREE(nodes); @@ -15845,29 +15824,6 @@ virDomainDefParseXML(xmlDocPtr xml, } VIR_FREE(nodes); - /* If graphics are enabled, there's an implicit PS2 mouse */ - if (def->ngraphics > 0 && - (ARCH_IS_X86(def->os.arch) || def->os.arch == VIR_ARCH_NONE)) { - int input_bus = VIR_DOMAIN_INPUT_BUS_XEN; - - if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) - input_bus = VIR_DOMAIN_INPUT_BUS_PS2; - if (def->os.type == VIR_DOMAIN_OSTYPE_EXE && - (def->virtType == VIR_DOMAIN_VIRT_VZ || - def->virtType == VIR_DOMAIN_VIRT_PARALLELS)) - input_bus = VIR_DOMAIN_INPUT_BUS_PARALLELS; - - if (virDomainDefMaybeAddInput(def, - VIR_DOMAIN_INPUT_TYPE_MOUSE, - input_bus) < 0) - goto error; - - if (virDomainDefMaybeAddInput(def, - VIR_DOMAIN_INPUT_TYPE_KBD, - input_bus) < 0) - goto error; - } - /* analysis of the sound devices */ if ((n = virXPathNodeSet("./devices/sound", ctxt, &nodes)) < 0) goto error; @@ -22086,11 +22042,10 @@ virDomainDefFormatInternal(virDomainDefPtr def, if (virDomainChrDefFormat(buf, def->channels[n], flags) < 0) goto error; - for (n = 0; n < def->ninputs; n++) - if ((def->inputs[n]->bus == VIR_DOMAIN_INPUT_BUS_USB || - def->inputs[n]->bus == VIR_DOMAIN_INPUT_BUS_VIRTIO) && - virDomainInputDefFormat(buf, def->inputs[n], flags) < 0) + for (n = 0; n < def->ninputs; n++) { + if (virDomainInputDefFormat(buf, def->inputs[n], flags) < 0) goto error; + } if (def->tpm) { if (virDomainTPMDefFormat(buf, def->tpm, flags) < 0) @@ -22098,32 +22053,6 @@ virDomainDefFormatInternal(virDomainDefPtr def, } if (def->ngraphics > 0) { - /* If graphics is enabled, add the implicit mouse/keyboard */ - if ((ARCH_IS_X86(def->os.arch)) || def->os.arch == VIR_ARCH_NONE) { - virDomainInputDef autoInput = { - .type = VIR_DOMAIN_INPUT_TYPE_MOUSE, - .info = { .alias = NULL }, - }; - - if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) - autoInput.bus = VIR_DOMAIN_INPUT_BUS_PS2; - else if (def->os.type == VIR_DOMAIN_OSTYPE_EXE && - (def->virtType == VIR_DOMAIN_VIRT_VZ || - def->virtType == VIR_DOMAIN_VIRT_PARALLELS)) - autoInput.bus = VIR_DOMAIN_INPUT_BUS_PARALLELS; - else - autoInput.bus = VIR_DOMAIN_INPUT_BUS_XEN; - - if (virDomainInputDefFormat(buf, &autoInput, flags) < 0) - goto error; - - if (!(flags & VIR_DOMAIN_DEF_FORMAT_MIGRATABLE)) { - autoInput.type = VIR_DOMAIN_INPUT_TYPE_KBD; - if (virDomainInputDefFormat(buf, &autoInput, flags) < 0) - goto error; - } - } - for (n = 0; n < def->ngraphics; n++) if (virDomainGraphicsDefFormat(buf, def->graphics[n], flags) < 0) goto error; diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 9551f2e..8625996 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -35,6 +35,7 @@ #include "virstring.h" #include "virtime.h" #include "locking/domain_lock.h" +#include "xenconfig/xen_common.h" #define VIR_FROM_THIS VIR_FROM_LIBXL @@ -1010,6 +1011,9 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm, vm->def, VIR_HOSTDEV_SP_PCI) < 0) goto cleanup; + if (xenDomainDefAddImplicitInputDevice(vm->def) < 0) + goto cleanup; + if (virDomainLockProcessStart(driver->lockManager, "xen:///system", vm, diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index a872598..736624e 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3883,6 +3883,25 @@ qemuDomainDefValidateMemoryHotplug(const virDomainDef *def, } +int +qemuDomainDefAddImplicitInputDevice(virDomainDef *def) +{ + if (ARCH_IS_X86(def->os.arch)) { + if (virDomainDefMaybeAddInput(def, + VIR_DOMAIN_INPUT_TYPE_MOUSE, + VIR_DOMAIN_INPUT_BUS_PS2) < 0) + return -1; + + if (virDomainDefMaybeAddInput(def, + VIR_DOMAIN_INPUT_TYPE_KBD, + VIR_DOMAIN_INPUT_BUS_PS2) < 0) + return -1; + } + + return 0; +} + + bool qemuDomainMachineHasBuiltinIDE(const virDomainDef *def) { diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 14892fd..7f83d3c 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -503,5 +503,6 @@ bool qemuDomainRequiresMlock(virDomainDefPtr def); int qemuDomainDefValidateMemoryHotplug(const virDomainDef *def, virQEMUCapsPtr qemuCaps, const virDomainMemoryDef *mem); +int qemuDomainDefAddImplicitInputDevice(virDomainDef *def); #endif /* __QEMU_DOMAIN_H__ */ diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 4201962..f895667 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4663,6 +4663,9 @@ qemuProcessLaunch(virConnectPtr conn, if (!qemuValidateCpuMax(vm->def, priv->qemuCaps)) goto cleanup; + if (qemuDomainDefAddImplicitInputDevice(vm->def) < 0) + goto cleanup; + if (qemuAssignDeviceAliases(vm->def, priv->qemuCaps) < 0) goto cleanup; diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index 21d99e3..e3d10fd 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -57,6 +57,7 @@ #include "viruri.h" #include "device_conf.h" #include "virstring.h" +#include "src/xenconfig/xen_common.h" /* required for cpumap_t */ #include <xen/dom0_ops.h> @@ -1574,6 +1575,7 @@ xenDaemonDomainFetch(virConnectPtr conn, int domid, const char *name, int id; char * tty; int vncport; + int state; if (name) root = sexpr_get(conn, "/xend/domain/%s?detail=1", name); @@ -1598,6 +1600,14 @@ xenDaemonDomainFetch(virConnectPtr conn, int domid, const char *name, vncport))) goto cleanup; + state = sexpr_to_xend_domain_state(def, root); + if (state == VIR_DOMAIN_RUNNING && + xenDomainDefAddImplicitInputDevice(def) < 0) { + virObjectUnref(def); + def = NULL; + goto cleanup; + } + cleanup: sexpr_free(root); diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index e503974..629e482 100644 --- a/src/xenapi/xenapi_driver.c +++ b/src/xenapi/xenapi_driver.c @@ -39,6 +39,7 @@ #include "xenapi_driver_private.h" #include "xenapi_utils.h" #include "virstring.h" +#include "src/xenconfig/xen_common.h" #define VIR_FROM_THIS VIR_FROM_XENAPI @@ -1404,6 +1405,7 @@ xenapiDomainGetXMLDesc(virDomainPtr dom, unsigned int flags) struct xen_vif_set *vif_set = NULL; char *xml; unsigned int vcpus; + enum xen_vm_power_state powerState = XEN_VM_POWER_STATE_UNDEFINED; /* Flags checked by virDomainDefFormat */ @@ -1569,6 +1571,12 @@ xenapiDomainGetXMLDesc(virDomainPtr dom, unsigned int flags) } xen_vif_set_free(vif_set); } + + xen_vm_get_power_state(session, &powerState, vm); + if (mapPowerState(powerState) == VIR_DOMAIN_RUNNING && + xenDomainDefAddImplicitInputDevice(defPtr) < 0) + goto error; + xen_vm_set_free(vms); xml = virDomainDefFormat(defPtr, flags); virDomainDefFree(defPtr); diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index ed6978f..ba1f8ed 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -1863,3 +1863,25 @@ xenFormatConfigCommon(virConfPtr conf, return 0; } + + +int +xenDomainDefAddImplicitInputDevice(virDomainDefPtr def) +{ + virDomainInputBus implicitInputBus = VIR_DOMAIN_INPUT_BUS_XEN; + + if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) + implicitInputBus = VIR_DOMAIN_INPUT_BUS_PS2; + + if (virDomainDefMaybeAddInput(def, + VIR_DOMAIN_INPUT_TYPE_MOUSE, + implicitInputBus) < 0) + return -1; + + if (virDomainDefMaybeAddInput(def, + VIR_DOMAIN_INPUT_TYPE_KBD, + implicitInputBus) < 0) + return -1; + + return 0; +} diff --git a/src/xenconfig/xen_common.h b/src/xenconfig/xen_common.h index 0116703..0207cf7 100644 --- a/src/xenconfig/xen_common.h +++ b/src/xenconfig/xen_common.h @@ -62,4 +62,6 @@ int xenFormatConfigCommon(virConfPtr conf, virConnectPtr conn, int xendConfigVersion); +int xenDomainDefAddImplicitInputDevice(virDomainDefPtr def); + #endif /* __VIR_XEN_COMMON_H__ */ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml index bf78ca8..0ec2457 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml @@ -22,8 +22,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no'> <listen type='network' network='Bobsnetwork'/> </graphics> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network2.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network2.xml index 62353e9..1208045 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network2.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network2.xml @@ -21,8 +21,6 @@ </disk> <controller type='usb' index='0'/> <controller type='ide' index='0'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' listen='1.2.3.4' autoport='yes'> <listen type='address' address='1.2.3.4'/> <listen type='network' network='Bobsnetwork'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml index 1bac0b5..1a4b436 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml @@ -23,8 +23,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='sdl' display=':0.1' xauth='/root/.Xauthority' fullscreen='yes'/> <video> <model type='cirrus' vram='16384' heads='1'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml index 5f94052..3391268 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml @@ -23,8 +23,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='sdl' display=':0.1' xauth='/root/.Xauthority'/> <video> <model type='vga' vram='16384' heads='1'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-agent-file-xfer.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-agent-file-xfer.xml index 3a3e366..cb2e444 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-agent-file-xfer.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-agent-file-xfer.xml @@ -22,7 +22,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> <channel name='main' mode='secure'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml index c13327a..a4d9f9a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml @@ -22,8 +22,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> <image compression='auto_glz'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-listen-network.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-listen-network.xml index 34971fe..75d4717 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-listen-network.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-listen-network.xml @@ -22,7 +22,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> <graphics autoport='yes' connected='disconnect' keymap='en-us' passwd='password' passwdValidTo='2013-06-20T01:34:37' port='5900' tlsPort='5901' type='spice'> <listen address='10.65.210.231' network='vdsm-rhevm' type='network'/> <channel mode='secure' name='main'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml index ac705f3..b0f4ce8 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml @@ -22,8 +22,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> <channel name='main' mode='secure'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-sasl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-sasl.xml index d86cd56..248c6fd 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-sasl.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-sasl.xml @@ -23,7 +23,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1' defaultMode='secure'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml index bfb189c..5060600 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml @@ -70,8 +70,6 @@ <target type='serial' port='0'/> </console> <input type='tablet' bus='usb'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='spice' port='5900' autoport='no' passwd='sercet' passwdValidTo='2011-05-31T16:11:22' connected='disconnect'/> <sound model='ac97'> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml index 0c61ee5..a9bb101 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml @@ -22,8 +22,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1' defaultMode='secure'> <listen type='address' address='127.0.0.1'/> <channel name='main' mode='secure'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml index 1c76ddc..44b254d 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml @@ -23,8 +23,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='65530' autoport='no' listen='::' sharePolicy='allow-exclusive'> <listen type='address' address='::'/> </graphics> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml index e350142..35a39c8 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml @@ -23,8 +23,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml index de70bc4..78b92dc 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml @@ -23,8 +23,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' socket='/tmp/foo.socket'/> <video> <model type='cirrus' vram='16384' heads='1'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml index e350142..35a39c8 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml @@ -23,8 +23,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml index afa4b5a..989dc99 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml @@ -16,8 +16,6 @@ <emulator>/usr/bin/qemu</emulator> <controller type='usb' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5900' autoport='no' websocket='5700' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml index 3313469..6e69e2d 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml @@ -23,8 +23,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' listen='2001:1:2:3:4:5:1234:1234'> <listen type='address' address='2001:1:2:3:4:5:1234:1234'/> </graphics> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-addr.xml b/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-addr.xml index f8b0fc7..b60c0ae 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-addr.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-addr.xml @@ -32,7 +32,6 @@ <controller type='ide' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> - <input type='mouse' bus='ps2'/> <video> <model type='cirrus' vram='16384' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-idx.xml b/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-idx.xml index db2fee9..267c37c 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-idx.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-autoadd-idx.xml @@ -33,7 +33,6 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='pci' index='8' model='pci-bridge'/> - <input type='mouse' bus='ps2'/> <video> <model type='cirrus' vram='16384' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml index abee7b6..1676d48 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml @@ -22,8 +22,6 @@ <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='1.2.3.4'> <listen type='address' address='1.2.3.4'/> <listen type='network' network='Bobsnetwork'/> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml index 4f4f47c..c819590 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml @@ -73,8 +73,6 @@ <target type='serial' port='0'/> </console> <input type='tablet' bus='usb'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='spice' port='5900' autoport='no' passwd='sercet' passwdValidTo='2011-05-31T16:11:22' connected='disconnect'/> <sound model='ac97'> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> diff --git a/tests/sexpr2xmldata/sexpr2xml-curmem.xml b/tests/sexpr2xmldata/sexpr2xml-curmem.xml index 4ac263e..e23815b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-curmem.xml +++ b/tests/sexpr2xmldata/sexpr2xml-curmem.xml @@ -31,8 +31,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml index 17e723e..9cce35f 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml @@ -46,8 +46,6 @@ <target type='serial' port='0'/> </console> <input type='tablet' bus='usb'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5925' autoport='yes' keymap='en-us'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml index 9494ec2..8fdcabd 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <target dev='vif3.0'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml index af1303b..d09805b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml @@ -42,8 +42,6 @@ <target dev='vif1.0'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml index 406f3ed..0b9cfef 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml @@ -42,8 +42,6 @@ <target dev='vif1.0'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml index bc2ccec..e2958d2 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <target dev='vif3.0'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml b/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml index ec75365..7b1a44e 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml @@ -40,8 +40,6 @@ <target dev='vif3.0'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml index f92ea4b..e2224af 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml @@ -40,8 +40,6 @@ <target dev='vif3.0'/> <model type='netfront'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml index 3bc6490..03fccc8 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml @@ -44,8 +44,6 @@ <protocol type='raw'/> <target port='0'/> </parallel> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml index d1b5134..7a46081 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml @@ -51,8 +51,6 @@ <source path='/dev/ttyS0'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml index 1c5a047..8024d31 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml @@ -47,8 +47,6 @@ <source path='/dev/ttyS1'/> <target type='serial' port='1'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml index 680528e..1ce3540 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml @@ -47,8 +47,6 @@ <source path='/tmp/serial.log'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml index 1a7f866..08f3eee 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml @@ -45,8 +45,6 @@ <console type='null'> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml index b15a1bc..ad23dce 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml @@ -47,8 +47,6 @@ <source path='/tmp/serial.pipe'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml index e827f1d..b8c2a4b 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml @@ -45,8 +45,6 @@ <console type='pty'> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml index 3d79428..2facd90 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml @@ -45,8 +45,6 @@ <console type='stdio'> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml index 7dec0c8..0ac0ce2 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml @@ -49,8 +49,6 @@ <protocol type='telnet'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml index 4f4b89b..084422a 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml @@ -49,8 +49,6 @@ <protocol type='raw'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml index cf1fc3b..d76b88e 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml @@ -49,8 +49,6 @@ <source mode='connect' host='localhost' service='9998'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml index a1d15f5..5e60d87 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml @@ -47,8 +47,6 @@ <source mode='bind' path='/tmp/serial.sock'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5901' autoport='no'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml index 4311b0c..ebadced 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <target dev='vif3.0'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> <sound model='sb16'/> <sound model='es1370'/> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml index 4311b0c..ebadced 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <target dev='vif3.0'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> <sound model='sb16'/> <sound model='es1370'/> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml index 103cfbe..b0e76ae 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml @@ -40,8 +40,6 @@ <target dev='vif3.0'/> </interface> <input type='mouse' bus='usb'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml index 728e852..ed83db6 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml @@ -40,8 +40,6 @@ <target dev='vif3.0'/> </interface> <input type='tablet' bus='usb'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml index 7899baa..6933c59 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <target dev='vif3.0'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml index af5fbe1..451a693 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <target dev='vif3.0'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' keymap='ja'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-fv.xml b/tests/sexpr2xmldata/sexpr2xml-fv.xml index 7899baa..6933c59 100644 --- a/tests/sexpr2xmldata/sexpr2xml-fv.xml +++ b/tests/sexpr2xmldata/sexpr2xml-fv.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <target dev='vif3.0'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='ja'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml index 384ff8b..5e9ce30 100644 --- a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml +++ b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml @@ -44,8 +44,6 @@ <console type='pty'> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml index eacfc97..092b2f4 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml @@ -24,8 +24,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> <graphics type='vnc' port='5925' autoport='no' listen='0.0.0.0' keymap='ja'> <listen type='address' address='0.0.0.0'/> </graphics> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml index f5b80c8..6a308d4 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml @@ -24,8 +24,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='ja'> <listen type='address' address='0.0.0.0'/> </graphics> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml index f5b80c8..6a308d4 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml @@ -24,8 +24,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='ja'> <listen type='address' address='0.0.0.0'/> </graphics> diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml index 0aebf20..343ebf6 100644 --- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml +++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml @@ -29,8 +29,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> diff --git a/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml b/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml index a9122be..9fee026 100644 --- a/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml +++ b/tests/vmx2xmldata/vmx2xml-graphics-vnc.xml @@ -11,8 +11,6 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5903' autoport='no' keymap='de' passwd='password'/> <video> <model type='vmvga' vram='4096'/> diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml index d59aa21..9a24645 100644 --- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml +++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml @@ -42,8 +42,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xlconfigdata/test-fullvirt-multiusb.xml b/tests/xlconfigdata/test-fullvirt-multiusb.xml index 0e6d0b6..3f868c9 100644 --- a/tests/xlconfigdata/test-fullvirt-multiusb.xml +++ b/tests/xlconfigdata/test-fullvirt-multiusb.xml @@ -41,8 +41,6 @@ </interface> <input type='mouse' bus='usb'/> <input type='tablet' bus='usb'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xlconfigdata/test-new-disk.xml b/tests/xlconfigdata/test-new-disk.xml index 718a2da..b4e6af2 100644 --- a/tests/xlconfigdata/test-new-disk.xml +++ b/tests/xlconfigdata/test-new-disk.xml @@ -45,8 +45,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xlconfigdata/test-spice-features.xml b/tests/xlconfigdata/test-spice-features.xml index 3160c2b..9223a32 100644 --- a/tests/xlconfigdata/test-spice-features.xml +++ b/tests/xlconfigdata/test-spice-features.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='spice' port='590' tlsPort='500' autoport='no' listen='127.0.0.1' passwd='thebeast'> <listen type='address' address='127.0.0.1'/> <mouse mode='client'/> diff --git a/tests/xlconfigdata/test-spice.xml b/tests/xlconfigdata/test-spice.xml index 30415fb..f0a0f15 100644 --- a/tests/xlconfigdata/test-spice.xml +++ b/tests/xlconfigdata/test-spice.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='spice' port='590' tlsPort='500' autoport='no' listen='127.0.0.1' passwd='thebeast'> <listen type='address' address='127.0.0.1'/> <mouse mode='server'/> diff --git a/tests/xmconfigdata/test-escape-paths.xml b/tests/xmconfigdata/test-escape-paths.xml index d2ec843..73fcd88 100644 --- a/tests/xmconfigdata/test-escape-paths.xml +++ b/tests/xmconfigdata/test-escape-paths.xml @@ -45,8 +45,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-default-feature.xml b/tests/xmconfigdata/test-fullvirt-default-feature.xml index 06ad44e..2b79c64 100644 --- a/tests/xmconfigdata/test-fullvirt-default-feature.xml +++ b/tests/xmconfigdata/test-fullvirt-default-feature.xml @@ -41,8 +41,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-force-hpet.xml b/tests/xmconfigdata/test-fullvirt-force-hpet.xml index 06ad44e..2b79c64 100644 --- a/tests/xmconfigdata/test-fullvirt-force-hpet.xml +++ b/tests/xmconfigdata/test-fullvirt-force-hpet.xml @@ -41,8 +41,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml index 148c372..cb340e0 100644 --- a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml +++ b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml @@ -41,8 +41,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-localtime.xml b/tests/xmconfigdata/test-fullvirt-localtime.xml index 5db392c..c393fb6 100644 --- a/tests/xmconfigdata/test-fullvirt-localtime.xml +++ b/tests/xmconfigdata/test-fullvirt-localtime.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-net-ioemu.xml b/tests/xmconfigdata/test-fullvirt-net-ioemu.xml index ad15dde..6e69847 100644 --- a/tests/xmconfigdata/test-fullvirt-net-ioemu.xml +++ b/tests/xmconfigdata/test-fullvirt-net-ioemu.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-net-netfront.xml b/tests/xmconfigdata/test-fullvirt-net-netfront.xml index 4d23802..0e73087 100644 --- a/tests/xmconfigdata/test-fullvirt-net-netfront.xml +++ b/tests/xmconfigdata/test-fullvirt-net-netfront.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <model type='netfront'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml index ad15dde..6e69847 100644 --- a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml +++ b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-old-cdrom.xml b/tests/xmconfigdata/test-fullvirt-old-cdrom.xml index dd5fd3f..38e4e1a 100644 --- a/tests/xmconfigdata/test-fullvirt-old-cdrom.xml +++ b/tests/xmconfigdata/test-fullvirt-old-cdrom.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml index a2897f1..2aeeeb5 100644 --- a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml +++ b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml @@ -44,8 +44,6 @@ <protocol type='raw'/> <target port='0'/> </parallel> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml index 5cbca37..0d29e79 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml @@ -51,8 +51,6 @@ <source path='/dev/ttyS0'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml index 27c29c6..1d75025 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml @@ -47,8 +47,6 @@ <source path='/dev/ttyS1'/> <target type='serial' port='1'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-serial-file.xml b/tests/xmconfigdata/test-fullvirt-serial-file.xml index 092c062..b2adeab 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-file.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-file.xml @@ -47,8 +47,6 @@ <source path='/tmp/serial.log'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-serial-null.xml b/tests/xmconfigdata/test-fullvirt-serial-null.xml index a1394d9..a6d8afd 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-null.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-null.xml @@ -45,8 +45,6 @@ <console type='null'> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml index 321d309..3f09856 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml @@ -47,8 +47,6 @@ <source path='/tmp/serial.pipe'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-serial-pty.xml b/tests/xmconfigdata/test-fullvirt-serial-pty.xml index 05c82fe..f3c4c46 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-pty.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-pty.xml @@ -45,8 +45,6 @@ <console type='pty'> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml index c6c702c..af662d1 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml @@ -45,8 +45,6 @@ <console type='stdio'> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml index 72c169e..a0f5be1 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml @@ -49,8 +49,6 @@ <protocol type='telnet'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml index ab179ec..17ba832 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml @@ -49,8 +49,6 @@ <protocol type='raw'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-serial-udp.xml b/tests/xmconfigdata/test-fullvirt-serial-udp.xml index 8c8d19a..884e7b9 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-udp.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-udp.xml @@ -49,8 +49,6 @@ <source mode='connect' host='127.0.0.1' service='9999'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-serial-unix.xml b/tests/xmconfigdata/test-fullvirt-serial-unix.xml index 0e25cac..ebc7836 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-unix.xml +++ b/tests/xmconfigdata/test-fullvirt-serial-unix.xml @@ -47,8 +47,6 @@ <source mode='bind' path='/tmp/serial.sock'/> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-sound.xml b/tests/xmconfigdata/test-fullvirt-sound.xml index 25364eb..cd066cd 100644 --- a/tests/xmconfigdata/test-fullvirt-sound.xml +++ b/tests/xmconfigdata/test-fullvirt-sound.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.xml b/tests/xmconfigdata/test-fullvirt-usbmouse.xml index c7526ae..a2abfde 100644 --- a/tests/xmconfigdata/test-fullvirt-usbmouse.xml +++ b/tests/xmconfigdata/test-fullvirt-usbmouse.xml @@ -40,8 +40,6 @@ <model type='e1000'/> </interface> <input type='mouse' bus='usb'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet-no-bus.xml b/tests/xmconfigdata/test-fullvirt-usbtablet-no-bus.xml index 23535eb..8c89f98 100644 --- a/tests/xmconfigdata/test-fullvirt-usbtablet-no-bus.xml +++ b/tests/xmconfigdata/test-fullvirt-usbtablet-no-bus.xml @@ -39,7 +39,6 @@ <script path='vif-bridge'/> </interface> <input type='tablet'/> - <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.xml b/tests/xmconfigdata/test-fullvirt-usbtablet.xml index aa16eb1..062fd52 100644 --- a/tests/xmconfigdata/test-fullvirt-usbtablet.xml +++ b/tests/xmconfigdata/test-fullvirt-usbtablet.xml @@ -40,8 +40,6 @@ <model type='e1000'/> </interface> <input type='tablet' bus='usb'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-fullvirt-utc.xml b/tests/xmconfigdata/test-fullvirt-utc.xml index ad15dde..6e69847 100644 --- a/tests/xmconfigdata/test-fullvirt-utc.xml +++ b/tests/xmconfigdata/test-fullvirt-utc.xml @@ -39,8 +39,6 @@ <script path='vif-bridge'/> <model type='e1000'/> </interface> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-no-source-cdrom.xml b/tests/xmconfigdata/test-no-source-cdrom.xml index a0952e8..85636ea 100644 --- a/tests/xmconfigdata/test-no-source-cdrom.xml +++ b/tests/xmconfigdata/test-no-source-cdrom.xml @@ -44,8 +44,6 @@ <console type='pty'> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes'/> <memballoon model='xen'/> </devices> diff --git a/tests/xmconfigdata/test-paravirt-net-e1000.xml b/tests/xmconfigdata/test-paravirt-net-e1000.xml index 0db020f..cc8faa6 100644 --- a/tests/xmconfigdata/test-paravirt-net-e1000.xml +++ b/tests/xmconfigdata/test-paravirt-net-e1000.xml @@ -27,8 +27,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-paravirt-net-vifname.xml b/tests/xmconfigdata/test-paravirt-net-vifname.xml index ff17aee..afffb51 100644 --- a/tests/xmconfigdata/test-paravirt-net-vifname.xml +++ b/tests/xmconfigdata/test-paravirt-net-vifname.xml @@ -28,8 +28,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml b/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml index ce7bfb9..92bfe45 100644 --- a/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml +++ b/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml @@ -26,8 +26,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> <graphics type='vnc' port='5925' autoport='no' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-paravirt-new-pvfb.xml b/tests/xmconfigdata/test-paravirt-new-pvfb.xml index cba6dff..a2437b2 100644 --- a/tests/xmconfigdata/test-paravirt-new-pvfb.xml +++ b/tests/xmconfigdata/test-paravirt-new-pvfb.xml @@ -26,8 +26,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml b/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml index ce7bfb9..92bfe45 100644 --- a/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml +++ b/tests/xmconfigdata/test-paravirt-old-pvfb-vncdisplay.xml @@ -26,8 +26,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> <graphics type='vnc' port='5925' autoport='no' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-paravirt-old-pvfb.xml b/tests/xmconfigdata/test-paravirt-old-pvfb.xml index cba6dff..a2437b2 100644 --- a/tests/xmconfigdata/test-paravirt-old-pvfb.xml +++ b/tests/xmconfigdata/test-paravirt-old-pvfb.xml @@ -26,8 +26,6 @@ <console type='pty'> <target type='xen' port='0'/> </console> - <input type='mouse' bus='xen'/> - <input type='keyboard' bus='xen'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> <listen type='address' address='127.0.0.1'/> </graphics> diff --git a/tests/xmconfigdata/test-pci-devs.xml b/tests/xmconfigdata/test-pci-devs.xml index bdb1e82..5cde070 100644 --- a/tests/xmconfigdata/test-pci-devs.xml +++ b/tests/xmconfigdata/test-pci-devs.xml @@ -44,8 +44,6 @@ <console type='pty'> <target type='serial' port='0'/> </console> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes'/> <hostdev mode='subsystem' type='pci' managed='no'> <source> -- 2.6.3

On 12/04/2015 02:30 PM, Pavel Hrdina wrote:
The current code was a little bit odd.
Understatement of the Week :-) (also you get bonus points for being polite!)
At first we've removed all possible implicit input devices from domain definition to add them later back if there was any graphics device defined while parsing XML description. That's not all, while formating domain definition to XML description we at first ignore any input devices with bus different to USB and VIRTIO and few lines later we add implicit input devices to XML.
Looking back at the history, it seems that the bit that ignores particular input devices when there is a graphics device present was included in the original commit of domain parsing code; I guess at the time we didn't think all guest hardware should be represented in the config. At some later time we decided that "if it's in the guest, it needs to be in the config", and the 2nd bit that adds in the implicit devices was added without noticed the earlier bit. Does seem pretty pointless though :-P
This seems to me as a lot of code for nothing. This patch could seems to be more complicated than original approach, but this is a preferred way to modify/add driver specific staff only in those drivers and not deal with them in common parsing/formating functions.
The update is to add those implicit input devices only into running XML and don't put them automatically to offline XML. In addition we won't remove any input devices specified by user.
I haven't looked at the code yet, but if my understanding of this description is correct, your changes cause the implicitly added devices to *not* be stored in the config as written to disk? Sometime a few years ago, based on problems that users had with OSes complaining of "hardware changed" I think, we started down the path of "every device that is in the guest should be represented in the config" in order to guarantee that those same devices will still be there the next time the domain is started, even if libvirt changes what it adds implicitly. Or am I jumping to incorrect conclusions about what the patch does? I think that whatever hardware is in the guest needs to be represented in the config, not just in the live XML.
There was also inconsistence between our behavior and QEMU's in the way, that in QEMU there is no way how to disable those implicit input devices and they are available always, even without graphics device.
Is this the case for every version of qemu that we support?
This applies also to XEN hypervisor. VZ driver already does its part by putting correct implicit devices into live XML.

On Mon, Dec 07, 2015 at 12:36:46PM -0500, Laine Stump wrote:
On 12/04/2015 02:30 PM, Pavel Hrdina wrote:
The current code was a little bit odd.
Understatement of the Week :-) (also you get bonus points for being polite!)
At first we've removed all possible implicit input devices from domain definition to add them later back if there was any graphics device defined while parsing XML description. That's not all, while formating domain definition to XML description we at first ignore any input devices with bus different to USB and VIRTIO and few lines later we add implicit input devices to XML.
Looking back at the history, it seems that the bit that ignores particular input devices when there is a graphics device present was included in the original commit of domain parsing code; I guess at the time we didn't think all guest hardware should be represented in the config. At some later time we decided that "if it's in the guest, it needs to be in the config", and the 2nd bit that adds in the implicit devices was added without noticed the earlier bit. Does seem pretty pointless though :-P
This seems to me as a lot of code for nothing. This patch could seems to be more complicated than original approach, but this is a preferred way to modify/add driver specific staff only in those drivers and not deal with them in common parsing/formating functions.
The update is to add those implicit input devices only into running XML and don't put them automatically to offline XML. In addition we won't remove any input devices specified by user.
I haven't looked at the code yet, but if my understanding of this description is correct, your changes cause the implicitly added devices to *not* be stored in the config as written to disk? Sometime a few years ago, based on problems that users had with OSes complaining of "hardware changed" I think, we started down the path of "every device that is in the guest should be represented in the config" in order to guarantee that those same devices will still be there the next time the domain is started, even if libvirt changes what it adds implicitly.
Or am I jumping to incorrect conclusions about what the patch does?
Yes, that's correct, but the downside of this approach is that in the future qemu developers can decide, that some devices are not longer implicit and what if those devices cannot be passed to qemu command line? This will result in scenario, where you have some implicit devices stored in the XML, but actually the device doesn't exists in the guest.
I think that whatever hardware is in the guest needs to be represented in the config, not just in the live XML.
I'm not preferring any of those two solutions, but implicit devices that exists in the hypervisor and we cannot do anything about it should be only in live definition. Than we can simply stop adding those devices into live definition if hypervisor decide to remove those implicit devices instead of removing those devices from persistent definition to make sure, that the definition represents current state of the guest hardware.
There was also inconsistence between our behavior and QEMU's in the way, that in QEMU there is no way how to disable those implicit input devices and they are available always, even without graphics device.
Is this the case for every version of qemu that we support?
Yes, this applies for every version of qemu so far.
This applies also to XEN hypervisor. VZ driver already does its part by putting correct implicit devices into live XML.

On 12/07/2015 06:49 PM, Pavel Hrdina wrote:
On 12/04/2015 02:30 PM, Pavel Hrdina wrote:
The current code was a little bit odd. Understatement of the Week :-) (also you get bonus points for being polite!)
At first we've removed all possible implicit input devices from domain definition to add them later back if there was any graphics device defined while parsing XML description. That's not all, while formating domain definition to XML description we at first ignore any input devices with bus different to USB and VIRTIO and few lines later we add implicit input devices to XML. Looking back at the history, it seems that the bit that ignores particular input devices when there is a graphics device present was included in the original commit of domain parsing code; I guess at the time we didn't think all guest hardware should be represented in the config. At some later time we decided that "if it's in the guest, it needs to be in the config", and the 2nd bit that adds in the implicit devices was added without noticed the earlier bit. Does seem pretty pointless though :-P
This seems to me as a lot of code for nothing. This patch could seems to be more complicated than original approach, but this is a preferred way to modify/add driver specific staff only in those drivers and not deal with them in common parsing/formating functions.
The update is to add those implicit input devices only into running XML and don't put them automatically to offline XML. In addition we won't remove any input devices specified by user. I haven't looked at the code yet, but if my understanding of this description is correct, your changes cause the implicitly added devices to *not* be stored in the config as written to disk? Sometime a few years ago, based on problems that users had with OSes complaining of "hardware changed" I think, we started down the path of "every device that is in the guest should be represented in the config" in order to guarantee that those same devices will still be there the next time the domain is started, even if libvirt changes what it adds implicitly.
Or am I jumping to incorrect conclusions about what the patch does? Yes, that's correct, but the downside of this approach is that in the future qemu developers can decide, that some devices are not longer implicit and what if those devices cannot be passed to qemu command line? This will result in scenario, where you have some implicit devices stored in the XML, but actually
On Mon, Dec 07, 2015 at 12:36:46PM -0500, Laine Stump wrote: the device doesn't exists in the guest.
Yes, I see your point, and the merit. It does go against what we've previously said we want to do though (and implies the need for further-reaching changes to be consistent, e.g. the builtin IDE and FDC controllers on many architectures including i440fx, and builtin SATA controller on Q35). So before we do it, I want to make sure that everyone is okay with this. Dan? (also, another thing we would want to think about if we do this - do we also want to go through all the existing config files during an upgrade and remove these implicit devices from what's stored on disk? There are pros and cons to both sides of that too)
I think that whatever hardware is in the guest needs to be represented in the config, not just in the live XML. I'm not preferring any of those two solutions, but implicit devices that exists in the hypervisor and we cannot do anything about it should be only in live definition. Than we can simply stop adding those devices into live definition if hypervisor decide to remove those implicit devices instead of removing those devices from persistent definition to make sure, that the definition represents current state of the guest hardware.
There was also inconsistence between our behavior and QEMU's in the way, that in QEMU there is no way how to disable those implicit input devices and they are available always, even without graphics device. Is this the case for every version of qemu that we support? Yes, this applies for every version of qemu so far.
Okay. I was just curious how that code (that is, making it conditionally happen based on the presence of a video device) got in in the first place - either it was incompletely researched, or qemu has changed.
This applies also to XEN hypervisor. VZ driver already does its part by putting correct implicit devices into live XML.

On Tue, Dec 08, 2015 at 03:02:13PM -0500, Laine Stump wrote:
On 12/07/2015 06:49 PM, Pavel Hrdina wrote:
On 12/04/2015 02:30 PM, Pavel Hrdina wrote:
The current code was a little bit odd. Understatement of the Week :-) (also you get bonus points for being polite!)
At first we've removed all possible implicit input devices from domain definition to add them later back if there was any graphics device defined while parsing XML description. That's not all, while formating domain definition to XML description we at first ignore any input devices with bus different to USB and VIRTIO and few lines later we add implicit input devices to XML. Looking back at the history, it seems that the bit that ignores particular input devices when there is a graphics device present was included in the original commit of domain parsing code; I guess at the time we didn't think all guest hardware should be represented in the config. At some later time we decided that "if it's in the guest, it needs to be in the config", and the 2nd bit that adds in the implicit devices was added without noticed the earlier bit. Does seem pretty pointless though :-P
This seems to me as a lot of code for nothing. This patch could seems to be more complicated than original approach, but this is a preferred way to modify/add driver specific staff only in those drivers and not deal with them in common parsing/formating functions.
The update is to add those implicit input devices only into running XML and don't put them automatically to offline XML. In addition we won't remove any input devices specified by user. I haven't looked at the code yet, but if my understanding of this description is correct, your changes cause the implicitly added devices to *not* be stored in the config as written to disk? Sometime a few years ago, based on problems that users had with OSes complaining of "hardware changed" I think, we started down the path of "every device that is in the guest should be represented in the config" in order to guarantee that those same devices will still be there the next time the domain is started, even if libvirt changes what it adds implicitly.
Or am I jumping to incorrect conclusions about what the patch does? Yes, that's correct, but the downside of this approach is that in the future qemu developers can decide, that some devices are not longer implicit and what if those devices cannot be passed to qemu command line? This will result in scenario, where you have some implicit devices stored in the XML, but actually
On Mon, Dec 07, 2015 at 12:36:46PM -0500, Laine Stump wrote: the device doesn't exists in the guest.
Yes, I see your point, and the merit. It does go against what we've previously said we want to do though (and implies the need for further-reaching changes to be consistent, e.g. the builtin IDE and FDC controllers on many architectures including i440fx, and builtin SATA controller on Q35). So before we do it, I want to make sure that everyone is okay with this.
Dan?
Definitely we should think about it and take our time to make such decision. Since you've asked Dan for his opinion, adding him to cc.
(also, another thing we would want to think about if we do this - do we also want to go through all the existing config files during an upgrade and remove these implicit devices from what's stored on disk? There are pros and cons to both sides of that too)
I think, that we should handle only implicit devices, that we cannot enable/disable via qemu command line.
I think that whatever hardware is in the guest needs to be represented in the config, not just in the live XML. I'm not preferring any of those two solutions, but implicit devices that exists in the hypervisor and we cannot do anything about it should be only in live definition. Than we can simply stop adding those devices into live definition if hypervisor decide to remove those implicit devices instead of removing those devices from persistent definition to make sure, that the definition represents current state of the guest hardware.
There was also inconsistence between our behavior and QEMU's in the way, that in QEMU there is no way how to disable those implicit input devices and they are available always, even without graphics device. Is this the case for every version of qemu that we support? Yes, this applies for every version of qemu so far.
Okay. I was just curious how that code (that is, making it conditionally happen based on the presence of a video device) got in in the first place - either it was incompletely researched, or qemu has changed.
That was my question too, why this code took assumption, that the input device is implicitly added only if there is some graphics device.
This applies also to XEN hypervisor. VZ driver already does its part by putting correct implicit devices into live XML.
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Tue, Dec 08, 2015 at 03:02:13PM -0500, Laine Stump wrote:
On 12/07/2015 06:49 PM, Pavel Hrdina wrote:
On 12/04/2015 02:30 PM, Pavel Hrdina wrote:
The current code was a little bit odd. Understatement of the Week :-) (also you get bonus points for being polite!)
At first we've removed all possible implicit input devices from domain definition to add them later back if there was any graphics device defined while parsing XML description. That's not all, while formating domain definition to XML description we at first ignore any input devices with bus different to USB and VIRTIO and few lines later we add implicit input devices to XML. Looking back at the history, it seems that the bit that ignores particular input devices when there is a graphics device present was included in the original commit of domain parsing code; I guess at the time we didn't think all guest hardware should be represented in the config. At some later time we decided that "if it's in the guest, it needs to be in the config", and the 2nd bit that adds in the implicit devices was added without noticed the earlier bit. Does seem pretty pointless though :-P
This seems to me as a lot of code for nothing. This patch could seems to be more complicated than original approach, but this is a preferred way to modify/add driver specific staff only in those drivers and not deal with them in common parsing/formating functions.
The update is to add those implicit input devices only into running XML and don't put them automatically to offline XML. In addition we won't remove any input devices specified by user. I haven't looked at the code yet, but if my understanding of this description is correct, your changes cause the implicitly added devices to *not* be stored in the config as written to disk? Sometime a few years ago, based on problems that users had with OSes complaining of "hardware changed" I think, we started down the path of "every device that is in the guest should be represented in the config" in order to guarantee that those same devices will still be there the next time the domain is started, even if libvirt changes what it adds implicitly.
Or am I jumping to incorrect conclusions about what the patch does? Yes, that's correct, but the downside of this approach is that in the future qemu developers can decide, that some devices are not longer implicit and what if those devices cannot be passed to qemu command line? This will result in scenario, where you have some implicit devices stored in the XML, but actually
On Mon, Dec 07, 2015 at 12:36:46PM -0500, Laine Stump wrote: the device doesn't exists in the guest.
Yes, I see your point, and the merit. It does go against what we've previously said we want to do though (and implies the need for further-reaching changes to be consistent, e.g. the builtin IDE and FDC controllers on many architectures including i440fx, and builtin SATA controller on Q35). So before we do it, I want to make sure that everyone is okay with this.
Dan?
The scenario Pavel mentions will never happen. If QEMU ever stops implicitly adding the PS2 mouse+keyboard, it will definitely provide a way to add them explicitly on the command line. To not do that would be to break the ability to upgrade to newer QEMU which is not something QEMU would do. Removing the input devices from the offline XML is really going to be considered a regression in behaviour. For example, if virt-manager looks at an inactive guest config, it is going to think there is no mouse or keyboard available for the guest. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Wed, Dec 09, 2015 at 09:37:53AM +0000, Daniel P. Berrange wrote:
On Tue, Dec 08, 2015 at 03:02:13PM -0500, Laine Stump wrote:
On 12/07/2015 06:49 PM, Pavel Hrdina wrote:
On 12/04/2015 02:30 PM, Pavel Hrdina wrote:
The current code was a little bit odd. Understatement of the Week :-) (also you get bonus points for being polite!)
At first we've removed all possible implicit input devices from domain definition to add them later back if there was any graphics device defined while parsing XML description. That's not all, while formating domain definition to XML description we at first ignore any input devices with bus different to USB and VIRTIO and few lines later we add implicit input devices to XML. Looking back at the history, it seems that the bit that ignores particular input devices when there is a graphics device present was included in the original commit of domain parsing code; I guess at the time we didn't think all guest hardware should be represented in the config. At some later time we decided that "if it's in the guest, it needs to be in the config", and the 2nd bit that adds in the implicit devices was added without noticed the earlier bit. Does seem pretty pointless though :-P
This seems to me as a lot of code for nothing. This patch could seems to be more complicated than original approach, but this is a preferred way to modify/add driver specific staff only in those drivers and not deal with them in common parsing/formating functions.
The update is to add those implicit input devices only into running XML and don't put them automatically to offline XML. In addition we won't remove any input devices specified by user. I haven't looked at the code yet, but if my understanding of this description is correct, your changes cause the implicitly added devices to *not* be stored in the config as written to disk? Sometime a few years ago, based on problems that users had with OSes complaining of "hardware changed" I think, we started down the path of "every device that is in the guest should be represented in the config" in order to guarantee that those same devices will still be there the next time the domain is started, even if libvirt changes what it adds implicitly.
Or am I jumping to incorrect conclusions about what the patch does? Yes, that's correct, but the downside of this approach is that in the future qemu developers can decide, that some devices are not longer implicit and what if those devices cannot be passed to qemu command line? This will result in scenario, where you have some implicit devices stored in the XML, but actually
On Mon, Dec 07, 2015 at 12:36:46PM -0500, Laine Stump wrote: the device doesn't exists in the guest.
Yes, I see your point, and the merit. It does go against what we've previously said we want to do though (and implies the need for further-reaching changes to be consistent, e.g. the builtin IDE and FDC controllers on many architectures including i440fx, and builtin SATA controller on Q35). So before we do it, I want to make sure that everyone is okay with this.
Dan?
The scenario Pavel mentions will never happen. If QEMU ever stops implicitly adding the PS2 mouse+keyboard, it will definitely provide a way to add them explicitly on the command line. To not do that would be to break the ability to upgrade to newer QEMU which is not something QEMU would do.
Let's hope that they would introduce a way to add them on the command line.
Removing the input devices from the offline XML is really going to be considered a regression in behaviour. For example, if virt-manager looks at an inactive guest config, it is going to think there is no mouse or keyboard available for the guest.
In that case, I should rework the patch to use post parse callbacks to add them to the offline definition. I didn't think about this scenario. Thanks, Pavel
Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/qemu/qemu_domain.c | 28 ++++++++++------------ .../qemuxml2argvdata/qemuxml2argv-pseries-disk.xml | 2 +- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 736624e..9cd3f4f 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1038,8 +1038,7 @@ qemuDomainDefPostParse(virDomainDefPtr def, bool addPCIRoot = false; bool addPCIeRoot = false; bool addDefaultMemballoon = true; - bool addDefaultUSBKBD = false; - bool addDefaultUSBMouse = false; + bool addDefaultUSBInput = false; bool addPanicDevice = false; int ret = -1; @@ -1096,8 +1095,7 @@ qemuDomainDefPostParse(virDomainDefPtr def, case VIR_ARCH_PPC64: case VIR_ARCH_PPC64LE: addPCIRoot = true; - addDefaultUSBKBD = true; - addDefaultUSBMouse = true; + addDefaultUSBInput = true; /* For pSeries guests, the firmware provides the same * functionality as the pvpanic device, so automatically * add the definition if not already present */ @@ -1177,19 +1175,17 @@ qemuDomainDefPostParse(virDomainDefPtr def, def->memballoon = memballoon; } - if (addDefaultUSBKBD && - def->ngraphics > 0 && - virDomainDefMaybeAddInput(def, - VIR_DOMAIN_INPUT_TYPE_KBD, - VIR_DOMAIN_INPUT_BUS_USB) < 0) - goto cleanup; + if (def->ngraphics > 0 && addDefaultUSBInput) { + if (virDomainDefMaybeAddInput(def, + VIR_DOMAIN_INPUT_TYPE_MOUSE, + VIR_DOMAIN_INPUT_BUS_USB) < 0) + goto cleanup; - if (addDefaultUSBMouse && - def->ngraphics > 0 && - virDomainDefMaybeAddInput(def, - VIR_DOMAIN_INPUT_TYPE_MOUSE, - VIR_DOMAIN_INPUT_BUS_USB) < 0) - goto cleanup; + if (virDomainDefMaybeAddInput(def, + VIR_DOMAIN_INPUT_TYPE_KBD, + VIR_DOMAIN_INPUT_BUS_USB) < 0) + goto cleanup; + } if (addPanicDevice) { size_t j; diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml index 39f4a1f..6472af5 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml @@ -30,8 +30,8 @@ <controller type='usb' index='0'/> <controller type='scsi' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='keyboard' bus='usb'/> <input type='mouse' bus='usb'/> + <input type='keyboard' bus='usb'/> <graphics type='sdl'/> <video> <model type='cirrus' vram='16384' heads='1'/> -- 2.6.3

On 04/12/15 20:30, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/qemu/qemu_domain.c | 28 ++++++++++------------ .../qemuxml2argvdata/qemuxml2argv-pseries-disk.xml | 2 +- 2 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 736624e..9cd3f4f 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1038,8 +1038,7 @@ qemuDomainDefPostParse(virDomainDefPtr def, bool addPCIRoot = false; bool addPCIeRoot = false; bool addDefaultMemballoon = true; - bool addDefaultUSBKBD = false; - bool addDefaultUSBMouse = false; + bool addDefaultUSBInput = false; bool addPanicDevice = false; int ret = -1;
@@ -1096,8 +1095,7 @@ qemuDomainDefPostParse(virDomainDefPtr def, case VIR_ARCH_PPC64: case VIR_ARCH_PPC64LE: addPCIRoot = true; - addDefaultUSBKBD = true; - addDefaultUSBMouse = true; + addDefaultUSBInput = true; /* For pSeries guests, the firmware provides the same * functionality as the pvpanic device, so automatically * add the definition if not already present */ @@ -1177,19 +1175,17 @@ qemuDomainDefPostParse(virDomainDefPtr def, def->memballoon = memballoon; }
- if (addDefaultUSBKBD && - def->ngraphics > 0 && - virDomainDefMaybeAddInput(def, - VIR_DOMAIN_INPUT_TYPE_KBD, - VIR_DOMAIN_INPUT_BUS_USB) < 0) - goto cleanup; + if (def->ngraphics > 0 && addDefaultUSBInput) { + if (virDomainDefMaybeAddInput(def, + VIR_DOMAIN_INPUT_TYPE_MOUSE, + VIR_DOMAIN_INPUT_BUS_USB) < 0) + goto cleanup;
- if (addDefaultUSBMouse && - def->ngraphics > 0 && - virDomainDefMaybeAddInput(def, - VIR_DOMAIN_INPUT_TYPE_MOUSE, - VIR_DOMAIN_INPUT_BUS_USB) < 0) - goto cleanup; + if (virDomainDefMaybeAddInput(def, + VIR_DOMAIN_INPUT_TYPE_KBD, + VIR_DOMAIN_INPUT_BUS_USB) < 0) + goto cleanup; + }
if (addPanicDevice) { size_t j; diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml index 39f4a1f..6472af5 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml @@ -30,8 +30,8 @@ <controller type='usb' index='0'/> <controller type='scsi' index='0'/> <controller type='pci' index='0' model='pci-root'/> - <input type='keyboard' bus='usb'/> <input type='mouse' bus='usb'/> + <input type='keyboard' bus='usb'/> <graphics type='sdl'/> <video> <model type='cirrus' vram='16384' heads='1'/>
I'm not convinced we want this, I discussed it with Jan to find some corner cases that would break, there might be a slight problem with saving and restoring an old domain on a new libvirt if user provided some newxml to alter the host definition during restore which would have those input devices removed, then migratable definition would be created in qemuDomainSaveImageUpdateDef which would add these implicit devices in reverse order if graphic device was present. The following ABI stability check would then fail. Someone else could have at this as well and correct me, possibly NACKing the patch. You could wait a while, maybe there will be a different review. Erik Erik
participants (4)
-
Daniel P. Berrange
-
Erik Skultety
-
Laine Stump
-
Pavel Hrdina