[PATCH 3/7] xen: use virDomainDefPostParse for parsing XM/XL/SEXPR cofings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 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&apos;&quot;'/>
       <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&amp;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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]