diff mbox

[3/8] tests: qemuargv2xml: separate from qemuxml2argv data

Message ID 5f9c86e4bb89234f0ba1821a42a1996e9b1bffa5.1452725835.git.crobinso@redhat.com
State Superseded
Headers show

Commit Message

Cole Robinson Jan. 13, 2016, 11:03 p.m. UTC
Most of the qemuargv2xml tests are parsing old style qemu command
lines (with -disk, -serial, etc), and it gets its input from
qemuxml2argv output.

But since we've raise the minimum supported qemu version to 0.12.0,
which supports -device, once that changes propagates through libvirt
the vast majority of qemuxml2argv output is _not_ going to be using
old style qemu options.

In preparation for this, switch qemuargv2xml to use its own copies
of input and output, so it's not tied to qemuxml2argv results.

This is just a straight copy of the current tests.
---
 tests/Makefile.am                                  |  1 +
 tests/domainschematest                             |  2 +-
 .../qemuargv2xmldata/qemuargv2xml-boot-cdrom.args  | 22 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.xml | 29 ++++++++++
 .../qemuargv2xmldata/qemuargv2xml-boot-floppy.args | 23 ++++++++
 .../qemuargv2xmldata/qemuargv2xml-boot-floppy.xml  | 35 ++++++++++++
 .../qemuargv2xml-boot-network.args                 | 22 ++++++++
 .../qemuargv2xmldata/qemuargv2xml-boot-network.xml | 28 ++++++++++
 .../qemuargv2xml-clock-localtime.args              | 23 ++++++++
 .../qemuargv2xml-clock-localtime.xml               | 28 ++++++++++
 tests/qemuargv2xmldata/qemuargv2xml-clock-utc.args | 22 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-clock-utc.xml  | 28 ++++++++++
 .../qemuargv2xml-console-compat.args               | 22 ++++++++
 .../qemuargv2xml-console-compat.xml                | 34 ++++++++++++
 .../qemuargv2xml-disk-cdrom-empty.args             | 23 ++++++++
 .../qemuargv2xml-disk-cdrom-empty.xml              | 34 ++++++++++++
 .../qemuargv2xmldata/qemuargv2xml-disk-cdrom.args  | 23 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.xml | 35 ++++++++++++
 .../qemuargv2xml-disk-drive-boot-cdrom.args        | 23 ++++++++
 .../qemuargv2xml-disk-drive-boot-cdrom.xml         | 34 ++++++++++++
 .../qemuargv2xml-disk-drive-boot-disk.args         | 23 ++++++++
 .../qemuargv2xml-disk-drive-boot-disk.xml          | 34 ++++++++++++
 .../qemuargv2xml-disk-drive-cache-directsync.args  | 24 +++++++++
 .../qemuargv2xml-disk-drive-cache-directsync.xml   | 35 ++++++++++++
 .../qemuargv2xml-disk-drive-cache-unsafe.args      | 23 ++++++++
 .../qemuargv2xml-disk-drive-cache-unsafe.xml       | 35 ++++++++++++
 .../qemuargv2xml-disk-drive-cache-v2-none.args     | 23 ++++++++
 .../qemuargv2xml-disk-drive-cache-v2-none.xml      | 35 ++++++++++++
 .../qemuargv2xml-disk-drive-cache-v2-wb.args       | 24 +++++++++
 .../qemuargv2xml-disk-drive-cache-v2-wb.xml        | 35 ++++++++++++
 .../qemuargv2xml-disk-drive-cache-v2-wt.args       | 24 +++++++++
 .../qemuargv2xml-disk-drive-cache-v2-wt.xml        | 35 ++++++++++++
 ...uargv2xml-disk-drive-error-policy-enospace.args | 24 +++++++++
 ...muargv2xml-disk-drive-error-policy-enospace.xml | 35 ++++++++++++
 .../qemuargv2xml-disk-drive-error-policy-stop.args | 24 +++++++++
 .../qemuargv2xml-disk-drive-error-policy-stop.xml  | 35 ++++++++++++
 ...ml-disk-drive-error-policy-wreport-rignore.args | 24 +++++++++
 ...xml-disk-drive-error-policy-wreport-rignore.xml | 35 ++++++++++++
 .../qemuargv2xml-disk-drive-fmt-qcow.args          | 23 ++++++++
 .../qemuargv2xml-disk-drive-fmt-qcow.xml           | 35 ++++++++++++
 .../qemuargv2xml-disk-drive-network-gluster.args   | 24 +++++++++
 .../qemuargv2xml-disk-drive-network-gluster.xml    | 35 ++++++++++++
 ...qemuargv2xml-disk-drive-network-iscsi-auth.args | 25 +++++++++
 .../qemuargv2xml-disk-drive-network-iscsi-auth.xml | 38 +++++++++++++
 .../qemuargv2xml-disk-drive-network-iscsi.args     | 25 +++++++++
 .../qemuargv2xml-disk-drive-network-iscsi.xml      | 35 ++++++++++++
 ...qemuargv2xml-disk-drive-network-nbd-export.args | 23 ++++++++
 .../qemuargv2xml-disk-drive-network-nbd-export.xml | 35 ++++++++++++
 ...rgv2xml-disk-drive-network-nbd-ipv6-export.args | 23 ++++++++
 ...argv2xml-disk-drive-network-nbd-ipv6-export.xml | 35 ++++++++++++
 .../qemuargv2xml-disk-drive-network-nbd-ipv6.args  | 23 ++++++++
 .../qemuargv2xml-disk-drive-network-nbd-ipv6.xml   | 35 ++++++++++++
 .../qemuargv2xml-disk-drive-network-nbd-unix.args  | 23 ++++++++
 .../qemuargv2xml-disk-drive-network-nbd-unix.xml   | 35 ++++++++++++
 .../qemuargv2xml-disk-drive-network-nbd.args       | 23 ++++++++
 .../qemuargv2xml-disk-drive-network-nbd.xml        | 35 ++++++++++++
 .../qemuargv2xml-disk-drive-network-rbd-auth.args  | 26 +++++++++
 .../qemuargv2xml-disk-drive-network-rbd-auth.xml   | 40 ++++++++++++++
 ...muargv2xml-disk-drive-network-rbd-ceph-env.args | 25 +++++++++
 ...emuargv2xml-disk-drive-network-rbd-ceph-env.xml | 37 +++++++++++++
 .../qemuargv2xml-disk-drive-network-rbd-ipv6.args  | 25 +++++++++
 .../qemuargv2xml-disk-drive-network-rbd-ipv6.xml   | 38 +++++++++++++
 .../qemuargv2xml-disk-drive-network-rbd.args       | 29 ++++++++++
 .../qemuargv2xml-disk-drive-network-rbd.xml        | 62 ++++++++++++++++++++++
 .../qemuargv2xml-disk-drive-network-sheepdog.args  | 23 ++++++++
 .../qemuargv2xml-disk-drive-network-sheepdog.xml   | 35 ++++++++++++
 .../qemuargv2xmldata/qemuargv2xml-disk-floppy.args | 24 +++++++++
 .../qemuargv2xmldata/qemuargv2xml-disk-floppy.xml  | 41 ++++++++++++++
 tests/qemuargv2xmldata/qemuargv2xml-disk-many.args | 25 +++++++++
 tests/qemuargv2xmldata/qemuargv2xml-disk-many.xml  | 46 ++++++++++++++++
 tests/qemuargv2xmldata/qemuargv2xml-disk-usb.args  | 23 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-disk-usb.xml   | 33 ++++++++++++
 .../qemuargv2xmldata/qemuargv2xml-disk-virtio.args | 25 +++++++++
 .../qemuargv2xmldata/qemuargv2xml-disk-virtio.xml  | 45 ++++++++++++++++
 .../qemuargv2xmldata/qemuargv2xml-disk-xenvbd.args | 25 +++++++++
 .../qemuargv2xmldata/qemuargv2xml-disk-xenvbd.xml  | 45 ++++++++++++++++
 .../qemuargv2xml-graphics-sdl-fullscreen.args      | 25 +++++++++
 .../qemuargv2xml-graphics-sdl-fullscreen.xml       | 34 ++++++++++++
 .../qemuargv2xml-graphics-sdl.args                 | 24 +++++++++
 .../qemuargv2xmldata/qemuargv2xml-graphics-sdl.xml | 34 ++++++++++++
 .../qemuargv2xml-graphics-vnc-policy.args          | 23 ++++++++
 .../qemuargv2xml-graphics-vnc-policy.xml           | 36 +++++++++++++
 .../qemuargv2xml-graphics-vnc-sasl.args            | 24 +++++++++
 .../qemuargv2xml-graphics-vnc-sasl.xml             | 36 +++++++++++++
 .../qemuargv2xml-graphics-vnc-socket.args          | 23 ++++++++
 .../qemuargv2xml-graphics-vnc-socket.xml           | 34 ++++++++++++
 .../qemuargv2xml-graphics-vnc-tls.args             | 24 +++++++++
 .../qemuargv2xml-graphics-vnc-tls.xml              | 36 +++++++++++++
 .../qemuargv2xml-graphics-vnc-websocket.args       | 22 ++++++++
 .../qemuargv2xml-graphics-vnc-websocket.xml        | 29 ++++++++++
 .../qemuargv2xml-graphics-vnc.args                 | 23 ++++++++
 .../qemuargv2xmldata/qemuargv2xml-graphics-vnc.xml | 36 +++++++++++++
 .../qemuargv2xml-hostdev-pci-address.args          | 23 ++++++++
 .../qemuargv2xml-hostdev-pci-address.xml           | 33 ++++++++++++
 .../qemuargv2xml-hostdev-usb-address.args          | 23 ++++++++
 .../qemuargv2xml-hostdev-usb-address.xml           | 33 ++++++++++++
 .../qemuargv2xml-hyperv-panic.args                 | 21 ++++++++
 .../qemuargv2xmldata/qemuargv2xml-hyperv-panic.xml | 25 +++++++++
 tests/qemuargv2xmldata/qemuargv2xml-hyperv.args    | 21 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-hyperv.xml     | 29 ++++++++++
 .../qemuargv2xml-input-usbmouse.args               | 23 ++++++++
 .../qemuargv2xml-input-usbmouse.xml                | 29 ++++++++++
 .../qemuargv2xml-input-usbtablet.args              | 23 ++++++++
 .../qemuargv2xml-input-usbtablet.xml               | 29 ++++++++++
 .../qemuargv2xml-kvm-features.args                 | 21 ++++++++
 .../qemuargv2xmldata/qemuargv2xml-kvm-features.xml | 27 ++++++++++
 tests/qemuargv2xmldata/qemuargv2xml-kvmclock.args  | 22 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-kvmclock.xml   | 26 +++++++++
 .../qemuargv2xml-machine-aeskeywrap-off-argv.args  | 20 +++++++
 .../qemuargv2xml-machine-aeskeywrap-off-argv.xml   | 27 ++++++++++
 .../qemuargv2xml-machine-aeskeywrap-on-argv.args   | 20 +++++++
 .../qemuargv2xml-machine-aeskeywrap-on-argv.xml    | 27 ++++++++++
 .../qemuargv2xml-machine-core-off.args             | 22 ++++++++
 .../qemuargv2xml-machine-core-off.xml              | 28 ++++++++++
 .../qemuargv2xml-machine-core-on.args              | 22 ++++++++
 .../qemuargv2xml-machine-core-on.xml               | 28 ++++++++++
 .../qemuargv2xml-machine-deakeywrap-off-argv.args  | 20 +++++++
 .../qemuargv2xml-machine-deakeywrap-off-argv.xml   | 27 ++++++++++
 .../qemuargv2xml-machine-deakeywrap-on-argv.args   | 20 +++++++
 .../qemuargv2xml-machine-deakeywrap-on-argv.xml    | 27 ++++++++++
 .../qemuargv2xml-machine-keywrap-none-argv.args    | 20 +++++++
 .../qemuargv2xml-machine-keywrap-none-argv.xml     | 24 +++++++++
 tests/qemuargv2xmldata/qemuargv2xml-migrate.args   | 23 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-migrate.xml    | 28 ++++++++++
 tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.args | 21 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.xml  | 31 +++++++++++
 .../qemuargv2xml-misc-disable-s3.args              | 23 ++++++++
 .../qemuargv2xml-misc-disable-s3.xml               | 31 +++++++++++
 .../qemuargv2xml-misc-disable-suspends.args        | 24 +++++++++
 .../qemuargv2xml-misc-disable-suspends.xml         | 32 +++++++++++
 .../qemuargv2xml-misc-enable-s4.args               | 23 ++++++++
 .../qemuargv2xml-misc-enable-s4.xml                | 31 +++++++++++
 .../qemuargv2xml-misc-no-reboot.args               | 23 ++++++++
 .../qemuargv2xml-misc-no-reboot.xml                | 28 ++++++++++
 tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.args | 21 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.xml  | 31 +++++++++++
 .../qemuargv2xml-net-eth-ifname.args               | 23 ++++++++
 .../qemuargv2xml-net-eth-ifname.xml                | 34 ++++++++++++
 tests/qemuargv2xmldata/qemuargv2xml-net-eth.args   | 23 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-net-eth.xml    | 33 ++++++++++++
 tests/qemuargv2xmldata/qemuargv2xml-net-user.args  | 23 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-net-user.xml   | 32 +++++++++++
 .../qemuargv2xmldata/qemuargv2xml-net-virtio.args  | 23 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-net-virtio.xml | 32 +++++++++++
 .../qemuargv2xml-nographics-vga.args               | 23 ++++++++
 .../qemuargv2xml-nographics-vga.xml                | 28 ++++++++++
 .../qemuargv2xml-nosharepages.args                 | 22 ++++++++
 .../qemuargv2xmldata/qemuargv2xml-nosharepages.xml | 31 +++++++++++
 .../qemuargv2xml-parallel-tcp.args                 | 22 ++++++++
 .../qemuargv2xmldata/qemuargv2xml-parallel-tcp.xml | 33 ++++++++++++
 .../qemuargv2xml-pseries-disk.args                 | 18 +++++++
 .../qemuargv2xmldata/qemuargv2xml-pseries-disk.xml | 42 +++++++++++++++
 .../qemuargv2xml-pseries-nvram.args                | 22 ++++++++
 .../qemuargv2xml-pseries-nvram.xml                 | 25 +++++++++
 .../qemuargv2xml-qemu-ns-no-env.args               | 23 ++++++++
 .../qemuargv2xml-qemu-ns-no-env.xml                | 32 +++++++++++
 .../qemuargv2xml-reboot-timeout-disabled.args      | 21 ++++++++
 .../qemuargv2xml-reboot-timeout-disabled.xml       | 22 ++++++++
 .../qemuargv2xml-reboot-timeout-enabled.args       | 21 ++++++++
 .../qemuargv2xml-reboot-timeout-enabled.xml        | 22 ++++++++
 .../qemuargv2xmldata/qemuargv2xml-restore-v2.args  | 23 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-restore-v2.xml | 28 ++++++++++
 .../qemuargv2xmldata/qemuargv2xml-serial-dev.args  | 22 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml | 36 +++++++++++++
 .../qemuargv2xmldata/qemuargv2xml-serial-file.args | 22 ++++++++
 .../qemuargv2xmldata/qemuargv2xml-serial-file.xml  | 36 +++++++++++++
 .../qemuargv2xmldata/qemuargv2xml-serial-many.args | 23 ++++++++
 .../qemuargv2xmldata/qemuargv2xml-serial-many.xml  | 38 +++++++++++++
 .../qemuargv2xmldata/qemuargv2xml-serial-pty.args  | 22 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml | 34 ++++++++++++
 .../qemuargv2xml-serial-tcp-telnet.args            | 22 ++++++++
 .../qemuargv2xml-serial-tcp-telnet.xml             | 38 +++++++++++++
 .../qemuargv2xmldata/qemuargv2xml-serial-tcp.args  | 22 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml | 38 +++++++++++++
 .../qemuargv2xmldata/qemuargv2xml-serial-udp.args  | 23 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml | 42 +++++++++++++++
 .../qemuargv2xmldata/qemuargv2xml-serial-unix.args | 22 ++++++++
 .../qemuargv2xmldata/qemuargv2xml-serial-unix.xml  | 36 +++++++++++++
 tests/qemuargv2xmldata/qemuargv2xml-serial-vc.args | 22 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml  | 34 ++++++++++++
 tests/qemuargv2xmldata/qemuargv2xml-smp.args       | 22 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-smp.xml        | 31 +++++++++++
 tests/qemuargv2xmldata/qemuargv2xml-sound.args     | 23 ++++++++
 tests/qemuargv2xmldata/qemuargv2xml-sound.xml      | 32 +++++++++++
 tests/qemuargv2xmldata/qemuargv2xml-watchdog.args  | 24 +++++++++
 tests/qemuargv2xmldata/qemuargv2xml-watchdog.xml   | 29 ++++++++++
 tests/qemuargv2xmltest.c                           |  4 +-
 187 files changed, 5168 insertions(+), 3 deletions(-)
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-boot-floppy.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-boot-floppy.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-boot-network.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-boot-network.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-clock-localtime.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-clock-localtime.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-clock-utc.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-clock-utc.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-console-compat.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom-empty.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom-empty.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-cdrom.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-cdrom.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-disk.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-disk.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-directsync.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-directsync.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-unsafe.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-unsafe.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-none.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-none.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wb.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wb.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wt.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wt.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-enospace.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-enospace.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-stop.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-stop.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-wreport-rignore.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-wreport-rignore.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-fmt-qcow.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-fmt-qcow.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-gluster.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-gluster.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-export.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-export.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6-export.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6-export.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-unix.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-unix.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ceph-env.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ceph-env.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ipv6.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ipv6.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-sheepdog.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-sheepdog.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-floppy.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-floppy.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-many.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-many.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-usb.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-usb.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-virtio.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-virtio.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-xenvbd.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-disk-xenvbd.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl-fullscreen.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl-fullscreen.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-policy.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-policy.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-sasl.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-sasl.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-socket.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-socket.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-tls.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-tls.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-websocket.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-websocket.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-hostdev-pci-address.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-hostdev-pci-address.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-hostdev-usb-address.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-hostdev-usb-address.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-hyperv-panic.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-hyperv-panic.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-hyperv.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-hyperv.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-input-usbmouse.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-input-usbmouse.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-input-usbtablet.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-input-usbtablet.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-kvm-features.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-kvm-features.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-kvmclock.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-kvmclock.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-off-argv.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-off-argv.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-on-argv.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-on-argv.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-core-off.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-core-off.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-core-on.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-core-on.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-off-argv.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-off-argv.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-on-argv.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-on-argv.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-keywrap-none-argv.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-machine-keywrap-none-argv.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-migrate.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-migrate.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-misc-disable-s3.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-misc-disable-s3.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-misc-disable-suspends.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-misc-disable-suspends.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-misc-enable-s4.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-misc-enable-s4.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-misc-no-reboot.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-misc-no-reboot.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-net-eth-ifname.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-net-eth-ifname.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-net-eth.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-net-eth.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-net-user.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-net-user.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-net-virtio.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-net-virtio.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-nographics-vga.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-nographics-vga.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-nosharepages.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-nosharepages.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-parallel-tcp.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-parallel-tcp.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-pseries-disk.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-pseries-disk.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-pseries-nvram.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-pseries-nvram.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-qemu-ns-no-env.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-qemu-ns-no-env.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-disabled.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-disabled.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-enabled.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-enabled.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-restore-v2.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-restore-v2.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-dev.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-file.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-many.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-pty.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-udp.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-unix.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-vc.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-smp.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-smp.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-sound.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-sound.xml
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-watchdog.args
 create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-watchdog.xml

-- 
2.5.0

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

Patch

diff --git a/tests/Makefile.am b/tests/Makefile.am
index ee16666..c5986f0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -111,6 +111,7 @@  EXTRA_DIST =		\
 	nwfilterxml2xmlout \
 	oomtrace.pl \
 	qemuagentdata \
+	qemuargv2xmldata \
 	qemucapabilitiesdata \
 	qemucaps2xmldata \
 	qemuhelpdata \
diff --git a/tests/domainschematest b/tests/domainschematest
index 479fd23..68f7882 100755
--- a/tests/domainschematest
+++ b/tests/domainschematest
@@ -5,7 +5,7 @@ 
 . $abs_srcdir/schematestutils.sh
 
 DIRS=""
-DIRS="$DIRS domainschemadata qemuxml2argvdata sexpr2xmldata"
+DIRS="$DIRS domainschemadata qemuargv2xmldata qemuxml2argvdata sexpr2xmldata"
 DIRS="$DIRS xmconfigdata xml2sexprdata qemuxml2xmloutdata"
 DIRS="$DIRS lxcxml2xmldata lxcxml2xmloutdata"
 DIRS="$DIRS bhyvexml2argvdata genericxml2xmlindata genericxml2xmloutdata"
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.args b/tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.args
new file mode 100644
index 0000000..f100d91
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot d \
+-usb \
+-drive file=/dev/cdrom,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.xml b/tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.xml
new file mode 100644
index 0000000..b639821
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.xml
@@ -0,0 +1,29 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='cdrom'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/cdrom'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-boot-floppy.args b/tests/qemuargv2xmldata/qemuargv2xml-boot-floppy.args
new file mode 100644
index 0000000..c085c82
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-boot-floppy.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot a \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive file=/tmp/firmware.img,format=raw,if=floppy,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-boot-floppy.xml b/tests/qemuargv2xmldata/qemuargv2xml-boot-floppy.xml
new file mode 100644
index 0000000..610321f
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-boot-floppy.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='fd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='file' device='floppy'>
+      <driver name='qemu' type='raw'/>
+      <source file='/tmp/firmware.img'/>
+      <target dev='fda' bus='fdc'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='fdc' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-boot-network.args b/tests/qemuargv2xmldata/qemuargv2xml-boot-network.args
new file mode 100644
index 0000000..92c4073
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-boot-network.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot n \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-boot-network.xml b/tests/qemuargv2xmldata/qemuargv2xml-boot-network.xml
new file mode 100644
index 0000000..f4ebc2e
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-boot-network.xml
@@ -0,0 +1,28 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='network'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-clock-localtime.args b/tests/qemuargv2xmldata/qemuargv2xml-clock-localtime.args
new file mode 100644
index 0000000..53dc4ef
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-clock-localtime.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-localtime \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-clock-localtime.xml b/tests/qemuargv2xmldata/qemuargv2xml-clock-localtime.xml
new file mode 100644
index 0000000..4e1f66b
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-clock-localtime.xml
@@ -0,0 +1,28 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='localtime'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-clock-utc.args b/tests/qemuargv2xmldata/qemuargv2xml-clock-utc.args
new file mode 100644
index 0000000..22d4776
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-clock-utc.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-clock-utc.xml b/tests/qemuargv2xmldata/qemuargv2xml-clock-utc.xml
new file mode 100644
index 0000000..b40ca80
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-clock-utc.xml
@@ -0,0 +1,28 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-console-compat.args b/tests/qemuargv2xmldata/qemuargv2xml-console-compat.args
new file mode 100644
index 0000000..1adfde1
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-console-compat.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial pty \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml b/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml
new file mode 100644
index 0000000..dc2f851
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml
@@ -0,0 +1,34 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <serial type='pty'>
+      <target port='0'/>
+    </serial>
+    <console type='pty'>
+      <target type='serial' port='0'/>
+    </console>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom-empty.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom-empty.args
new file mode 100644
index 0000000..10431aa
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom-empty.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom-empty.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom-empty.xml
new file mode 100644
index 0000000..60b3168
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom-empty.xml
@@ -0,0 +1,34 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <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'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.args
new file mode 100644
index 0000000..caa730c
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive file=/root/boot.iso,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.xml
new file mode 100644
index 0000000..5d94ec0
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <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>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-cdrom.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-cdrom.args
new file mode 100644
index 0000000..1827357
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-cdrom.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot d \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-cdrom.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-cdrom.xml
new file mode 100644
index 0000000..31d3702
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-cdrom.xml
@@ -0,0 +1,34 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='cdrom'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdc' bus='ide'/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-disk.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-disk.args
new file mode 100644
index 0000000..2d7084e
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-disk.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-disk.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-disk.xml
new file mode 100644
index 0000000..3b06a97
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-disk.xml
@@ -0,0 +1,34 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdc' bus='ide'/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-directsync.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-directsync.args
new file mode 100644
index 0000000..d49d408
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-directsync.args
@@ -0,0 +1,24 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=ide,bus=0,unit=0,\
+cache=directsync \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-directsync.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-directsync.xml
new file mode 100644
index 0000000..779aa17
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-directsync.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='qcow2' cache='directsync'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-unsafe.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-unsafe.args
new file mode 100644
index 0000000..628d19b
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-unsafe.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=ide,bus=0,unit=0,cache=unsafe \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-unsafe.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-unsafe.xml
new file mode 100644
index 0000000..481cc55
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-unsafe.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='qcow2' cache='unsafe'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-none.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-none.args
new file mode 100644
index 0000000..f810d4f
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-none.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=ide,bus=0,unit=0,cache=none \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-none.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-none.xml
new file mode 100644
index 0000000..63fb2b0
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-none.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='qcow2' cache='none'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wb.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wb.args
new file mode 100644
index 0000000..2750f79
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wb.args
@@ -0,0 +1,24 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=ide,bus=0,unit=0,\
+cache=writeback \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wb.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wb.xml
new file mode 100644
index 0000000..dcac861
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wb.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='qcow2' cache='writeback'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wt.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wt.args
new file mode 100644
index 0000000..dced3ce
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wt.args
@@ -0,0 +1,24 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=ide,bus=0,unit=0,\
+cache=writethrough \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wt.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wt.xml
new file mode 100644
index 0000000..0a93f00
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wt.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='qcow2' cache='writethrough'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-enospace.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-enospace.args
new file mode 100644
index 0000000..7a25b1f
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-enospace.args
@@ -0,0 +1,24 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor control,unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=ide,bus=0,unit=0,cache=none,\
+werror=enospc \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-enospace.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-enospace.xml
new file mode 100644
index 0000000..ab88224
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-enospace.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='qcow2' cache='none' error_policy='enospace'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-stop.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-stop.args
new file mode 100644
index 0000000..7c22fb1
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-stop.args
@@ -0,0 +1,24 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor control,unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=ide,bus=0,unit=0,cache=none,\
+werror=stop,rerror=stop \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-stop.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-stop.xml
new file mode 100644
index 0000000..b78be46
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-stop.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='qcow2' cache='none' error_policy='stop'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-wreport-rignore.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-wreport-rignore.args
new file mode 100644
index 0000000..48c3467
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-wreport-rignore.args
@@ -0,0 +1,24 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor control,unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=ide,bus=0,unit=0,cache=none,\
+werror=report,rerror=ignore \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-wreport-rignore.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-wreport-rignore.xml
new file mode 100644
index 0000000..14dd1ca
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-wreport-rignore.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='qcow2' cache='none' error_policy='report' rerror_policy='ignore'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-fmt-qcow.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-fmt-qcow.args
new file mode 100644
index 0000000..aa480e3
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-fmt-qcow.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=ide,bus=0,unit=0 \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-fmt-qcow.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-fmt-qcow.xml
new file mode 100644
index 0000000..a36b09c
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-fmt-qcow.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='qcow2'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-gluster.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-gluster.args
new file mode 100644
index 0000000..f560308
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-gluster.args
@@ -0,0 +1,24 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=gluster://example.org:6000/Volume1/Image,format=raw,if=virtio \
+-drive 'file=gluster+unix:///Volume2/Image?socket=/path/to/sock,format=raw,\
+if=virtio' \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-gluster.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-gluster.xml
new file mode 100644
index 0000000..dce5f23
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-gluster.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='gluster' name='Volume1/Image'>
+        <host name='example.org' port='6000'/>
+      </source>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='gluster' name='Volume2/Image'>
+        <host transport='unix' socket='/path/to/sock'/>
+      </source>
+      <target dev='vdb' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.args
new file mode 100644
index 0000000..5bebcae
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.args
@@ -0,0 +1,25 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org:\
+6000/iqn.1992-01.com.example,format=raw,if=virtio \
+-drive file=iscsi://example.org:6000/iqn.1992-01.com.example/1,format=raw,\
+if=virtio \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.xml
new file mode 100644
index 0000000..45df270
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.xml
@@ -0,0 +1,38 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <auth username='myname'>
+        <secret type='iscsi' usage='mycluster_myname'/>
+      </auth>
+      <source protocol='iscsi' name='iqn.1992-01.com.example'>
+        <host name='example.org' port='6000'/>
+      </source>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='iscsi' name='iqn.1992-01.com.example/1'>
+        <host name='example.org' port='6000'/>
+      </source>
+      <target dev='vdb' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi.args
new file mode 100644
index 0000000..08edce1
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi.args
@@ -0,0 +1,25 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=iscsi://example.org:6000/iqn.1992-01.com.example,format=raw,\
+if=virtio \
+-drive file=iscsi://example.org:6000/iqn.1992-01.com.example/1,format=raw,\
+if=virtio \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi.xml
new file mode 100644
index 0000000..1764259
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='iscsi' name='iqn.1992-01.com.example'>
+        <host name='example.org' port='6000'/>
+      </source>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='iscsi' name='iqn.1992-01.com.example/1'>
+        <host name='example.org' port='6000'/>
+      </source>
+      <target dev='vdb' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-export.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-export.args
new file mode 100644
index 0000000..2d5a9c3
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-export.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive file=nbd:example.org:6000:exportname=bar,format=raw,if=virtio \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-export.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-export.xml
new file mode 100644
index 0000000..62b17ec
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-export.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='nbd' name='bar'>
+        <host name='example.org' port='6000'/>
+      </source>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6-export.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6-export.args
new file mode 100644
index 0000000..19deae4
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6-export.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive 'file=nbd://[::1]:6000/bar,format=raw,if=virtio' \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6-export.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6-export.xml
new file mode 100644
index 0000000..0ba7a05
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6-export.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='nbd' name='bar'>
+        <host name='::1' port='6000'/>
+      </source>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6.args
new file mode 100644
index 0000000..64f5ed5
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive 'file=nbd://[::1]:6000,format=raw,if=virtio' \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6.xml
new file mode 100644
index 0000000..aaafa63
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='nbd'>
+        <host name='::1' port='6000'/>
+      </source>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-unix.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-unix.args
new file mode 100644
index 0000000..d6aae50
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-unix.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive file=nbd:unix:/var/run/nbdsock:exportname=bar,format=raw,if=virtio \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-unix.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-unix.xml
new file mode 100644
index 0000000..82aeaf1
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-unix.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='nbd' name='bar'>
+        <host transport='unix' socket='/var/run/nbdsock'/>
+      </source>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd.args
new file mode 100644
index 0000000..4540deb
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive file=nbd:example.org:6000,format=raw,if=virtio \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd.xml
new file mode 100644
index 0000000..6d18d72
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='nbd'>
+        <host name='example.org' port='6000'/>
+      </source>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.args
new file mode 100644
index 0000000..d33818f
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.args
@@ -0,0 +1,26 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive 'file=rbd:pool/image:id=myname:\
+key=QVFDVm41aE82SHpGQWhBQXEwTkN2OGp0SmNJY0UrSE9CbE1RMUE=:\
+auth_supported=cephx\;none:mon_host=mon1.example.org\:6321\;mon2.example.org\:\
+6322\;mon3.example.org\:6322,format=raw,if=virtio' \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml
new file mode 100644
index 0000000..72923ea
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml
@@ -0,0 +1,40 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <auth username='myname'>
+        <secret type='ceph' usage='mycluster_myname'/>
+      </auth>
+      <source protocol='rbd' name='pool/image'>
+        <host name='mon1.example.org' port='6321'/>
+        <host name='mon2.example.org' port='6322'/>
+        <host name='mon3.example.org' port='6322'/>
+      </source>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ceph-env.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ceph-env.args
new file mode 100644
index 0000000..5ecac54
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ceph-env.args
@@ -0,0 +1,25 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+CEPH_ARGS=-m \
+mon1.example.org:6321,mon2.example.org:6322,mon3.example.org:6322 \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive file=rbd:pool/image,format=raw,if=virtio \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ceph-env.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ceph-env.xml
new file mode 100644
index 0000000..37e9db5
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ceph-env.xml
@@ -0,0 +1,37 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='rbd' name='pool/image'>
+        <host name='mon1.example.org' port='6321'/>
+        <host name='mon2.example.org' port='6322'/>
+        <host name='mon3.example.org' port='6322'/>
+      </source>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ipv6.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ipv6.args
new file mode 100644
index 0000000..a7927c3
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ipv6.args
@@ -0,0 +1,25 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive 'file=rbd:pool/image:auth_supported=none:mon_host=[\:\:1]\:\
+6321\;example.org\:6789\;[ffff\:1234\:567\:abc\:\:0f]\:6322\;[2001\:db8\:\:ff00\:\
+42\:8329]\:6322,format=raw,if=virtio' \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ipv6.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ipv6.xml
new file mode 100644
index 0000000..bc9d8d0
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ipv6.xml
@@ -0,0 +1,38 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='rbd' name='pool/image'>
+        <host name='::1' port='6321'/>
+        <host name='example.org' port='6789'/>
+        <host name='ffff:1234:567:abc::0f' port='6322'/>
+        <host name='2001:db8::ff00:42:8329' port='6322'/>
+      </source>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd.args
new file mode 100644
index 0000000..bc6e497
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd.args
@@ -0,0 +1,29 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive 'file=rbd:pool/image:auth_supported=none:mon_host=mon1.example.org\:\
+6321\;mon2.example.org\:6322\;mon3.example.org\:6322,format=raw,if=virtio' \
+-drive file=rbd:pool/image@asdf:auth_supported=none,format=raw,if=virtio \
+-drive 'file=rbd:pool/image@foo:auth_supported=none:mon_host=mon1.example.org\:\
+6321\;mon2.example.org\:6322\;mon3.example.org\:6322,format=raw,if=virtio' \
+-drive file=rbd:pool/image@foo:auth_supported=none:conf=/blah/test.conf,\
+format=raw,if=virtio \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd.xml
new file mode 100644
index 0000000..9ffe633
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd.xml
@@ -0,0 +1,62 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='rbd' name='pool/image'>
+        <host name='mon1.example.org' port='6321'/>
+        <host name='mon2.example.org' port='6322'/>
+        <host name='mon3.example.org' port='6322'/>
+      </source>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='rbd' name='pool/image'>
+        <snapshot name='asdf'/>
+      </source>
+      <target dev='vdb' bus='virtio'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='rbd' name='pool/image'>
+        <host name='mon1.example.org' port='6321'/>
+        <host name='mon2.example.org' port='6322'/>
+        <host name='mon3.example.org' port='6322'/>
+        <snapshot name='foo'/>
+      </source>
+      <target dev='vdc' bus='virtio'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='rbd' name='pool/image'>
+        <snapshot name='foo'/>
+        <config file='/blah/test.conf'/>
+      </source>
+      <target dev='vdd' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-sheepdog.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-sheepdog.args
new file mode 100644
index 0000000..c9aee83
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-sheepdog.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMU,,Guest,,,,1,format=raw,if=ide,bus=0,unit=0 \
+-drive file=sheepdog:example.org:6000:image,,with,,commas,format=raw,if=virtio \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-sheepdog.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-sheepdog.xml
new file mode 100644
index 0000000..fc9ad16
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-sheepdog.xml
@@ -0,0 +1,35 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMU,Guest,,1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='network' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source protocol='sheepdog' name='image,with,commas'>
+        <host name='example.org' port='6000'/>
+      </source>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-floppy.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-floppy.args
new file mode 100644
index 0000000..d7a2302
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-floppy.args
@@ -0,0 +1,24 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive file=/dev/fd0,format=raw,if=floppy,unit=0 \
+-drive file=/tmp/firmware.img,format=raw,if=floppy,unit=1 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-floppy.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-floppy.xml
new file mode 100644
index 0000000..343767d
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-floppy.xml
@@ -0,0 +1,41 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='floppy'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/fd0'/>
+      <target dev='fda' bus='fdc'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='file' device='floppy'>
+      <driver name='qemu' type='raw'/>
+      <source file='/tmp/firmware.img'/>
+      <target dev='fdb' bus='fdc'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='fdc' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-many.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-many.args
new file mode 100644
index 0000000..ee446a5
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-many.args
@@ -0,0 +1,25 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,bus=0,unit=1 \
+-drive file=/tmp/data.img,format=raw,if=ide,bus=1,unit=0 \
+-drive file=/tmp/logs.img,format=raw,if=ide,bus=1,unit=1 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-many.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-many.xml
new file mode 100644
index 0000000..9674237
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-many.xml
@@ -0,0 +1,46 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdb' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/tmp/data.img'/>
+      <target dev='hdc' bus='ide'/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/tmp/logs.img'/>
+      <target dev='hdd' bus='ide'/>
+      <address type='drive' controller='0' bus='1' target='0' unit='1'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-usb.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-usb.args
new file mode 100644
index 0000000..f41f8b4
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-usb.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-usbdevice disk:/tmp/usbdisk.img \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-usb.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-usb.xml
new file mode 100644
index 0000000..74a30df
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-usb.xml
@@ -0,0 +1,33 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <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='raw'/>
+      <source file='/tmp/usbdisk.img'/>
+      <target dev='sda' bus='usb'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-virtio.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-virtio.args
new file mode 100644
index 0000000..1cb71f7
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-virtio.args
@@ -0,0 +1,25 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-drive file=/tmp/data.img,format=raw,if=virtio \
+-drive file=/tmp/logs.img,format=raw,if=virtio \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-virtio.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-virtio.xml
new file mode 100644
index 0000000..458c55d
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-virtio.xml
@@ -0,0 +1,45 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/tmp/data.img'/>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/tmp/logs.img'/>
+      <target dev='vdb' bus='virtio'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-xenvbd.args b/tests/qemuargv2xmldata/qemuargv2xml-disk-xenvbd.args
new file mode 100644
index 0000000..07fb4e4
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-xenvbd.args
@@ -0,0 +1,25 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,media=cdrom,bus=1,unit=0 \
+-drive file=/tmp/data.img,format=raw,if=xen,index=0 \
+-drive file=/tmp/logs.img,format=raw,if=xen,index=6 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-xenvbd.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-xenvbd.xml
new file mode 100644
index 0000000..e0bad71
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-xenvbd.xml
@@ -0,0 +1,45 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/tmp/data.img'/>
+      <target dev='xvda' bus='xen'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/tmp/logs.img'/>
+      <target dev='xvdg' bus='xen'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl-fullscreen.args b/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl-fullscreen.args
new file mode 100644
index 0000000..d1a3d07
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl-fullscreen.args
@@ -0,0 +1,25 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+XAUTHORITY=/root/.Xauthority \
+DISPLAY=:0.1 \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-full-screen \
+-sdl \
+-vga cirrus
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl-fullscreen.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl-fullscreen.xml
new file mode 100644
index 0000000..1bac0b5
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl-fullscreen.xml
@@ -0,0 +1,34 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <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'/>
+    </video>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl.args b/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl.args
new file mode 100644
index 0000000..77088a8
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl.args
@@ -0,0 +1,24 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+XAUTHORITY=/root/.Xauthority \
+DISPLAY=:0.1 \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-sdl \
+-vga std
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl.xml
new file mode 100644
index 0000000..5f94052
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl.xml
@@ -0,0 +1,34 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <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'/>
+    </video>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-policy.args b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-policy.args
new file mode 100644
index 0000000..8d1dff5
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-policy.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-vnc '[::]:59630,share=allow-exclusive' \
+-vga cirrus
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-policy.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-policy.xml
new file mode 100644
index 0000000..1c76ddc
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-policy.xml
@@ -0,0 +1,36 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <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>
+    <video>
+      <model type='cirrus' vram='16384' heads='1'/>
+    </video>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-sasl.args b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-sasl.args
new file mode 100644
index 0000000..8dce0bb
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-sasl.args
@@ -0,0 +1,24 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+SASL_CONF_PATH=/root/.sasl2 \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-vnc 127.0.0.1:3,sasl \
+-vga cirrus
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-sasl.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-sasl.xml
new file mode 100644
index 0000000..e350142
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-sasl.xml
@@ -0,0 +1,36 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <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>
+    <video>
+      <model type='cirrus' vram='16384' heads='1'/>
+    </video>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-socket.args b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-socket.args
new file mode 100644
index 0000000..ca30fdf
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-socket.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-vnc unix:/tmp/foo.socket \
+-vga cirrus
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-socket.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-socket.xml
new file mode 100644
index 0000000..de70bc4
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-socket.xml
@@ -0,0 +1,34 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <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'/>
+    </video>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-tls.args b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-tls.args
new file mode 100644
index 0000000..165a60c
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-tls.args
@@ -0,0 +1,24 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+SASL_CONF_PATH=/root/.sasl2 \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-vnc 127.0.0.1:3,tls,x509verify=/etc/pki/libvirt-vnc,sasl \
+-vga cirrus
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-tls.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-tls.xml
new file mode 100644
index 0000000..e350142
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-tls.xml
@@ -0,0 +1,36 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <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>
+    <video>
+      <model type='cirrus' vram='16384' heads='1'/>
+    </video>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-websocket.args b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-websocket.args
new file mode 100644
index 0000000..74eedc4
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-websocket.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-net none \
+-serial none \
+-parallel none \
+-vnc 127.0.0.1:0,websocket=5700 \
+-vga cirrus
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-websocket.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-websocket.xml
new file mode 100644
index 0000000..afa4b5a
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-websocket.xml
@@ -0,0 +1,29 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <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>
+    <video>
+      <model type='cirrus' vram='16384' heads='1'/>
+    </video>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc.args b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc.args
new file mode 100644
index 0000000..a228095
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-vnc '[2001:1:2:3:4:5:1234:1234]:3' \
+-vga cirrus
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc.xml
new file mode 100644
index 0000000..3313469
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc.xml
@@ -0,0 +1,36 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <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>
+    <video>
+      <model type='cirrus' vram='16384' heads='1'/>
+    </video>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-hostdev-pci-address.args b/tests/qemuargv2xmldata/qemuargv2xml-hostdev-pci-address.args
new file mode 100644
index 0000000..4b15729
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-hostdev-pci-address.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest2 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9466-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-pcidevice host=06:12.5
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-hostdev-pci-address.xml b/tests/qemuargv2xmldata/qemuargv2xml-hostdev-pci-address.xml
new file mode 100644
index 0000000..b9b5c14
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-hostdev-pci-address.xml
@@ -0,0 +1,33 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest2</name>
+  <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <hostdev mode='subsystem' type='pci' managed='yes'>
+      <source>
+        <address domain='0x0000' bus='0x06' slot='0x12' function='0x5'/>
+      </source>
+    </hostdev>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-hostdev-usb-address.args b/tests/qemuargv2xmldata/qemuargv2xml-hostdev-usb-address.args
new file mode 100644
index 0000000..bc98613
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-hostdev-usb-address.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-usbdevice host:14.6
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-hostdev-usb-address.xml b/tests/qemuargv2xmldata/qemuargv2xml-hostdev-usb-address.xml
new file mode 100644
index 0000000..5807eff
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-hostdev-usb-address.xml
@@ -0,0 +1,33 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <hostdev mode='subsystem' type='usb' managed='no'>
+      <source>
+        <address bus='14' device='6'/>
+      </source>
+    </hostdev>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-hyperv-panic.args b/tests/qemuargv2xmldata/qemuargv2xml-hyperv-panic.args
new file mode 100644
index 0000000..a9f13e0
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-hyperv-panic.args
@@ -0,0 +1,21 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-cpu qemu32,hv_crash \
+-m 214 \
+-smp 6 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-boot n \
+-usb \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-hyperv-panic.xml b/tests/qemuargv2xmldata/qemuargv2xml-hyperv-panic.xml
new file mode 100644
index 0000000..9f0edbb
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-hyperv-panic.xml
@@ -0,0 +1,25 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>6</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='network'/>
+  </os>
+  <features>
+    <acpi/>
+  </features>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+    <panic model='hyperv'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-hyperv.args b/tests/qemuargv2xmldata/qemuargv2xml-hyperv.args
new file mode 100644
index 0000000..a6f37e3
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-hyperv.args
@@ -0,0 +1,21 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-cpu qemu32,hv_relaxed,hv_vapic,hv_spinlocks=0x2fff \
+-m 214 \
+-smp 6 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-boot n \
+-usb \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-hyperv.xml b/tests/qemuargv2xmldata/qemuargv2xml-hyperv.xml
new file mode 100644
index 0000000..5b80040
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-hyperv.xml
@@ -0,0 +1,29 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>6</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='network'/>
+  </os>
+  <features>
+    <acpi/>
+    <hyperv>
+      <relaxed state='on'/>
+      <vapic state='on'/>
+      <spinlocks state='on' retries='12287'/>
+    </hyperv>
+  </features>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-input-usbmouse.args b/tests/qemuargv2xmldata/qemuargv2xml-input-usbmouse.args
new file mode 100644
index 0000000..be5b4b8
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-input-usbmouse.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-usbdevice mouse
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-input-usbmouse.xml b/tests/qemuargv2xmldata/qemuargv2xml-input-usbmouse.xml
new file mode 100644
index 0000000..5765a04
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-input-usbmouse.xml
@@ -0,0 +1,29 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <input type='mouse' bus='usb'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-input-usbtablet.args b/tests/qemuargv2xmldata/qemuargv2xml-input-usbtablet.args
new file mode 100644
index 0000000..3c0be91
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-input-usbtablet.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-usbdevice tablet
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-input-usbtablet.xml b/tests/qemuargv2xmldata/qemuargv2xml-input-usbtablet.xml
new file mode 100644
index 0000000..59d04eb
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-input-usbtablet.xml
@@ -0,0 +1,29 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <input type='tablet' bus='usb'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-kvm-features.args b/tests/qemuargv2xmldata/qemuargv2xml-kvm-features.args
new file mode 100644
index 0000000..ff9f1dc
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-kvm-features.args
@@ -0,0 +1,21 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-cpu qemu32,kvm=off \
+-m 214 \
+-smp 6 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-boot n \
+-usb \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-kvm-features.xml b/tests/qemuargv2xmldata/qemuargv2xml-kvm-features.xml
new file mode 100644
index 0000000..3f2817e
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-kvm-features.xml
@@ -0,0 +1,27 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>6</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='network'/>
+  </os>
+  <features>
+    <acpi/>
+    <kvm>
+      <hidden state='on'/>
+    </kvm>
+  </features>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-kvmclock.args b/tests/qemuargv2xmldata/qemuargv2xml-kvmclock.args
new file mode 100644
index 0000000..1bb74fe
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-kvmclock.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/kvm \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-cpu qemu32,-kvmclock \
+-m 214 \
+-smp 6 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot n \
+-usb \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-kvmclock.xml b/tests/qemuargv2xmldata/qemuargv2xml-kvmclock.xml
new file mode 100644
index 0000000..32fb349
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-kvmclock.xml
@@ -0,0 +1,26 @@ 
+<domain type='kvm'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>6</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='network'/>
+  </os>
+  <features>
+    <pae/>
+  </features>
+  <clock offset='utc'>
+    <timer name='kvmclock' present='no'/>
+  </clock>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/kvm</emulator>
+    <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-off-argv.args b/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-off-argv.args
new file mode 100644
index 0000000..c1609b1
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-off-argv.args
@@ -0,0 +1,20 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-s390x \
+-name QEMUGuest1 \
+-S \
+-machine s390-ccw-virtio,accel=tcg,aes-key-wrap=off \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=virtio,index=0,\
+id=drive-virtio-disk0
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-off-argv.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-off-argv.xml
new file mode 100644
index 0000000..0975d4a
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-off-argv.xml
@@ -0,0 +1,27 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-s390x</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <memballoon model='none'/>
+  </devices>
+  <keywrap>
+    <cipher name='aes' state='off'/>
+  </keywrap>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-on-argv.args b/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-on-argv.args
new file mode 100644
index 0000000..775b484
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-on-argv.args
@@ -0,0 +1,20 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-s390x \
+-name QEMUGuest1 \
+-S \
+-machine s390-ccw-virtio,accel=tcg,aes-key-wrap=on \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=virtio,index=0,\
+id=drive-virtio-disk0
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-on-argv.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-on-argv.xml
new file mode 100644
index 0000000..8aa8f8e
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-aeskeywrap-on-argv.xml
@@ -0,0 +1,27 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-s390x</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <memballoon model='none'/>
+  </devices>
+  <keywrap>
+    <cipher name='aes' state='on'/>
+  </keywrap>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-core-off.args b/tests/qemuargv2xmldata/qemuargv2xml-machine-core-off.args
new file mode 100644
index 0000000..571eb60
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-core-off.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-machine pc,accel=tcg,dump-guest-core=off \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-core-off.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-core-off.xml
new file mode 100644
index 0000000..37a9e22
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-core-off.xml
@@ -0,0 +1,28 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory dumpCore='off' unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-core-on.args b/tests/qemuargv2xmldata/qemuargv2xml-machine-core-on.args
new file mode 100644
index 0000000..4415e95
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-core-on.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-machine pc,accel=tcg,dump-guest-core=on \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-core-on.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-core-on.xml
new file mode 100644
index 0000000..b98f434
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-core-on.xml
@@ -0,0 +1,28 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory dumpCore='on' unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-off-argv.args b/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-off-argv.args
new file mode 100644
index 0000000..e35ab0f
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-off-argv.args
@@ -0,0 +1,20 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-s390x \
+-name QEMUGuest1 \
+-S \
+-machine s390-ccw-virtio,accel=tcg,dea-key-wrap=off \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=virtio,index=0,\
+id=drive-virtio-disk0
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-off-argv.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-off-argv.xml
new file mode 100644
index 0000000..90b6d9f
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-off-argv.xml
@@ -0,0 +1,27 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-s390x</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <memballoon model='none'/>
+  </devices>
+  <keywrap>
+    <cipher name='dea' state='off'/>
+  </keywrap>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-on-argv.args b/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-on-argv.args
new file mode 100644
index 0000000..18dd415
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-on-argv.args
@@ -0,0 +1,20 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-s390x \
+-name QEMUGuest1 \
+-S \
+-machine s390-ccw-virtio,accel=tcg,dea-key-wrap=on \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=virtio,index=0,\
+id=drive-virtio-disk0
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-on-argv.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-on-argv.xml
new file mode 100644
index 0000000..76a6a51
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-deakeywrap-on-argv.xml
@@ -0,0 +1,27 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-s390x</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <memballoon model='none'/>
+  </devices>
+  <keywrap>
+    <cipher name='dea' state='on'/>
+  </keywrap>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-keywrap-none-argv.args b/tests/qemuargv2xmldata/qemuargv2xml-machine-keywrap-none-argv.args
new file mode 100644
index 0000000..283e9b3
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-keywrap-none-argv.args
@@ -0,0 +1,20 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-s390x \
+-name QEMUGuest1 \
+-S \
+-machine s390-ccw-virtio,accel=tcg \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=virtio,index=0,\
+id=drive-virtio-disk0
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-keywrap-none-argv.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-keywrap-none-argv.xml
new file mode 100644
index 0000000..0a963a1
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-keywrap-none-argv.xml
@@ -0,0 +1,24 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-s390x</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-migrate.args b/tests/qemuargv2xmldata/qemuargv2xml-migrate.args
new file mode 100644
index 0000000..8967a60
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-migrate.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-incoming tcp:10.0.0.1:5000
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-migrate.xml b/tests/qemuargv2xmldata/qemuargv2xml-migrate.xml
new file mode 100644
index 0000000..5fcc470
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-migrate.xml
@@ -0,0 +1,28 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.args b/tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.args
new file mode 100644
index 0000000..124fde9
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.args
@@ -0,0 +1,21 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.xml b/tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.xml
new file mode 100644
index 0000000..5e1a101
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.xml
@@ -0,0 +1,31 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <acpi/>
+  </features>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-s3.args b/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-s3.args
new file mode 100644
index 0000000..edd300d
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-s3.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid 8caaa98c-e7bf-5845-126a-1fc316bd1089 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-global PIIX4_PM.disable_s3=1 \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-s3.xml b/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-s3.xml
new file mode 100644
index 0000000..80d8f0f
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-s3.xml
@@ -0,0 +1,31 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>8caaa98c-e7bf-5845-126a-1fc316bd1089</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <pm>
+    <suspend-to-mem enabled='no'/>
+  </pm>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-suspends.args b/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-suspends.args
new file mode 100644
index 0000000..d757d5b
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-suspends.args
@@ -0,0 +1,24 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid 8caaa98c-e7bf-5845-126a-1fc316bd1089 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-global PIIX4_PM.disable_s3=1 \
+-global PIIX4_PM.disable_s4=1 \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-suspends.xml b/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-suspends.xml
new file mode 100644
index 0000000..5da5fa6
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-suspends.xml
@@ -0,0 +1,32 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>8caaa98c-e7bf-5845-126a-1fc316bd1089</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <pm>
+    <suspend-to-mem enabled='no'/>
+    <suspend-to-disk enabled='no'/>
+  </pm>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-enable-s4.args b/tests/qemuargv2xmldata/qemuargv2xml-misc-enable-s4.args
new file mode 100644
index 0000000..22e83dc
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-enable-s4.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid 8caaa98c-e7bf-5845-126a-1fc316bd1089 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-global PIIX4_PM.disable_s4=0 \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-enable-s4.xml b/tests/qemuargv2xmldata/qemuargv2xml-misc-enable-s4.xml
new file mode 100644
index 0000000..8263642
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-enable-s4.xml
@@ -0,0 +1,31 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>8caaa98c-e7bf-5845-126a-1fc316bd1089</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <pm>
+    <suspend-to-disk enabled='yes'/>
+  </pm>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-no-reboot.args b/tests/qemuargv2xmldata/qemuargv2xml-misc-no-reboot.args
new file mode 100644
index 0000000..2923d61
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-no-reboot.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-reboot \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-no-reboot.xml b/tests/qemuargv2xmldata/qemuargv2xml-misc-no-reboot.xml
new file mode 100644
index 0000000..43a88ee
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-no-reboot.xml
@@ -0,0 +1,28 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>destroy</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.args b/tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.args
new file mode 100644
index 0000000..124fde9
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.args
@@ -0,0 +1,21 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.xml b/tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.xml
new file mode 100644
index 0000000..5e1a101
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.xml
@@ -0,0 +1,31 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <acpi/>
+  </features>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-net-eth-ifname.args b/tests/qemuargv2xmldata/qemuargv2xml-net-eth-ifname.args
new file mode 100644
index 0000000..6032ed3
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-net-eth-ifname.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net nic,macaddr=00:11:22:33:44:55,vlan=0,model=rtl8139,name=net0 \
+-net tap,ifname=nic02,script=/etc/qemu-ifup,vlan=0,name=hostnet0 \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-net-eth-ifname.xml b/tests/qemuargv2xmldata/qemuargv2xml-net-eth-ifname.xml
new file mode 100644
index 0000000..d616918
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-net-eth-ifname.xml
@@ -0,0 +1,34 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <interface type='ethernet'>
+      <mac address='00:11:22:33:44:55'/>
+      <script path='/etc/qemu-ifup'/>
+      <target dev='nic02'/>
+      <model type='rtl8139'/>
+    </interface>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-net-eth.args b/tests/qemuargv2xmldata/qemuargv2xml-net-eth.args
new file mode 100644
index 0000000..5a8da4d
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-net-eth.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net nic,macaddr=00:11:22:33:44:55,vlan=0,model=rtl8139,name=net0 \
+-net tap,script=/etc/qemu-ifup,vlan=0,name=hostnet0 \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-net-eth.xml b/tests/qemuargv2xmldata/qemuargv2xml-net-eth.xml
new file mode 100644
index 0000000..bc1a981
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-net-eth.xml
@@ -0,0 +1,33 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <interface type='ethernet'>
+      <mac address='00:11:22:33:44:55'/>
+      <script path='/etc/qemu-ifup'/>
+      <model type='rtl8139'/>
+    </interface>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-net-user.args b/tests/qemuargv2xmldata/qemuargv2xml-net-user.args
new file mode 100644
index 0000000..a6ac1ed
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-net-user.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net nic,macaddr=00:11:22:33:44:55,vlan=0,model=rtl8139,name=net0 \
+-net user,vlan=0,name=hostnet0 \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-net-user.xml b/tests/qemuargv2xmldata/qemuargv2xml-net-user.xml
new file mode 100644
index 0000000..80330aa
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-net-user.xml
@@ -0,0 +1,32 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <interface type='user'>
+      <mac address='00:11:22:33:44:55'/>
+      <model type='rtl8139'/>
+    </interface>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-net-virtio.args b/tests/qemuargv2xmldata/qemuargv2xml-net-virtio.args
new file mode 100644
index 0000000..275c251
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-net-virtio.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net nic,macaddr=00:11:22:33:44:55,vlan=0,model=virtio,name=net0 \
+-net user,vlan=0,name=hostnet0 \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-net-virtio.xml b/tests/qemuargv2xmldata/qemuargv2xml-net-virtio.xml
new file mode 100644
index 0000000..5c0ef55
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-net-virtio.xml
@@ -0,0 +1,32 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <interface type='user'>
+      <mac address='00:11:22:33:44:55'/>
+      <model type='virtio'/>
+    </interface>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-nographics-vga.args b/tests/qemuargv2xmldata/qemuargv2xml-nographics-vga.args
new file mode 100644
index 0000000..5f284e0
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-nographics-vga.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-vga none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-nographics-vga.xml b/tests/qemuargv2xmldata/qemuargv2xml-nographics-vga.xml
new file mode 100644
index 0000000..5fcc470
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-nographics-vga.xml
@@ -0,0 +1,28 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-nosharepages.args b/tests/qemuargv2xmldata/qemuargv2xml-nosharepages.args
new file mode 100644
index 0000000..b5d1f2d
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-nosharepages.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-machine pc,accel=tcg,mem-merge=off \
+-m 215 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-nosharepages.xml b/tests/qemuargv2xmldata/qemuargv2xml-nosharepages.xml
new file mode 100644
index 0000000..c53b7c3
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-nosharepages.xml
@@ -0,0 +1,31 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219200</memory>
+  <currentMemory unit='KiB'>219200</currentMemory>
+  <memoryBacking>
+    <nosharepages/>
+  </memoryBacking>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-parallel-tcp.args b/tests/qemuargv2xmldata/qemuargv2xml-parallel-tcp.args
new file mode 100644
index 0000000..54b5bb6
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-parallel-tcp.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel tcp:127.0.0.1:9999,server,nowait
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-parallel-tcp.xml b/tests/qemuargv2xmldata/qemuargv2xml-parallel-tcp.xml
new file mode 100644
index 0000000..a3dfe9a
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-parallel-tcp.xml
@@ -0,0 +1,33 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <parallel type='tcp'>
+      <source mode='bind' host='127.0.0.1' service='9999'/>
+      <protocol type='raw'/>
+      <target port='0'/>
+    </parallel>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-pseries-disk.args b/tests/qemuargv2xmldata/qemuargv2xml-pseries-disk.args
new file mode 100644
index 0000000..2dd5f1c
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-pseries-disk.args
@@ -0,0 +1,18 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-ppc64 \
+-name QEMUGuest1 \
+-S \
+-M pseries \
+-m 512 \
+-smp 1 \
+-no-acpi \
+-boot c \
+-usb \
+-boot c \
+-hda /dev/HostVG/QEMUGuest1 \
+-cdrom /root/boot.iso
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-pseries-disk.xml b/tests/qemuargv2xmldata/qemuargv2xml-pseries-disk.xml
new file mode 100644
index 0000000..39f4a1f
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-pseries-disk.xml
@@ -0,0 +1,42 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>87eedafe-eedc-4336-8130-ed9fe5dc90c8</uuid>
+  <memory unit='KiB'>524288</memory>
+  <currentMemory unit='KiB'>524288</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='scsi'/>
+      <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='scsi'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
+    </disk>
+    <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'/>
+    <graphics type='sdl'/>
+    <video>
+      <model type='cirrus' vram='16384' heads='1'/>
+    </video>
+    <memballoon model='none'/>
+    <panic model='pseries'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-pseries-nvram.args b/tests/qemuargv2xmldata/qemuargv2xml-pseries-nvram.args
new file mode 100644
index 0000000..1878d9a
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-pseries-nvram.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-ppc64 \
+-name QEMUGuest1 \
+-S \
+-M pseries \
+-m 512 \
+-smp 1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-net none \
+-serial none \
+-parallel none \
+-global spapr-nvram.reg=0x4000
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-pseries-nvram.xml b/tests/qemuargv2xmldata/qemuargv2xml-pseries-nvram.xml
new file mode 100644
index 0000000..2da2832
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-pseries-nvram.xml
@@ -0,0 +1,25 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>524288</memory>
+  <currentMemory unit='KiB'>524288</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='ppc64' machine='pseries'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-ppc64</emulator>
+    <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+    <nvram>
+      <address type='spapr-vio' reg='0x4000'/>
+    </nvram>
+    <panic model='pseries'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-qemu-ns-no-env.args b/tests/qemuargv2xmldata/qemuargv2xml-qemu-ns-no-env.args
new file mode 100644
index 0000000..19dafcc
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-qemu-ns-no-env.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-unknown parameter
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-qemu-ns-no-env.xml b/tests/qemuargv2xmldata/qemuargv2xml-qemu-ns-no-env.xml
new file mode 100644
index 0000000..3e43132
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-qemu-ns-no-env.xml
@@ -0,0 +1,32 @@ 
+<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+  <qemu:commandline>
+    <qemu:arg value='-unknown'/>
+    <qemu:arg value='parameter'/>
+  </qemu:commandline>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-disabled.args b/tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-disabled.args
new file mode 100644
index 0000000..c7f5ee8
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-disabled.args
@@ -0,0 +1,21 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 6 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot order=n,reboot-timeout=-1 \
+-usb \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-disabled.xml b/tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-disabled.xml
new file mode 100644
index 0000000..974b966
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-disabled.xml
@@ -0,0 +1,22 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>6</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='network'/>
+    <bios rebootTimeout='-1'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-enabled.args b/tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-enabled.args
new file mode 100644
index 0000000..d09350a
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-enabled.args
@@ -0,0 +1,21 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 6 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot order=n,reboot-timeout=128 \
+-usb \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-enabled.xml b/tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-enabled.xml
new file mode 100644
index 0000000..4d400e1
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-reboot-timeout-enabled.xml
@@ -0,0 +1,22 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>6</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='network'/>
+    <bios rebootTimeout='128'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-restore-v2.args b/tests/qemuargv2xmldata/qemuargv2xml-restore-v2.args
new file mode 100644
index 0000000..b3366b8
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-restore-v2.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-incoming exec:cat
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-restore-v2.xml b/tests/qemuargv2xmldata/qemuargv2xml-restore-v2.xml
new file mode 100644
index 0000000..5fcc470
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-restore-v2.xml
@@ -0,0 +1,28 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.args b/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.args
new file mode 100644
index 0000000..9b75988
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial /dev/ttyS2 \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml
new file mode 100644
index 0000000..4c4de66
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml
@@ -0,0 +1,36 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <serial type='dev'>
+      <source path='/dev/ttyS2'/>
+      <target port='0'/>
+    </serial>
+    <console type='dev'>
+      <source path='/dev/ttyS2'/>
+      <target type='serial' port='0'/>
+    </console>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-file.args b/tests/qemuargv2xmldata/qemuargv2xml-serial-file.args
new file mode 100644
index 0000000..796b245
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-file.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial file:/tmp/serial.log \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml
new file mode 100644
index 0000000..e4b0396
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml
@@ -0,0 +1,36 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <serial type='file'>
+      <source path='/tmp/serial.log'/>
+      <target port='0'/>
+    </serial>
+    <console type='file'>
+      <source path='/tmp/serial.log'/>
+      <target type='serial' port='0'/>
+    </console>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-many.args b/tests/qemuargv2xmldata/qemuargv2xml-serial-many.args
new file mode 100644
index 0000000..d23cb32
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-many.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial pty \
+-serial file:/tmp/serial.log \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml
new file mode 100644
index 0000000..8bce8f5
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml
@@ -0,0 +1,38 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <serial type='pty'>
+      <target port='0'/>
+    </serial>
+    <serial type='file'>
+      <source path='/tmp/serial.log'/>
+      <target port='1'/>
+    </serial>
+    <console type='pty'>
+      <target type='serial' port='0'/>
+    </console>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.args b/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.args
new file mode 100644
index 0000000..1adfde1
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial pty \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml
new file mode 100644
index 0000000..1de2305
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml
@@ -0,0 +1,34 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <serial type='pty'>
+      <target port='0'/>
+    </serial>
+    <console type='pty'>
+      <target type='serial' port='0'/>
+    </console>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.args b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.args
new file mode 100644
index 0000000..a44caa1
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial telnet:127.0.0.1:9999,server,nowait \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml
new file mode 100644
index 0000000..5a667d7
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml
@@ -0,0 +1,38 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <serial type='tcp'>
+      <source mode='bind' host='127.0.0.1' service='9999'/>
+      <protocol type='telnet'/>
+      <target port='0'/>
+    </serial>
+    <console type='tcp'>
+      <source mode='bind' host='127.0.0.1' service='9999'/>
+      <protocol type='telnet'/>
+      <target type='serial' port='0'/>
+    </console>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.args b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.args
new file mode 100644
index 0000000..e08ad0f
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial tcp:127.0.0.1:9999 \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml
new file mode 100644
index 0000000..cc8bcfe
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml
@@ -0,0 +1,38 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <serial type='tcp'>
+      <source mode='connect' host='127.0.0.1' service='9999'/>
+      <protocol type='raw'/>
+      <target port='0'/>
+    </serial>
+    <console type='tcp'>
+      <source mode='connect' host='127.0.0.1' service='9999'/>
+      <protocol type='raw'/>
+      <target type='serial' port='0'/>
+    </console>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.args b/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.args
new file mode 100644
index 0000000..b40adbf
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial udp:127.0.0.1:9998@127.0.0.1:9999 \
+-serial udp::9999@:0 \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml
new file mode 100644
index 0000000..8cc2f9c
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml
@@ -0,0 +1,42 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <serial type='udp'>
+      <source mode='bind' host='127.0.0.1' service='9999'/>
+      <source mode='connect' host='127.0.0.1' service='9998'/>
+      <target port='0'/>
+    </serial>
+    <serial type='udp'>
+      <source mode='connect' service='9999'/>
+      <target port='1'/>
+    </serial>
+    <console type='udp'>
+      <source mode='bind' host='127.0.0.1' service='9999'/>
+      <source mode='connect' host='127.0.0.1' service='9998'/>
+      <target type='serial' port='0'/>
+    </console>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.args b/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.args
new file mode 100644
index 0000000..80961d0
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial unix:/tmp/serial.sock \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml
new file mode 100644
index 0000000..6bb1ce9
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml
@@ -0,0 +1,36 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <serial type='unix'>
+      <source mode='connect' path='/tmp/serial.sock'/>
+      <target port='0'/>
+    </serial>
+    <console type='unix'>
+      <source mode='connect' path='/tmp/serial.sock'/>
+      <target type='serial' port='0'/>
+    </console>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.args b/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.args
new file mode 100644
index 0000000..1acbbbc
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial vc \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml
new file mode 100644
index 0000000..ea789ab
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml
@@ -0,0 +1,34 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <serial type='vc'>
+      <target port='0'/>
+    </serial>
+    <console type='vc'>
+      <target type='serial' port='0'/>
+    </console>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-smp.args b/tests/qemuargv2xmldata/qemuargv2xml-smp.args
new file mode 100644
index 0000000..ebaa83e
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-smp.args
@@ -0,0 +1,22 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1,maxcpus=2,sockets=2,cores=1,threads=1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-smp.xml b/tests/qemuargv2xmldata/qemuargv2xml-smp.xml
new file mode 100644
index 0000000..365e9df
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-smp.xml
@@ -0,0 +1,31 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static' current='1'>2</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu>
+    <topology sockets='2' cores='1' threads='1'/>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-sound.args b/tests/qemuargv2xmldata/qemuargv2xml-sound.args
new file mode 100644
index 0000000..bc005d0
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-sound.args
@@ -0,0 +1,23 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-soundhw pcspk,es1370,sb16,ac97
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-sound.xml b/tests/qemuargv2xmldata/qemuargv2xml-sound.xml
new file mode 100644
index 0000000..7349003
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-sound.xml
@@ -0,0 +1,32 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <sound model='pcspk'/>
+    <sound model='es1370'/>
+    <sound model='sb16'/>
+    <sound model='ac97'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-watchdog.args b/tests/qemuargv2xmldata/qemuargv2xml-watchdog.args
new file mode 100644
index 0000000..cb40337
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-watchdog.args
@@ -0,0 +1,24 @@ 
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=ide,bus=0,unit=0 \
+-net none \
+-serial none \
+-parallel none \
+-watchdog ib700 \
+-watchdog-action poweroff
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-watchdog.xml b/tests/qemuargv2xmldata/qemuargv2xml-watchdog.xml
new file mode 100644
index 0000000..2bbb826
--- /dev/null
+++ b/tests/qemuargv2xmldata/qemuargv2xml-watchdog.xml
@@ -0,0 +1,29 @@ 
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='block' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source dev='/dev/HostVG/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <watchdog model='ib700' action='poweroff'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c
index 7759a09..d6189c7 100644
--- a/tests/qemuargv2xmltest.c
+++ b/tests/qemuargv2xmltest.c
@@ -124,9 +124,9 @@  testCompareXMLToArgvHelper(const void *data)
     char *xml = NULL;
     char *args = NULL;
 
-    if (virAsprintf(&xml, "%s/qemuxml2argvdata/qemuxml2argv-%s.xml",
+    if (virAsprintf(&xml, "%s/qemuargv2xmldata/qemuargv2xml-%s.xml",
                     abs_srcdir, info->name) < 0 ||
-        virAsprintf(&args, "%s/qemuxml2argvdata/qemuxml2argv-%s.args",
+        virAsprintf(&args, "%s/qemuargv2xmldata/qemuargv2xml-%s.args",
                     abs_srcdir, info->name) < 0)
         goto cleanup;