Devel
Threads by month
- ----- 2026 -----
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- 17 participants
- 40169 discussions
Based on some feedback from Steve Grubb, Stephan Mueller, and others
(unfortunately most of it on some non-public lists), I'm proposing the
following patches to enhance my earlier audits for device cgroup ACLs.
Pre-patch, cgroup audits looked like:
type=VIRT_RESOURCE msg=audit(1298068194.479:83142): user pid=23863 uid=0 auid=500 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='resrc=cgroup reason=deny vm="fedora_12" uuid=51c6fc83-65a4-e627-b698-042b00145201 item=all: exe="/home/dummy/libvirt/daemon/.libs/lt-libvirtd" hostname=? addr=? terminal=pts/0 res=success'
type=VIRT_RESOURCE msg=audit(1298068194.480:83143): user pid=23863 uid=0 auid=500 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='resrc=cgroup reason=allow vm="fedora_12" uuid=51c6fc83-65a4-e627-b698-042b00145201 item=major type="pty": exe="/home/dummy/libvirt/daemon/.libs/lt-libvirtd" hostname=? addr=? terminal=pts/0 res=success'
type=VIRT_RESOURCE msg=audit(1298068194.480:83145): user pid=23863 uid=0 auid=500 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='resrc=cgroup reason=allow vm="fedora_12" uuid=51c6fc83-65a4-e627-b698-042b00145201 item=file path="/dev/null": exe="/home/dummy/libvirt/daemon/.libs/lt-libvirtd" hostname=? addr=? terminal=pts/0 res=success'
Post-patch, the same three audits are modified to include cgroup
controller, rdev information for files, major device number for
categories, and better names so as not to collide with well-known
audit field names (for example, audit libraries expect item= to match
a decimal integer, so I used class= instead).
type=VIRT_RESOURCE msg=audit(1299541864.111:78295): user pid=30632 uid=0 auid=500 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='resrc=cgroup reason=deny vm="fedora_12" uuid=51c6fc83-65a4-e627-b698-042b00145201 cgroup="/cgroup/devices/libvirt/qemu/fedora_12/" class=all: exe="/home/dummy/libvirt/daemon/.libs/lt-libvirtd" hostname=? addr=? terminal=pts/0 res=success'
type=VIRT_RESOURCE msg=audit(1299541864.112:78296): user pid=30632 uid=0 auid=500 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='resrc=cgroup reason=allow vm="fedora_12" uuid=51c6fc83-65a4-e627-b698-042b00145201 cgroup="/cgroup/devices/libvirt/qemu/fedora_12/" class=major category=pty maj=88: exe="/home/dummy/libvirt/daemon/.libs/lt-libvirtd" hostname=? addr=? terminal=pts/0 res=success'
type=VIRT_RESOURCE msg=audit(1299541864.112:78297): user pid=30632 uid=0 auid=500 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='resrc=cgroup reason=allow vm="fedora_12" uuid=51c6fc83-65a4-e627-b698-042b00145201 cgroup="/cgroup/devices/libvirt/qemu/fedora_12/" class=path path=/dev/null rdev=01:03: exe="/home/dummy/libvirt/daemon/.libs/lt-libvirtd" hostname=? addr=? terminal=pts/0 res=success'
Eric Blake (3):
audit: tweak audit messages to match conventions
audit: split cgroup audit types to allow more information
audit: also audit cgroup controller path
src/libvirt_private.syms | 1 +
src/qemu/qemu_audit.c | 115 ++++++++++++++++++++++++++++++++++++++++------
src/qemu/qemu_audit.h | 14 +++++-
src/qemu/qemu_cgroup.c | 29 ++++++------
src/qemu/qemu_driver.c | 8 ++--
src/util/cgroup.c | 8 ++--
src/util/cgroup.h | 5 ++
7 files changed, 142 insertions(+), 38 deletions(-)
--
1.7.4
1
3
Hi there,
Attaching/detachnig virtio disk to a VM used to work fine with RHEL-5 but with RHEL-6 it seems to have problems.
Attaching seems to work. For example, I can do
virsh attach-disk <vmname> <qcow2 file name> vdb --driver file --subdriver qcow2
However, it generates a bit weird XML:
<disk type='file' device='disk'>
<driver name='file' type='qcow2'/>
<source file='<file>/>
<target dev='vdb' bus='virtio'/>
<alias name='virtio-disk1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</disk>
In contrary, our original VM system disk has
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='<sys disk image>'/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
Note the different of driver name: qemu vs file.
I think qemu is the proper name to use. This has been mentioned last year on this list [1]. I wonder if there has already been a proper fix for this problem.
More seriously about this is that I am not able to detach the just attached disk, most likely due to the problem of wrong driver name.
[cloudadmin@test2 ~]$ virsh detach-disk one-52 vdb
error: Failed to detach disk
error: operation failed: detaching virtio-disk1 device failed: Device 'virtio-disk1' not found
But if I tried to remove the vda which uses qemu as driver name it would work.
[cloudadmin@test2 ~]$ virsh detach-disk one-52 vda
Disk detached successfully
I also tried with raw disks to attach/detach and saw the same problems.
Thank you very much.
Shi
[1]: http://www.redhat.com/archives/libvir-list/2010-August/msg00449.html
--
Shi Jin, PhD
4
14
[libvirt] [PATCH v2] virsh: Change option parsing functions to return tri-state information.
by Michal Privoznik 07 Mar '11
by Michal Privoznik 07 Mar '11
07 Mar '11
This is needed to detect situations when optional argument was
specified with non-integer value: '--int-opt foo'. To keep functions
uniform vshCommandOptString function was also changed, because it
returns tri-state value as well. Given result pointer is updated only
in case of success. If parsing fails, result is not updated at all.
diff --git a/tools/virsh.c b/tools/virsh.c
index f3754d7..c274a6b 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -252,13 +252,14 @@ static const vshCmdGrp *vshCmdGrpSearch(const char *grpname);
static int vshCmdGrpHelp(vshControl *ctl, const char *name);
static vshCmdOpt *vshCommandOpt(const vshCmd *cmd, const char *name);
-static int vshCommandOptInt(const vshCmd *cmd, const char *name, int *found);
-static unsigned long vshCommandOptUL(const vshCmd *cmd, const char *name,
- int *found);
-static char *vshCommandOptString(const vshCmd *cmd, const char *name,
- int *found);
-static long long vshCommandOptLongLong(const vshCmd *cmd, const char *name,
- int *found);
+static int vshCommandOptInt(const vshCmd *cmd, const char *name, int *value)
+ ATTRIBUTE_NONNULL(3);
+static int vshCommandOptUL(const vshCmd *cmd, const char *name,
+ unsigned long *value) ATTRIBUTE_NONNULL(3);
+static int vshCommandOptString(const vshCmd *cmd, const char *name,
+ char **value) ATTRIBUTE_NONNULL(3);
+static int vshCommandOptLongLong(const vshCmd *cmd, const char *name,
+ unsigned long long *value) ATTRIBUTE_NONNULL(3);
static int vshCommandOptBool(const vshCmd *cmd, const char *name);
static char *vshCommandOptArgv(const vshCmd *cmd, int count);
@@ -589,9 +590,9 @@ static const vshCmdOptDef opts_help[] = {
static int
cmdHelp(vshControl *ctl, const vshCmd *cmd)
{
- const char *name;
+ char *name = NULL;
- name = vshCommandOptString(cmd, "command", NULL);
+ vshCommandOptString(cmd, "command", &name);
if (!name) {
const vshCmdGrp *grp;
@@ -704,8 +705,7 @@ cmdConnect(vshControl *ctl, const vshCmd *cmd)
}
VIR_FREE(ctl->name);
- name = vshCommandOptString(cmd, "name", NULL);
- if (!name)
+ if (vshCommandOptString(cmd, "name", &name) <= 0)
return FALSE;
ctl->name = vshStrdup(ctl, name);
@@ -773,7 +773,7 @@ cmdConsole(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom;
int ret;
- const char *name;
+ const char *name = NULL;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
@@ -781,7 +781,7 @@ cmdConsole(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- name = vshCommandOptString(cmd, "devname", NULL);
+ vshCommandOptString(cmd, "devname", (char**) &name);
ret = cmdRunConsole(ctl, dom, name);
@@ -964,7 +964,7 @@ static int
cmdDomblkstat (vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom;
- char *name, *device;
+ char *name, *device = NULL;
struct _virDomainBlockStats stats;
if (!vshConnectionUsability (ctl, ctl->conn))
@@ -973,7 +973,7 @@ cmdDomblkstat (vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain (ctl, cmd, &name)))
return FALSE;
- if (!(device = vshCommandOptString (cmd, "device", NULL))) {
+ if (vshCommandOptString (cmd, "device", &device) <= 0) {
virDomainFree(dom);
return FALSE;
}
@@ -1021,7 +1021,7 @@ static int
cmdDomIfstat (vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom;
- char *name, *device;
+ char *name, *device = NULL;
struct _virDomainInterfaceStats stats;
if (!vshConnectionUsability (ctl, ctl->conn))
@@ -1030,7 +1030,7 @@ cmdDomIfstat (vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain (ctl, cmd, &name)))
return FALSE;
- if (!(device = vshCommandOptString (cmd, "interface", NULL))) {
+ if (vshCommandOptString (cmd, "interface", &device) <= 0) {
virDomainFree(dom);
return FALSE;
}
@@ -1144,7 +1144,7 @@ cmdDomblkinfo(vshControl *ctl, const vshCmd *cmd)
virDomainBlockInfo info;
virDomainPtr dom;
int ret = TRUE;
- const char *device;
+ const char *device = NULL;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
@@ -1152,7 +1152,7 @@ cmdDomblkinfo(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- if (!(device = vshCommandOptString (cmd, "device", NULL))) {
+ if (vshCommandOptString (cmd, "device", (char**) &device) <= 0) {
virDomainFree(dom);
return FALSE;
}
@@ -1230,8 +1230,7 @@ static int
cmdCreate(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom;
- char *from;
- int found;
+ char *from = NULL;
int ret = TRUE;
char *buffer;
#ifndef WIN32
@@ -1242,8 +1241,7 @@ cmdCreate(vshControl *ctl, const vshCmd *cmd)
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
return FALSE;
if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0)
@@ -1288,16 +1286,14 @@ static int
cmdDefine(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom;
- char *from;
- int found;
+ char *from = NULL;
int ret = TRUE;
char *buffer;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
return FALSE;
if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0)
@@ -1336,15 +1332,13 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom;
int ret = TRUE;
- char *name;
- int found;
+ char *name = NULL;
int id;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- name = vshCommandOptString(cmd, "domain", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "domain", &name) <= 0)
return FALSE;
if (name && virStrToLong_i(name, NULL, 10, &id) == 0
@@ -1455,13 +1449,13 @@ cmdSave(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom;
char *name;
- char *to;
+ char *to = NULL;
int ret = TRUE;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- if (!(to = vshCommandOptString(cmd, "file", NULL)))
+ if (vshCommandOptString(cmd, "file", &to) <= 0)
return FALSE;
if (!(dom = vshCommandOptDomain(ctl, cmd, &name)))
@@ -1594,7 +1588,6 @@ static int
cmdSchedInfoUpdate(vshControl *ctl, const vshCmd *cmd,
virSchedParameterPtr param)
{
- int found;
char *data;
/* Legacy 'weight' parameter */
@@ -1602,8 +1595,7 @@ cmdSchedInfoUpdate(vshControl *ctl, const vshCmd *cmd,
param->type == VIR_DOMAIN_SCHED_FIELD_UINT &&
vshCommandOptBool(cmd, "weight")) {
int val;
- val = vshCommandOptInt(cmd, "weight", &found);
- if (!found) {
+ if (vshCommandOptInt(cmd, "weight", &val) <= 0) {
vshError(ctl, "%s", _("Invalid value of weight"));
return -1;
} else {
@@ -1617,8 +1609,7 @@ cmdSchedInfoUpdate(vshControl *ctl, const vshCmd *cmd,
param->type == VIR_DOMAIN_SCHED_FIELD_UINT &&
vshCommandOptBool(cmd, "cap")) {
int val;
- val = vshCommandOptInt(cmd, "cap", &found);
- if (!found) {
+ if (vshCommandOptInt(cmd, "cap", &val) <= 0) {
vshError(ctl, "%s", _("Invalid value of cap"));
return -1;
} else {
@@ -1627,7 +1618,7 @@ cmdSchedInfoUpdate(vshControl *ctl, const vshCmd *cmd,
return 1;
}
- if ((data = vshCommandOptString(cmd, "set", NULL))) {
+ if (vshCommandOptString(cmd, "set", &data)) {
char *val = strchr(data, '=');
int match = 0;
if (!val) {
@@ -1746,8 +1737,8 @@ cmdSchedinfo(vshControl *ctl, const vshCmd *cmd)
/* See if we've tried to --set var=val. If so, the fact that
we reach this point (with update == 0) means that "var" did
not match any of the settable parameters. Report the error. */
- char *var_value_pair = vshCommandOptString(cmd, "set", NULL);
- if (var_value_pair) {
+ char *var_value_pair = NULL;
+ if (vshCommandOptString(cmd, "set", &var_value_pair) > 0) {
vshError(ctl, _("invalid scheduler option: %s"),
var_value_pair);
goto cleanup;
@@ -1804,15 +1795,13 @@ static const vshCmdOptDef opts_restore[] = {
static int
cmdRestore(vshControl *ctl, const vshCmd *cmd)
{
- char *from;
- int found;
+ char *from = NULL;
int ret = TRUE;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
return FALSE;
if (virDomainRestore(ctl->conn, from) == 0) {
@@ -1846,14 +1835,14 @@ cmdDump(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom;
char *name;
- char *to;
+ char *to = NULL;
int ret = TRUE;
int flags = 0;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- if (!(to = vshCommandOptString(cmd, "file", NULL)))
+ if (vshCommandOptString(cmd, "file", &to) <= 0)
return FALSE;
if (!(dom = vshCommandOptDomain(ctl, cmd, &name)))
@@ -2300,7 +2289,10 @@ cmdFreecell(vshControl *ctl, const vshCmd *cmd)
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- cell = vshCommandOptInt(cmd, "cellno", &cell_given);
+ if ( (cell_given = vshCommandOptInt(cmd, "cellno", &cell)) < 0) {
+ vshError(ctl, "%s", _("cell number has to be a number"));
+ goto cleanup;
+ }
all_given = vshCommandOptBool(cmd, "all");
if (all_given && cell_given) {
@@ -2412,10 +2404,10 @@ static const vshCmdOptDef opts_maxvcpus[] = {
static int
cmdMaxvcpus(vshControl *ctl, const vshCmd *cmd)
{
- char *type;
+ char *type = NULL;
int vcpus;
- type = vshCommandOptString(cmd, "type", NULL);
+ vshCommandOptString(cmd, "type", &type);
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
@@ -2712,9 +2704,8 @@ cmdVcpupin(vshControl *ctl, const vshCmd *cmd)
virDomainPtr dom;
virNodeInfo nodeinfo;
int vcpu;
- char *cpulist;
+ char *cpulist = NULL;
int ret = TRUE;
- int vcpufound = 0;
unsigned char *cpumap;
int cpumaplen;
int i;
@@ -2726,14 +2717,13 @@ cmdVcpupin(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- vcpu = vshCommandOptInt(cmd, "vcpu", &vcpufound);
- if (!vcpufound) {
+ if (vshCommandOptInt(cmd, "vcpu", &vcpu) <= 0) {
vshError(ctl, "%s", _("vcpupin: Invalid or missing vCPU number."));
virDomainFree(dom);
return FALSE;
}
- if (!(cpulist = vshCommandOptString(cmd, "cpulist", NULL))) {
+ if (vshCommandOptString(cmd, "cpulist", &cpulist) <= 0) {
virDomainFree(dom);
return FALSE;
}
@@ -2862,7 +2852,7 @@ cmdSetvcpus(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- count = vshCommandOptInt(cmd, "count", &count);
+ vshCommandOptInt(cmd, "count", &count);
if (!flags) {
if (virDomainSetVcpus(dom, count) != 0) {
@@ -2918,7 +2908,7 @@ cmdSetmem(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom;
virDomainInfo info;
- unsigned long kilobytes;
+ unsigned long kilobytes = 0;
int ret = TRUE;
if (!vshConnectionUsability(ctl, ctl->conn))
@@ -2927,7 +2917,7 @@ cmdSetmem(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- kilobytes = vshCommandOptUL(cmd, "kilobytes", NULL);
+ vshCommandOptUL(cmd, "kilobytes", &kilobytes);
if (kilobytes <= 0) {
virDomainFree(dom);
vshError(ctl, _("Invalid value of %lu for memory size"), kilobytes);
@@ -2984,7 +2974,7 @@ cmdSetmaxmem(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- kilobytes = vshCommandOptInt(cmd, "kilobytes", &kilobytes);
+ vshCommandOptInt(cmd, "kilobytes", &kilobytes);
if (kilobytes <= 0) {
virDomainFree(dom);
vshError(ctl, _("Invalid value of %d for memory size"), kilobytes);
@@ -3043,7 +3033,7 @@ static int
cmdMemtune(vshControl * ctl, const vshCmd * cmd)
{
virDomainPtr dom;
- long long hard_limit, soft_limit, swap_hard_limit, min_guarantee;
+ long long hard_limit = 0, soft_limit = 0, swap_hard_limit = 0, min_guarantee = 0;
int nparams = 0;
unsigned int i = 0;
virMemoryParameterPtr params = NULL, temp = NULL;
@@ -3055,23 +3045,19 @@ cmdMemtune(vshControl * ctl, const vshCmd * cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- hard_limit =
- vshCommandOptLongLong(cmd, "hard-limit", NULL);
+ vshCommandOptLongLong(cmd, "hard-limit", (unsigned long long*) &hard_limit);
if (hard_limit)
nparams++;
- soft_limit =
- vshCommandOptLongLong(cmd, "soft-limit", NULL);
+ vshCommandOptLongLong(cmd, "soft-limit", (unsigned long long*) &soft_limit);
if (soft_limit)
nparams++;
- swap_hard_limit =
- vshCommandOptLongLong(cmd, "swap-hard-limit", NULL);
+ vshCommandOptLongLong(cmd, "swap-hard-limit", (unsigned long long*) &swap_hard_limit);
if (swap_hard_limit)
nparams++;
- min_guarantee =
- vshCommandOptLongLong(cmd, "min-guarantee", NULL);
+ vshCommandOptLongLong(cmd, "min-guarantee", (unsigned long long*)&min_guarantee);
if (min_guarantee)
nparams++;
@@ -3315,8 +3301,8 @@ static int
cmdDomXMLFromNative(vshControl *ctl, const vshCmd *cmd)
{
int ret = TRUE;
- char *format;
- char *configFile;
+ char *format = NULL;
+ char *configFile = NULL;
char *configData;
char *xmlData;
int flags = 0;
@@ -3324,8 +3310,8 @@ cmdDomXMLFromNative(vshControl *ctl, const vshCmd *cmd)
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- format = vshCommandOptString(cmd, "format", NULL);
- configFile = vshCommandOptString(cmd, "config", NULL);
+ vshCommandOptString(cmd, "format",&format);
+ vshCommandOptString(cmd, "config", &configFile);
if (virFileReadAll(configFile, 1024*1024, &configData) < 0)
return FALSE;
@@ -3360,8 +3346,8 @@ static int
cmdDomXMLToNative(vshControl *ctl, const vshCmd *cmd)
{
int ret = TRUE;
- char *format;
- char *xmlFile;
+ char *format = NULL;
+ char *xmlFile = NULL;
char *configData;
char *xmlData;
int flags = 0;
@@ -3369,8 +3355,8 @@ cmdDomXMLToNative(vshControl *ctl, const vshCmd *cmd)
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- format = vshCommandOptString(cmd, "format", NULL);
- xmlFile = vshCommandOptString(cmd, "xml", NULL);
+ vshCommandOptString(cmd, "format", &format);
+ vshCommandOptString(cmd, "xml", &xmlFile);
if (virFileReadAll(xmlFile, 1024*1024, &xmlData) < 0)
return FALSE;
@@ -3525,10 +3511,10 @@ doMigrate (void *opaque)
{
char ret = '1';
virDomainPtr dom = NULL;
- const char *desturi;
- const char *migrateuri;
- const char *dname;
- int flags = 0, found;
+ const char *desturi = NULL;
+ const char *migrateuri = NULL;
+ const char *dname = NULL;
+ int flags = 0;
vshCtrlData *data = opaque;
vshControl *ctl = data->ctl;
const vshCmd *cmd = data->cmd;
@@ -3547,13 +3533,12 @@ doMigrate (void *opaque)
if (!(dom = vshCommandOptDomain (ctl, cmd, NULL)))
goto out;
- desturi = vshCommandOptString (cmd, "desturi", &found);
- if (!found)
+ if (vshCommandOptString (cmd, "desturi", (char**) &desturi) <= 0)
goto out;
- migrateuri = vshCommandOptString (cmd, "migrateuri", NULL);
+ vshCommandOptString(cmd, "migrateuri", (char**) &migrateuri);
- dname = vshCommandOptString (cmd, "dname", NULL);
+ vshCommandOptString(cmd, "dname", (char**) &dname);
if (vshCommandOptBool (cmd, "live"))
flags |= VIR_MIGRATE_LIVE;
@@ -3645,7 +3630,6 @@ cmdMigrate (vshControl *ctl, const vshCmd *cmd)
int ret = -1;
virThread workerThread;
struct pollfd pollfd;
- int found;
char retchar;
struct sigaction sig_action;
struct sigaction old_sig_action;
@@ -3670,8 +3654,7 @@ cmdMigrate (vshControl *ctl, const vshCmd *cmd)
if (vshCommandOptBool (cmd, "live"))
live_flag = TRUE;
- timeout = vshCommandOptInt(cmd, "timeout", &found);
- if (found) {
+ if (vshCommandOptInt(cmd, "timeout", &timeout)) {
if (! live_flag) {
vshError(ctl, "%s", _("migrate: Unexpected timeout for offline migration"));
goto cleanup;
@@ -3798,7 +3781,6 @@ cmdMigrateSetMaxDowntime(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom = NULL;
long long downtime;
- int found;
int ret = FALSE;
if (!vshConnectionUsability(ctl, ctl->conn))
@@ -3807,8 +3789,8 @@ cmdMigrateSetMaxDowntime(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- downtime = vshCommandOptLongLong(cmd, "downtime", &found);
- if (!found || downtime < 1) {
+ if ((vshCommandOptLongLong(cmd, "downtime", (unsigned long long*)&downtime) <= 0) ||
+ (downtime < 0)) {
vshError(ctl, "%s", _("migrate: Invalid downtime"));
goto done;
}
@@ -3890,16 +3872,14 @@ static int
cmdNetworkCreate(vshControl *ctl, const vshCmd *cmd)
{
virNetworkPtr network;
- char *from;
- int found;
+ char *from = NULL;
int ret = TRUE;
char *buffer;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
return FALSE;
if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0)
@@ -3938,16 +3918,14 @@ static int
cmdNetworkDefine(vshControl *ctl, const vshCmd *cmd)
{
virNetworkPtr network;
- char *from;
- int found;
+ char *from = NULL;
int ret = TRUE;
char *buffer;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
return FALSE;
if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0)
@@ -4711,16 +4689,14 @@ static int
cmdInterfaceDefine(vshControl *ctl, const vshCmd *cmd)
{
virInterfacePtr iface;
- char *from;
- int found;
+ char *from = NULL;
int ret = TRUE;
char *buffer;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
return FALSE;
if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0)
@@ -4873,16 +4849,14 @@ static int
cmdNWFilterDefine(vshControl *ctl, const vshCmd *cmd)
{
virNWFilterPtr nwfilter;
- char *from;
- int found;
+ char *from = NULL;
int ret = TRUE;
char *buffer;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
return FALSE;
if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0)
@@ -5214,16 +5188,14 @@ static int
cmdPoolCreate(vshControl *ctl, const vshCmd *cmd)
{
virStoragePoolPtr pool;
- char *from;
- int found;
+ char *from = NULL;
int ret = TRUE;
char *buffer;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
return FALSE;
if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0)
@@ -5266,18 +5238,15 @@ static int
cmdNodeDeviceCreate(vshControl *ctl, const vshCmd *cmd)
{
virNodeDevicePtr dev = NULL;
- char *from;
- int found = 0;
+ char *from = NULL;
int ret = TRUE;
char *buffer;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found) {
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
return FALSE;
- }
if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0)
return FALSE;
@@ -5319,17 +5288,14 @@ cmdNodeDeviceDestroy(vshControl *ctl, const vshCmd *cmd)
{
virNodeDevicePtr dev = NULL;
int ret = TRUE;
- int found = 0;
- char *name;
+ char *name = NULL;
if (!vshConnectionUsability(ctl, ctl->conn)) {
return FALSE;
}
- name = vshCommandOptString(cmd, "name", &found);
- if (!found) {
+ if (vshCommandOptString(cmd, "name", &name) <= 0)
return FALSE;
- }
dev = virNodeDeviceLookupByName(ctl->conn, name);
@@ -5363,23 +5329,21 @@ static const vshCmdOptDef opts_pool_X_as[] = {
static int buildPoolXML(const vshCmd *cmd, char **retname, char **xml) {
- int found;
- char *name, *type, *srcHost, *srcPath, *srcDev, *srcName, *srcFormat, *target;
+ char *name = NULL, *type = NULL, *srcHost = NULL, *srcPath = NULL,
+ *srcDev = NULL, *srcName = NULL, *srcFormat = NULL, *target = NULL;
virBuffer buf = VIR_BUFFER_INITIALIZER;
- name = vshCommandOptString(cmd, "name", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "name", &name) <= 0)
goto cleanup;
- type = vshCommandOptString(cmd, "type", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "type", &type) <= 0)
goto cleanup;
- srcHost = vshCommandOptString(cmd, "source-host", &found);
- srcPath = vshCommandOptString(cmd, "source-path", &found);
- srcDev = vshCommandOptString(cmd, "source-dev", &found);
- srcName = vshCommandOptString(cmd, "source-name", &found);
- srcFormat = vshCommandOptString(cmd, "source-format", &found);
- target = vshCommandOptString(cmd, "target", &found);
+ vshCommandOptString(cmd, "source-host", &srcHost);
+ vshCommandOptString(cmd, "source-path", &srcPath);
+ vshCommandOptString(cmd, "source-dev", &srcDev);
+ vshCommandOptString(cmd, "source-name", &srcName);
+ vshCommandOptString(cmd, "source-format", &srcFormat);
+ vshCommandOptString(cmd, "target", &target);
virBufferVSprintf(&buf, "<pool type='%s'>\n", type);
virBufferVSprintf(&buf, " <name>%s</name>\n", name);
@@ -5479,16 +5443,14 @@ static int
cmdPoolDefine(vshControl *ctl, const vshCmd *cmd)
{
virStoragePoolPtr pool;
- char *from;
- int found;
+ char *from = NULL;
int ret = TRUE;
char *buffer;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
return FALSE;
if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0)
@@ -6176,29 +6138,22 @@ static const vshCmdOptDef opts_find_storage_pool_sources_as[] = {
static int
cmdPoolDiscoverSourcesAs(vshControl * ctl, const vshCmd * cmd ATTRIBUTE_UNUSED)
{
- char *type, *host;
+ char *type = NULL, *host = NULL;
char *srcSpec = NULL;
char *srcList;
- char *initiator;
- int found;
+ char *initiator = NULL;
- type = vshCommandOptString(cmd, "type", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "type", &type) <= 0)
return FALSE;
- host = vshCommandOptString(cmd, "host", &found);
- if (!found)
- host = NULL;
- initiator = vshCommandOptString(cmd, "initiator", &found);
- if (!found)
- initiator = NULL;
+ vshCommandOptString(cmd, "host", &host);
+ vshCommandOptString(cmd, "initiator", &initiator);
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
if (host) {
- char *port = vshCommandOptString(cmd, "port", &found);
- if (!found)
- port = NULL;
+ char *port = NULL;
+ vshCommandOptString(cmd, "port", &port);
virBuffer buf = VIR_BUFFER_INITIALIZER;
virBufferAddLit(&buf, "<source>\n");
virBufferVSprintf(&buf, " <host name='%s'", host);
@@ -6251,16 +6206,12 @@ static const vshCmdOptDef opts_find_storage_pool_sources[] = {
static int
cmdPoolDiscoverSources(vshControl * ctl, const vshCmd * cmd ATTRIBUTE_UNUSED)
{
- char *type, *srcSpecFile, *srcList;
+ char *type = NULL, *srcSpecFile = NULL, *srcList;
char *srcSpec = NULL;
- int found;
- type = vshCommandOptString(cmd, "type", &found);
- if (!found)
+ if ( vshCommandOptString(cmd, "type", &type) <= 0)
return FALSE;
- srcSpecFile = vshCommandOptString(cmd, "srcSpec", &found);
- if (!found)
- srcSpecFile = NULL;
+ vshCommandOptString(cmd, "srcSpec", &srcSpecFile);
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
@@ -6501,9 +6452,8 @@ cmdVolCreateAs(vshControl *ctl, const vshCmd *cmd)
{
virStoragePoolPtr pool;
virStorageVolPtr vol;
- int found;
char *xml;
- char *name, *capacityStr, *allocationStr, *format;
+ char *name = NULL, *capacityStr = NULL, *allocationStr = NULL, *format = NULL;
char *snapshotStrVol, *snapshotStrFormat;
unsigned long long capacity, allocation = 0;
virBuffer buf = VIR_BUFFER_INITIALIZER;
@@ -6515,24 +6465,22 @@ cmdVolCreateAs(vshControl *ctl, const vshCmd *cmd)
VSH_BYNAME)))
return FALSE;
- name = vshCommandOptString(cmd, "name", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "name", &name) <= 0)
goto cleanup;
- capacityStr = vshCommandOptString(cmd, "capacity", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "capacity", &capacityStr) <= 0)
goto cleanup;
if (cmdVolSize(capacityStr, &capacity) < 0)
vshError(ctl, _("Malformed size %s"), capacityStr);
- allocationStr = vshCommandOptString(cmd, "allocation", &found);
+ vshCommandOptString(cmd, "allocation", &allocationStr);
if (allocationStr &&
cmdVolSize(allocationStr, &allocation) < 0)
vshError(ctl, _("Malformed size %s"), allocationStr);
- format = vshCommandOptString(cmd, "format", &found);
- snapshotStrVol = vshCommandOptString(cmd, "backing-vol", &found);
- snapshotStrFormat = vshCommandOptString(cmd, "backing-vol-format", &found);
+ vshCommandOptString(cmd, "format", &format);
+ vshCommandOptString(cmd, "backing-vol", &snapshotStrVol);
+ vshCommandOptString(cmd, "backing-vol-format", &snapshotStrFormat);
virBufferAddLit(&buf, "<volume>\n");
virBufferVSprintf(&buf, " <name>%s</name>\n", name);
@@ -6723,8 +6671,7 @@ cmdVolCreate(vshControl *ctl, const vshCmd *cmd)
{
virStoragePoolPtr pool;
virStorageVolPtr vol;
- char *from;
- int found;
+ char *from = NULL;
int ret = TRUE;
char *buffer;
@@ -6735,8 +6682,7 @@ cmdVolCreate(vshControl *ctl, const vshCmd *cmd)
VSH_BYNAME)))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found) {
+ if (vshCommandOptString(cmd, "file", &from) <= 0) {
virStoragePoolFree(pool);
return FALSE;
}
@@ -6784,8 +6730,7 @@ cmdVolCreateFrom(vshControl *ctl, const vshCmd *cmd)
{
virStoragePoolPtr pool = NULL;
virStorageVolPtr newvol = NULL, inputvol = NULL;
- char *from;
- int found;
+ char *from = NULL;
int ret = FALSE;
char *buffer = NULL;
@@ -6795,10 +6740,8 @@ cmdVolCreateFrom(vshControl *ctl, const vshCmd *cmd)
if (!(pool = vshCommandOptPoolBy(ctl, cmd, "pool", NULL, VSH_BYNAME)))
goto cleanup;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found) {
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
goto cleanup;
- }
if (!(inputvol = vshCommandOptVol(ctl, cmd, "vol", "inputpool", NULL)))
goto cleanup;
@@ -6883,9 +6826,8 @@ cmdVolClone(vshControl *ctl, const vshCmd *cmd)
{
virStoragePoolPtr origpool = NULL;
virStorageVolPtr origvol = NULL, newvol = NULL;
- char *name, *origxml = NULL;
+ char *name = NULL, *origxml = NULL;
xmlChar *newxml = NULL;
- int found;
int ret = FALSE;
if (!vshConnectionUsability(ctl, ctl->conn))
@@ -6900,8 +6842,7 @@ cmdVolClone(vshControl *ctl, const vshCmd *cmd)
goto cleanup;
}
- name = vshCommandOptString(cmd, "newname", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "newname", &name) <= 0)
goto cleanup;
origxml = virStorageVolGetXMLDesc(origvol, 0);
@@ -7569,15 +7510,14 @@ static const vshCmdOptDef opts_secret_define[] = {
static int
cmdSecretDefine(vshControl *ctl, const vshCmd *cmd)
{
- char *from, *buffer;
+ char *from = NULL, *buffer;
virSecretPtr res;
char uuid[VIR_UUID_STRING_BUFLEN];
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- from = vshCommandOptString(cmd, "file", NULL);
- if (!from)
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
return FALSE;
if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0)
@@ -7660,8 +7600,8 @@ cmdSecretSetValue(vshControl *ctl, const vshCmd *cmd)
{
virSecretPtr secret;
size_t value_size;
- char *base64, *value;
- int found, res, ret = FALSE;
+ char *base64 = NULL, *value;
+ int res, ret = FALSE;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
@@ -7670,8 +7610,7 @@ cmdSecretSetValue(vshControl *ctl, const vshCmd *cmd)
if (secret == NULL)
return FALSE;
- base64 = vshCommandOptString(cmd, "base64", &found);
- if (!base64)
+ if (vshCommandOptString(cmd, "base64", &base64) <= 0)
goto cleanup;
if (!base64_decode_alloc(base64, strlen(base64), &value, &value_size)) {
@@ -8036,17 +7975,15 @@ cmdNodeListDevicesPrint(vshControl *ctl,
static int
cmdNodeListDevices (vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
{
- char *cap;
+ char *cap = NULL;
char **devices;
- int found, num_devices, i;
+ int num_devices, i;
int tree = vshCommandOptBool(cmd, "tree");
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- cap = vshCommandOptString(cmd, "cap", &found);
- if (!found)
- cap = NULL;
+ vshCommandOptString(cmd, "cap", &cap);
num_devices = virNodeNumOfDevices(ctl->conn, cap, 0);
if (num_devices < 0) {
@@ -8124,13 +8061,13 @@ static const vshCmdOptDef opts_node_device_dumpxml[] = {
static int
cmdNodeDeviceDumpXML (vshControl *ctl, const vshCmd *cmd)
{
- const char *name;
+ const char *name = NULL;
virNodeDevicePtr device;
char *xml;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- if (!(name = vshCommandOptString(cmd, "device", NULL)))
+ if (vshCommandOptString(cmd, "device", (char**) &name) <= 0)
return FALSE;
if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) {
vshError(ctl, "%s '%s'", _("Could not find matching device"), name);
@@ -8167,13 +8104,13 @@ static const vshCmdOptDef opts_node_device_dettach[] = {
static int
cmdNodeDeviceDettach (vshControl *ctl, const vshCmd *cmd)
{
- const char *name;
+ const char *name = NULL;
virNodeDevicePtr device;
int ret = TRUE;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- if (!(name = vshCommandOptString(cmd, "device", NULL)))
+ if (vshCommandOptString(cmd, "device", (char**) &name) <= 0)
return FALSE;
if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) {
vshError(ctl, "%s '%s'", _("Could not find matching device"), name);
@@ -8208,13 +8145,13 @@ static const vshCmdOptDef opts_node_device_reattach[] = {
static int
cmdNodeDeviceReAttach (vshControl *ctl, const vshCmd *cmd)
{
- const char *name;
+ const char *name = NULL;
virNodeDevicePtr device;
int ret = TRUE;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- if (!(name = vshCommandOptString(cmd, "device", NULL)))
+ if (vshCommandOptString(cmd, "device", (char**) &name) <= 0)
return FALSE;
if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) {
vshError(ctl, "%s '%s'", _("Could not find matching device"), name);
@@ -8249,13 +8186,13 @@ static const vshCmdOptDef opts_node_device_reset[] = {
static int
cmdNodeDeviceReset (vshControl *ctl, const vshCmd *cmd)
{
- const char *name;
+ const char *name = NULL;
virNodeDevicePtr device;
int ret = TRUE;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- if (!(name = vshCommandOptString(cmd, "device", NULL)))
+ if (vshCommandOptString(cmd, "device", (char**) &name) <= 0)
return FALSE;
if (!(device = virNodeDeviceLookupByName(ctl->conn, name))) {
vshError(ctl, "%s '%s'", _("Could not find matching device"), name);
@@ -8516,10 +8453,9 @@ static int
cmdAttachDevice(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom;
- char *from;
+ char *from = NULL;
char *buffer;
int ret = TRUE;
- int found;
unsigned int flags;
if (!vshConnectionUsability(ctl, ctl->conn))
@@ -8528,8 +8464,7 @@ cmdAttachDevice(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found) {
+ if (vshCommandOptString(cmd, "file", &from) <= 0) {
virDomainFree(dom);
return FALSE;
}
@@ -8586,7 +8521,6 @@ cmdDetachDevice(vshControl *ctl, const vshCmd *cmd)
char *from;
char *buffer;
int ret = TRUE;
- int found;
unsigned int flags;
if (!vshConnectionUsability(ctl, ctl->conn))
@@ -8595,8 +8529,7 @@ cmdDetachDevice(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found) {
+ if (vshCommandOptString(cmd, "file", &from) <= 0) {
virDomainFree(dom);
return FALSE;
}
@@ -8651,10 +8584,9 @@ static int
cmdUpdateDevice(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom;
- char *from;
+ char *from = NULL;
char *buffer;
int ret = TRUE;
- int found;
unsigned int flags;
if (!vshConnectionUsability(ctl, ctl->conn))
@@ -8663,8 +8595,7 @@ cmdUpdateDevice(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found) {
+ if (vshCommandOptString(cmd, "file", &from) <= 0) {
virDomainFree(dom);
return FALSE;
}
@@ -8727,7 +8658,8 @@ static int
cmdAttachInterface(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom = NULL;
- char *mac, *target, *script, *type, *source, *model;
+ char *mac = NULL, *target = NULL, *script = NULL, *type = NULL,
+ *source = NULL, *model = NULL;
int typ, ret = FALSE;
unsigned int flags;
virBuffer buf = VIR_BUFFER_INITIALIZER;
@@ -8739,14 +8671,14 @@ cmdAttachInterface(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
goto cleanup;
- if (!(type = vshCommandOptString(cmd, "type", NULL)))
+ if (vshCommandOptString(cmd, "type", &type) <= 0)
goto cleanup;
- source = vshCommandOptString(cmd, "source", NULL);
- target = vshCommandOptString(cmd, "target", NULL);
- mac = vshCommandOptString(cmd, "mac", NULL);
- script = vshCommandOptString(cmd, "script", NULL);
- model = vshCommandOptString(cmd, "model", NULL);
+ vshCommandOptString(cmd, "source", &source);
+ vshCommandOptString(cmd, "target", &target);
+ vshCommandOptString(cmd, "mac", &mac);
+ vshCommandOptString(cmd, "script",&script);
+ vshCommandOptString(cmd, "model", &model);
/* check interface type */
if (STREQ(type, "network")) {
@@ -8848,10 +8780,10 @@ cmdDetachInterface(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
goto cleanup;
- if (!(type = vshCommandOptString(cmd, "type", NULL)))
+ if (vshCommandOptString(cmd, "type", &type) <= 0)
goto cleanup;
- mac = vshCommandOptString(cmd, "mac", NULL);
+ vshCommandOptString(cmd, "mac", &mac);
doc = virDomainGetXMLDesc(dom, 0);
if (!doc)
@@ -8976,7 +8908,8 @@ static int
cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom = NULL;
- char *source, *target, *driver, *subdriver, *type, *mode;
+ char *source = NULL, *target = NULL, *driver = NULL, *subdriver = NULL,
+ *type = NULL, *mode = NULL;
int isFile = 0, ret = FALSE;
unsigned int flags;
char *stype;
@@ -8989,17 +8922,17 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
goto cleanup;
- if (!(source = vshCommandOptString(cmd, "source", NULL)))
+ if (vshCommandOptString(cmd, "source", &source) <= 0)
goto cleanup;
- if (!(target = vshCommandOptString(cmd, "target", NULL)))
+ if (vshCommandOptString(cmd, "target", &target) <=0)
goto cleanup;
- driver = vshCommandOptString(cmd, "driver", NULL);
- subdriver = vshCommandOptString(cmd, "subdriver", NULL);
- type = vshCommandOptString(cmd, "type", NULL);
- mode = vshCommandOptString(cmd, "mode", NULL);
- stype = vshCommandOptString(cmd, "sourcetype", NULL);
+ vshCommandOptString(cmd, "driver", &driver);
+ vshCommandOptString(cmd, "subdriver", &subdriver);
+ vshCommandOptString(cmd, "type", &type);
+ vshCommandOptString(cmd, "mode", &mode);
+ vshCommandOptString(cmd, "sourcetype", &stype);
if (!stype) {
if (driver && (STREQ(driver, "file") || STREQ(driver, "tap")))
@@ -9104,7 +9037,7 @@ cmdDetachDisk(vshControl *ctl, const vshCmd *cmd)
xmlNodePtr cur = NULL;
xmlBufferPtr xml_buf = NULL;
virDomainPtr dom = NULL;
- char *doc, *target;
+ char *doc, *target = NULL;
int i = 0, diff_tgt, ret = FALSE;
unsigned int flags;
@@ -9114,7 +9047,7 @@ cmdDetachDisk(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
goto cleanup;
- if (!(target = vshCommandOptString(cmd, "target", NULL)))
+ if (vshCommandOptString(cmd, "target", &target) <= 0)
goto cleanup;
doc = virDomainGetXMLDesc(dom, 0);
@@ -9221,8 +9154,7 @@ static const vshCmdOptDef opts_cpu_compare[] = {
static int
cmdCPUCompare(vshControl *ctl, const vshCmd *cmd)
{
- char *from;
- int found;
+ char *from = NULL;
int ret = TRUE;
char *buffer;
int result;
@@ -9230,8 +9162,7 @@ cmdCPUCompare(vshControl *ctl, const vshCmd *cmd)
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
return FALSE;
if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0)
@@ -9285,8 +9216,7 @@ static const vshCmdOptDef opts_cpu_baseline[] = {
static int
cmdCPUBaseline(vshControl *ctl, const vshCmd *cmd)
{
- char *from;
- int found;
+ char *from = NULL;
int ret = TRUE;
char *buffer;
char *result = NULL;
@@ -9303,8 +9233,7 @@ cmdCPUBaseline(vshControl *ctl, const vshCmd *cmd)
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- from = vshCommandOptString(cmd, "file", &found);
- if (!found)
+ if (vshCommandOptString(cmd, "file", &from) <= 0)
return FALSE;
if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0)
@@ -9516,8 +9445,7 @@ static const vshCmdOptDef opts_cd[] = {
static int
cmdCd(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
{
- const char *dir;
- int found;
+ const char *dir = NULL;
int ret = TRUE;
bool dir_malloced = false;
@@ -9526,8 +9454,7 @@ cmdCd(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
return FALSE;
}
- dir = vshCommandOptString(cmd, "dir", &found);
- if (!found) {
+ if (vshCommandOptString(cmd, "dir", (char**) &dir) == 0) {
uid_t uid = geteuid();
dir = virGetUserDirectory(uid);
dir_malloced = !!dir;
@@ -9830,7 +9757,7 @@ cmdSnapshotCreate(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom = NULL;
int ret = FALSE;
- char *from;
+ char *from = NULL;
char *buffer = NULL;
virDomainSnapshotPtr snapshot = NULL;
xmlDocPtr xml = NULL;
@@ -9845,8 +9772,7 @@ cmdSnapshotCreate(vshControl *ctl, const vshCmd *cmd)
if (dom == NULL)
goto cleanup;
- from = vshCommandOptString(cmd, "xmlfile", NULL);
- if (from == NULL)
+ if (vshCommandOptString(cmd, "xmlfile", &from) <= 0)
buffer = vshStrdup(ctl, "<domainsnapshot/>");
else {
if (virFileReadAll(from, VIRSH_MAX_XML_FILE, &buffer) < 0) {
@@ -10103,7 +10029,7 @@ cmdSnapshotDumpXML(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom = NULL;
int ret = FALSE;
- char *name;
+ char *name = NULL;
virDomainSnapshotPtr snapshot = NULL;
char *xml = NULL;
@@ -10114,8 +10040,7 @@ cmdSnapshotDumpXML(vshControl *ctl, const vshCmd *cmd)
if (dom == NULL)
goto cleanup;
- name = vshCommandOptString(cmd, "snapshotname", NULL);
- if (name == NULL)
+ if (vshCommandOptString(cmd, "snapshotname", &name) <= 0)
goto cleanup;
snapshot = virDomainSnapshotLookupByName(dom, name, 0);
@@ -10160,7 +10085,7 @@ cmdDomainSnapshotRevert(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom = NULL;
int ret = FALSE;
- char *name;
+ char *name = NULL;
virDomainSnapshotPtr snapshot = NULL;
if (!vshConnectionUsability(ctl, ctl->conn))
@@ -10170,8 +10095,7 @@ cmdDomainSnapshotRevert(vshControl *ctl, const vshCmd *cmd)
if (dom == NULL)
goto cleanup;
- name = vshCommandOptString(cmd, "snapshotname", NULL);
- if (name == NULL)
+ if (vshCommandOptString(cmd, "snapshotname", &name) <= 0)
goto cleanup;
snapshot = virDomainSnapshotLookupByName(dom, name, 0);
@@ -10213,7 +10137,7 @@ cmdSnapshotDelete(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom = NULL;
int ret = FALSE;
- char *name;
+ char *name = NULL;
virDomainSnapshotPtr snapshot = NULL;
unsigned int flags = 0;
@@ -10224,8 +10148,7 @@ cmdSnapshotDelete(vshControl *ctl, const vshCmd *cmd)
if (dom == NULL)
goto cleanup;
- name = vshCommandOptString(cmd, "snapshotname", NULL);
- if (name == NULL)
+ if (vshCommandOptString(cmd, "snapshotname", &name) <= 0)
goto cleanup;
if (vshCommandOptBool(cmd, "children"))
@@ -10270,7 +10193,7 @@ cmdQemuMonitorCommand(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom = NULL;
int ret = FALSE;
- char *monitor_cmd;
+ char *monitor_cmd = NULL;
char *result = NULL;
unsigned int flags = 0;
@@ -10281,8 +10204,7 @@ cmdQemuMonitorCommand(vshControl *ctl, const vshCmd *cmd)
if (dom == NULL)
goto cleanup;
- monitor_cmd = vshCommandOptString(cmd, "cmd", NULL);
- if (monitor_cmd == NULL) {
+ if (vshCommandOptString(cmd, "cmd", &monitor_cmd) <= 0) {
vshError(ctl, "%s", _("missing monitor command"));
goto cleanup;
}
@@ -10798,83 +10720,103 @@ vshCommandOpt(const vshCmd *cmd, const char *name)
}
/*
- * Returns option as INT
+ * @cmd command reference
+ * @name option name
+ * @value result
+ *
+ * Convert option to int
+ * Return value:
+ * >0 if option found and valid (@value updated)
+ * 0 in case option not found (@value untouched)
+ * <0 in all other cases (@value untouched)
*/
static int
-vshCommandOptInt(const vshCmd *cmd, const char *name, int *found)
+vshCommandOptInt(const vshCmd *cmd, const char *name, int *value)
{
vshCmdOpt *arg = vshCommandOpt(cmd, name);
- int res = 0, num_found = FALSE;
+ int ret = 0, num;
char *end_p = NULL;
if ((arg != NULL) && (arg->data != NULL)) {
- res = strtol(arg->data, &end_p, 10);
- if ((arg->data == end_p) || (*end_p!= 0))
- num_found = FALSE;
- else
- num_found = TRUE;
+ num = strtol(arg->data, &end_p, 10);
+ ret = -1;
+ if ((arg->data != end_p) && (*end_p == 0) && value) {
+ *value = num;
+ ret = 1;
+ }
}
- if (found)
- *found = num_found;
- return res;
+ return ret;
}
-static unsigned long
-vshCommandOptUL(const vshCmd *cmd, const char *name, int *found)
+/*
+ * Convert option to unsigned long
+ * See vshCommandOptInt()
+ */
+static int
+vshCommandOptUL(const vshCmd *cmd, const char *name, unsigned long *value)
{
vshCmdOpt *arg = vshCommandOpt(cmd, name);
- unsigned long res = 0;
- int num_found = FALSE;
+ int ret = 0;
+ unsigned long num;
char *end_p = NULL;
if ((arg != NULL) && (arg->data != NULL)) {
- res = strtoul(arg->data, &end_p, 10);
- if ((arg->data == end_p) || (*end_p!= 0))
- num_found = FALSE;
- else
- num_found = TRUE;
+ num = strtoul(arg->data, &end_p, 10);
+ ret = -1;
+ if ((arg->data != end_p) && (*end_p == 0) && value) {
+ *value = num;
+ ret = 1;
+ }
}
- if (found)
- *found = num_found;
- return res;
+ return ret;
}
/*
* Returns option as STRING
+ * See vshCommandOptInt()
*/
-static char *
-vshCommandOptString(const vshCmd *cmd, const char *name, int *found)
+static int
+vshCommandOptString(const vshCmd *cmd, const char *name, char **value)
{
vshCmdOpt *arg = vshCommandOpt(cmd, name);
+ int ret = 0;
+
+ if (arg && arg->data) {
+ ret = -1;
+ if (*arg->data) {
+ if (value) {
+ *value = arg->data;
+ ret = 1;
+ }
+ } else if (arg->def && ((arg->def->flag) & VSH_OFLAG_REQ)) {
+ vshError(NULL, _("Missing required option '%s'"), name);
+ }
+ }
- if (found)
- *found = arg ? TRUE : FALSE;
-
- if (arg && arg->data && *arg->data)
- return arg->data;
-
- if (arg && arg->def && ((arg->def->flag) & VSH_OFLAG_REQ))
- vshError(NULL, _("Missing required option '%s'"), name);
-
- return NULL;
+ return ret;
}
/*
* Returns option as long long
*/
-static long long
-vshCommandOptLongLong(const vshCmd *cmd, const char *name, int *found)
+static int
+vshCommandOptLongLong(const vshCmd *cmd, const char *name,
+ unsigned long long *value)
{
vshCmdOpt *arg = vshCommandOpt(cmd, name);
- int num_found = FALSE;
- long long res = 0;
+ int ret = 0;
+ long long num;
char *end_p = NULL;
- if ((arg != NULL) && (arg->data != NULL))
- num_found = !virStrToLong_ll(arg->data, &end_p, 10, &res);
- if (found)
- *found = num_found;
- return res;
+ if ((arg != NULL) && (arg->data != NULL)) {
+ num = strtoll(arg->data, &end_p, 10);
+ ret = -1;
+ if ((arg->data != end_p) && (*end_p == 0) && value) {
+ *value = num;
+ ret = 1;
+ }
+ }
+ return ret;
}
/*
@@ -10935,13 +10877,13 @@ vshCommandOptDomainBy(vshControl *ctl, const vshCmd *cmd,
char **name, int flag)
{
virDomainPtr dom = NULL;
- char *n;
+ char *n = NULL;
int id;
const char *optname = "domain";
if (!cmd_has_option (ctl, cmd, optname))
return NULL;
- if (!(n = vshCommandOptString(cmd, optname, NULL)))
+ if (vshCommandOptString(cmd, optname, &n) <= 0)
return NULL;
vshDebug(ctl, 5, "%s: found option <%s>: %s\n",
@@ -10982,12 +10924,12 @@ vshCommandOptNetworkBy(vshControl *ctl, const vshCmd *cmd,
char **name, int flag)
{
virNetworkPtr network = NULL;
- char *n;
+ char *n = NULL;
const char *optname = "network";
if (!cmd_has_option (ctl, cmd, optname))
return NULL;
- if (!(n = vshCommandOptString(cmd, optname, NULL)))
+ if (vshCommandOptString(cmd, optname, &n) <= 0)
return NULL;
vshDebug(ctl, 5, "%s: found option <%s>: %s\n",
@@ -11021,12 +10963,12 @@ vshCommandOptNWFilterBy(vshControl *ctl, const vshCmd *cmd,
char **name, int flag)
{
virNWFilterPtr nwfilter = NULL;
- char *n;
+ char *n = NULL;
const char *optname = "nwfilter";
if (!cmd_has_option (ctl, cmd, optname))
return NULL;
- if (!(n = vshCommandOptString(cmd, optname, NULL)))
+ if (vshCommandOptString(cmd, optname, &n) <= 0)
return NULL;
vshDebug(ctl, 5, "%s: found option <%s>: %s\n",
@@ -11059,12 +11001,12 @@ vshCommandOptInterfaceBy(vshControl *ctl, const vshCmd *cmd,
char **name, int flag)
{
virInterfacePtr iface = NULL;
- char *n;
+ char *n = NULL;
const char *optname = "interface";
if (!cmd_has_option (ctl, cmd, optname))
return NULL;
- if (!(n = vshCommandOptString(cmd, optname, NULL)))
+ if (vshCommandOptString(cmd, optname, &n) <= 0)
return NULL;
vshDebug(ctl, 5, "%s: found option <%s>: %s\n",
@@ -11097,9 +11039,9 @@ vshCommandOptPoolBy(vshControl *ctl, const vshCmd *cmd, const char *optname,
char **name, int flag)
{
virStoragePoolPtr pool = NULL;
- char *n;
+ char *n = NULL;
- if (!(n = vshCommandOptString(cmd, optname, NULL)))
+ if (vshCommandOptString(cmd, optname, &n) <= 0)
return NULL;
vshDebug(ctl, 5, "%s: found option <%s>: %s\n",
@@ -11135,13 +11077,12 @@ vshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd,
{
virStorageVolPtr vol = NULL;
virStoragePoolPtr pool = NULL;
- char *n, *p;
- int found;
+ char *n = NULL, *p = NULL;
- if (!(n = vshCommandOptString(cmd, optname, NULL)))
+ if (vshCommandOptString(cmd, optname, &n) <= 0)
return NULL;
- if (!(p = vshCommandOptString(cmd, pooloptname, &found)) && found)
+ if ( vshCommandOptString(cmd, pooloptname, &p) < 0)
return NULL;
if (p)
@@ -11185,14 +11126,13 @@ static virSecretPtr
vshCommandOptSecret(vshControl *ctl, const vshCmd *cmd, char **name)
{
virSecretPtr secret = NULL;
- char *n;
+ char *n = NULL;
const char *optname = "secret";
if (!cmd_has_option (ctl, cmd, optname))
return NULL;
- n = vshCommandOptString(cmd, optname, NULL);
- if (n == NULL)
+ if (vshCommandOptString(cmd, optname, &n) <= 0)
return NULL;
vshDebug(ctl, 5, "%s: found option <%s>: %s\n", cmd->def->name, optname, n);
--
1.7.4
2
1
[libvirt] [PATCH 1/2] rename qemuDomainDetachSCSIDiskDevice to qemuDomainDetachDiskDevice
by Wen Congyang 07 Mar '11
by Wen Congyang 07 Mar '11
07 Mar '11
The way to detach a USB disk is the same as that to detach a SCSI
disk. Rename this function and we can use it to detach a USB disk.
Signed-off-by: Wen Congyang <wency(a)cn.fujitsu.com>
---
src/qemu/qemu_driver.c | 3 +--
src/qemu/qemu_hotplug.c | 13 +++++++------
src/qemu/qemu_hotplug.h | 8 ++++----
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0e891e8..f4e52b1 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4281,8 +4281,7 @@ static int qemudDomainDetachDevice(virDomainPtr dom,
ret = qemuDomainDetachPciDiskDevice(driver, vm, dev, qemuCaps);
}
else if (dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_SCSI) {
- ret = qemuDomainDetachSCSIDiskDevice(driver, vm, dev,
- qemuCaps);
+ ret = qemuDomainDetachDiskDevice(driver, vm, dev, qemuCaps);
}
else {
qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index da07c29..0b822bf 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1221,10 +1221,10 @@ cleanup:
return ret;
}
-int qemuDomainDetachSCSIDiskDevice(struct qemud_driver *driver,
- virDomainObjPtr vm,
- virDomainDeviceDefPtr dev,
- virBitmapPtr qemuCaps)
+int qemuDomainDetachDiskDevice(struct qemud_driver *driver,
+ virDomainObjPtr vm,
+ virDomainDeviceDefPtr dev,
+ virBitmapPtr qemuCaps)
{
int i, ret = -1;
virDomainDiskDefPtr detach = NULL;
@@ -1241,8 +1241,9 @@ int qemuDomainDetachSCSIDiskDevice(struct qemud_driver *driver,
}
if (!qemuCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) {
- qemuReportError(VIR_ERR_OPERATION_FAILED, "%s",
- _("Underlying qemu does not support SCSI disk removal"));
+ qemuReportError(VIR_ERR_OPERATION_FAILED,
+ _("Underlying qemu does not support %s disk removal"),
+ virDomainDiskBusTypeToString(dev->data.disk->bus));
goto cleanup;
}
diff --git a/src/qemu/qemu_hotplug.h b/src/qemu/qemu_hotplug.h
index c84d496..db3970c 100644
--- a/src/qemu/qemu_hotplug.h
+++ b/src/qemu/qemu_hotplug.h
@@ -77,10 +77,10 @@ int qemuDomainDetachPciDiskDevice(struct qemud_driver *driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
virBitmapPtr qemuCaps);
-int qemuDomainDetachSCSIDiskDevice(struct qemud_driver *driver,
- virDomainObjPtr vm,
- virDomainDeviceDefPtr dev,
- virBitmapPtr qemuCaps);
+int qemuDomainDetachDiskDevice(struct qemud_driver *driver,
+ virDomainObjPtr vm,
+ virDomainDeviceDefPtr dev,
+ virBitmapPtr qemuCaps);
int qemuDomainDetachPciControllerDevice(struct qemud_driver *driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
--
1.7.1
3
4
[libvirt] [PATCH] qemu_hotplug: Reword error if spice password change not available
by Cole Robinson 07 Mar '11
by Cole Robinson 07 Mar '11
07 Mar '11
Currently it sounds like spice is completely unsupported, which is
confusing.
---
src/qemu/qemu_hotplug.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index da07c29..25d2dd9 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1795,7 +1795,7 @@ qemuDomainChangeGraphicsPasswords(struct qemud_driver *driver,
if (ret == -2) {
if (type != VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Only VNC graphics are supported"));
+ _("Graphics password only supported for VNC"));
ret = -1;
} else {
ret = qemuMonitorSetVNCPassword(priv->mon,
--
1.7.4
2
2
07 Mar '11
When I use newest libvirt to save a domain, libvirtd will be deadlock.
Here is the output of gdb:
(gdb) thread 3
[Switching to thread 3 (Thread 0x7f972a1fc710 (LWP 30265))]#0 0x000000351fe0e034 in __lll_lock_wait () from /lib64/libpthread.so.0
(gdb) bt
#0 0x000000351fe0e034 in __lll_lock_wait () from /lib64/libpthread.so.0
#1 0x000000351fe09345 in _L_lock_870 () from /lib64/libpthread.so.0
#2 0x000000351fe09217 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3 0x00007f9737b0e663 in virMutexLock (m=0x6fdd60) at util/threads-pthread.c:80
#4 0x000000000041853d in virEventUpdateTimeoutImpl (timer=12, frequency=0) at event.c:247
#5 0x00007f9737af8ac2 in virEventUpdateTimeout (timer=12, timeout=0) at util/event.c:70
#6 0x000000000046654e in qemuDomainEventQueue (driver=0x19c5440, event=0x7f9724005f80) at qemu/qemu_domain.c:97
#7 0x000000000044184a in qemudDomainSaveFlag (driver=0x19c5440, dom=0x7f9724000970, vm=0x1a63ac0, path=0x7f9724000940 "/var/lib/libvirt/images/memory.save", compressed=0)
at qemu/qemu_driver.c:2074
#8 0x0000000000441b30 in qemudDomainSave (dom=0x7f9724000970, path=0x7f9724000940 "/var/lib/libvirt/images/memory.save") at qemu/qemu_driver.c:2137
#9 0x00007f9737b66d7d in virDomainSave (domain=0x7f9724000970, to=0x7f9724000940 "/var/lib/libvirt/images/memory.save") at libvirt.c:2280
#10 0x00000000004273e6 in remoteDispatchDomainSave (server=0x19ac120, client=0x7f972c081740, conn=0x7f9720000b40, hdr=0x7f972c041250, rerr=0x7f972a1fbb40, args=0x7f972a1fbc40,
ret=0x7f972a1fbbe0) at remote.c:2273
#11 0x0000000000431b6f in remoteDispatchClientCall (server=0x19ac120, client=0x7f972c081740, msg=0x7f972c001240, qemu_protocol=false) at dispatch.c:529
#12 0x00000000004316fe in remoteDispatchClientRequest (server=0x19ac120, client=0x7f972c081740, msg=0x7f972c001240) at dispatch.c:407
#13 0x000000000041d9a2 in qemudWorker (data=0x7f972c000908) at libvirtd.c:1629
#14 0x000000351fe077e1 in start_thread () from /lib64/libpthread.so.0
#15 0x000000351f2e153d in clone () from /lib64/libc.so.6
(gdb) thread 7
[Switching to thread 7 (Thread 0x7f9730bcd710 (LWP 30261))]#0 0x000000351fe0e034 in __lll_lock_wait () from /lib64/libpthread.so.0
(gdb) bt
#0 0x000000351fe0e034 in __lll_lock_wait () from /lib64/libpthread.so.0
#1 0x000000351fe09345 in _L_lock_870 () from /lib64/libpthread.so.0
#2 0x000000351fe09217 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3 0x00007f9737b0e663 in virMutexLock (m=0x1a63ac0) at util/threads-pthread.c:80
#4 0x00007f9737b32cb8 in virDomainObjLock (obj=0x1a63ac0) at conf/domain_conf.c:8447
#5 0x00000000004732d2 in qemuProcessHandleMonitorDestroy (mon=0x7f9718002610, vm=0x1a63ac0) at qemu/qemu_process.c:599
#6 0x000000000047c05b in qemuMonitorFree (mon=0x7f9718002610) at qemu/qemu_monitor.c:209
#7 0x000000000047c0f9 in qemuMonitorUnref (mon=0x7f9718002610) at qemu/qemu_monitor.c:229
#8 0x000000000047c135 in qemuMonitorUnwatch (monitor=0x7f9718002610) at qemu/qemu_monitor.c:242
#9 0x00000000004194b4 in virEventCleanupHandles () at event.c:538
#10 0x00000000004197a4 in virEventRunOnce () at event.c:603
#11 0x000000000041f0bd in qemudOneLoop () at libvirtd.c:2285
#12 0x000000000041f5e9 in qemudRunLoop (opaque=0x19ac120) at libvirtd.c:2395
#13 0x000000351fe077e1 in start_thread () from /lib64/libpthread.so.0
#14 0x000000351f2e153d in clone () from /lib64/libc.so.6
(gdb) p *(virMutexPtr)0x6fdd60
$2 = {lock = {__data = {__lock = 2, __count = 0, __owner = 30261, __nusers = 1, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}},
__size = "\002\000\000\000\000\000\000\000\065v\000\000\001", '\000' <repeats 26 times>, __align = 2}}
(gdb) p *(virMutexPtr)0x1a63ac0
$3 = {lock = {__data = {__lock = 2, __count = 0, __owner = 30265, __nusers = 1, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}},
__size = "\002\000\000\000\000\000\000\000\071v\000\000\001", '\000' <repeats 26 times>, __align = 2}}
(gdb) info threads
7 Thread 0x7f9730bcd710 (LWP 30261) 0x000000351fe0e034 in __lll_lock_wait () from /lib64/libpthread.so.0
6 Thread 0x7f972bfff710 (LWP 30262) 0x000000351fe0b43c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
5 Thread 0x7f972b5fe710 (LWP 30263) 0x000000351fe0b43c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
4 Thread 0x7f972abfd710 (LWP 30264) 0x000000351fe0b43c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
* 3 Thread 0x7f972a1fc710 (LWP 30265) 0x000000351fe0e034 in __lll_lock_wait () from /lib64/libpthread.so.0
2 Thread 0x7f97297fb710 (LWP 30266) 0x000000351fe0b43c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
1 Thread 0x7f9737aac800 (LWP 30260) 0x000000351fe0803d in pthread_join () from /lib64/libpthread.so.0
The reason is that we will try to lock some object in callback function, and we may call event API with locking the same object.
In the function virEventDispatchHandles(), we unlock eventLoop before calling callback function. I think we should
do the same thing in the function virEventCleanupTimeouts() and virEventCleanupHandles().
Signed-off-by: Wen Congyang <wency(a)cn.fujitsu.com>
---
daemon/event.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/daemon/event.c b/daemon/event.c
index 1a31717..0d45014 100644
--- a/daemon/event.c
+++ b/daemon/event.c
@@ -493,8 +493,11 @@ static int virEventCleanupTimeouts(void) {
EVENT_DEBUG("Purging timeout %d with id %d", i,
eventLoop.timeouts[i].timer);
- if (eventLoop.timeouts[i].ff)
+ if (eventLoop.timeouts[i].ff) {
+ virMutexUnlock(&eventLoop.lock);
(eventLoop.timeouts[i].ff)(eventLoop.timeouts[i].opaque);
+ virMutexLock(&eventLoop.lock);
+ }
if ((i+1) < eventLoop.timeoutsCount) {
memmove(eventLoop.timeouts+i,
@@ -534,8 +537,11 @@ static int virEventCleanupHandles(void) {
continue;
}
- if (eventLoop.handles[i].ff)
+ if (eventLoop.handles[i].ff) {
+ virMutexUnlock(&eventLoop.lock);
(eventLoop.handles[i].ff)(eventLoop.handles[i].opaque);
+ virMutexLock(&eventLoop.lock);
+ }
if ((i+1) < eventLoop.handlesCount) {
memmove(eventLoop.handles+i,
--
1.7.1
5
10
07 Mar '11
Both of these bugs were found while looking for the cause of:
https://bugzilla.redhat.com/show_bug.cgi?id=670848
The end-result of that bug was a crash due to an attempt to
double-free a virDomainObj. Both of these could have contributed to
that crash.
There *may* be other places where virDomainRemoveInactive is called
without having the driverlock (eg - the error handling of
qemuProcessReconnect??), but they can be looked at later; the
occurence fixed here is almost certainly part of the cause of the
crash in Bug 670848.
Note that these bugs showed up when testing transient domains, which
seem to be used relatively less often than persistent domains, but
which put more stress on all of the code that adds and removes
virDomainObjs (if a domain is persistent, its virDomainObj is created
when libvirtd starts, and its virDomainObj remains alive until
libvirtd is terminated, but a transient domain's virDomainObj dies
when the domain is shutdown.) It would probably be a good idea to add some transient domain stress testing to the libvirt-tck.
3
15
07 Mar '11
Changes in v2 based on danpb feedback:
- make libvirtd.log the default instead of syslog
- do not open the libvirtd.log directly
- create a new API to dump debug buffer to file output
- use that new API now in the fatal signal handler
This patch set main goal is to allow dumping
of full debug informations for operations occuring
in libvirt daemon before a crash.
The principle is to save all logs to a round-robbin memory
buffer (which we already do, except we never use that
buffer), save the general daemon logs to a libvirtd.log
file and upon reception of a fatal signal, save the memory
buffer directly to the log file(s) or stderr.
There is quite a few remarks about this, we already have
that buffer but we don't log everything in, only what's
output, that's what patch 1 changes, then we need to
provide a function to dump it in emergency from signal
handler so this also adds a new API for it.
We also need to be cautious about what
system call we operate from the signal handler, but
basically we should limit ourselves here to write and
sigaction which are safe there dixit POSIX.
Something like killall -USR2 libvirtd allows to see the
kind of output one get, an idle libvirtd is quiet, but
handle/timer/fdpolls tend to be very verbose,
Maybe now that this part is well debugged some of those
could be suppressed or commented off.
Also the buffer is a statically allocated 64KB, this
should be made more flexible based on a configuration
entry but it's left for another patch.
Daniel
3
26
Hi,
I've been looking at the qemuDomainMonitorCommand interface and I see a
few issues with it.
The current interface can take a JSON string and return a JSON string
but it only works for successful commands. I'd like to hook this
interface up to libqmp but it would mean dropping all of the error
messages. Errors are extremely important because certain workflows
require parsing specific error output (like changing a device with an
encrypted disk) in the normal execution path.
Additionally, there's no way to get QMP events. With QMP events, it's
important to expose the timestamp and tag fields too.
Is there a reason the raw QMP session wasn't exposed?
With registered events, we should be able to distinguish events meant
for libvirt with events registered by QMP passthrough so perhaps we can
also expose events in a new interface?
Regards,
Anthony Liguori
2
1
So the goal is to get a release by the end of the month. I usually try
to push those on Friday, but somehow I would feel better to avoid April
1st espcially as we try to make a 0.9.0 release :-)
Let's try to start the freeze on Thu 24, to get a release one week
later on March 31, so this means we have 2.5 weeks to push new features
in for 0.9.0,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
1
0
04 Mar '11
Still not quite complete (I need to hook up compression to
benefit from fd:), but in much better shape (this series could
be applied as-is, if it receives ACKs, and I can do the compression
improvements separately).
Changes in v3: add lots of intermediate patches, to make fd passing
much easier.
Eric Blake (10):
qemu: use lighter-weight fd:n on incoming tunneled migration
qemu: support migration to fd
util: use SCM_RIGHTS in virFileOperation when needed
qemu: allow simple domain save to use fd: protocol
qemu: simplify domain save fd handling
storage: simplify fd handling
util: rename virFileOperation to virFileOpenAs
util: adjust indentation in previous patch
qemu, storage: improve type safety
qemu: improve efficiency of dd during snapshots
src/libvirt_private.syms | 2 +-
src/qemu/qemu_driver.c | 105 ++++++++++++++-------------
src/qemu/qemu_migration.c | 45 ++++--------
src/qemu/qemu_monitor.c | 22 ++++++
src/qemu/qemu_monitor.h | 4 +
src/qemu/qemu_monitor_json.c | 24 ++++++-
src/qemu/qemu_monitor_json.h | 6 ++-
src/qemu/qemu_monitor_text.c | 27 ++++++-
src/qemu/qemu_monitor_text.h | 6 ++-
src/storage/storage_backend.c | 77 ++++++++++----------
src/util/util.c | 161 ++++++++++++++++++++++++++++-------------
src/util/util.h | 15 ++--
12 files changed, 310 insertions(+), 184 deletions(-)
--
1.7.4
2
16
[libvirt] [PATCH 1/2] virsh: Change integer option parsing functions to return tri-state information.
by Michal Privoznik 04 Mar '11
by Michal Privoznik 04 Mar '11
04 Mar '11
This is needed to detect situations when optional argument was
specified with non-integer value: '--int-opt foo'.
---
tools/virsh.c | 46 +++++++++++++++++++++++++++-------------------
1 files changed, 27 insertions(+), 19 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index 62fca17..e5093a2 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -252,13 +252,14 @@ static const vshCmdGrp *vshCmdGrpSearch(const char *grpname);
static int vshCmdGrpHelp(vshControl *ctl, const char *name);
static vshCmdOpt *vshCommandOpt(const vshCmd *cmd, const char *name);
-static int vshCommandOptInt(const vshCmd *cmd, const char *name, int *found);
+static int vshCommandOptInt(const vshCmd *cmd, const char *name, int *found,
+ int *opt_found);
static unsigned long vshCommandOptUL(const vshCmd *cmd, const char *name,
- int *found);
+ int *found, int *opt_found);
static char *vshCommandOptString(const vshCmd *cmd, const char *name,
int *found);
static long long vshCommandOptLongLong(const vshCmd *cmd, const char *name,
- int *found);
+ int *found, int *opt_found);
static int vshCommandOptBool(const vshCmd *cmd, const char *name);
static char *vshCommandOptArgv(const vshCmd *cmd, int count);
@@ -1602,7 +1603,7 @@ cmdSchedInfoUpdate(vshControl *ctl, const vshCmd *cmd,
param->type == VIR_DOMAIN_SCHED_FIELD_UINT &&
vshCommandOptBool(cmd, "weight")) {
int val;
- val = vshCommandOptInt(cmd, "weight", &found);
+ val = vshCommandOptInt(cmd, "weight", &found, NULL);
if (!found) {
vshError(ctl, "%s", _("Invalid value of weight"));
return -1;
@@ -1617,7 +1618,7 @@ cmdSchedInfoUpdate(vshControl *ctl, const vshCmd *cmd,
param->type == VIR_DOMAIN_SCHED_FIELD_UINT &&
vshCommandOptBool(cmd, "cap")) {
int val;
- val = vshCommandOptInt(cmd, "cap", &found);
+ val = vshCommandOptInt(cmd, "cap", &found, NULL);
if (!found) {
vshError(ctl, "%s", _("Invalid value of cap"));
return -1;
@@ -2300,7 +2301,7 @@ cmdFreecell(vshControl *ctl, const vshCmd *cmd)
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
- cell = vshCommandOptInt(cmd, "cellno", &cell_given);
+ cell = vshCommandOptInt(cmd, "cellno", &cell_given, NULL);
all_given = vshCommandOptBool(cmd, "all");
if (all_given && cell_given) {
@@ -2726,7 +2727,7 @@ cmdVcpupin(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- vcpu = vshCommandOptInt(cmd, "vcpu", &vcpufound);
+ vcpu = vshCommandOptInt(cmd, "vcpu", &vcpufound, NULL);
if (!vcpufound) {
vshError(ctl, "%s", _("vcpupin: Invalid or missing vCPU number."));
virDomainFree(dom);
@@ -2862,7 +2863,7 @@ cmdSetvcpus(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- count = vshCommandOptInt(cmd, "count", &count);
+ count = vshCommandOptInt(cmd, "count", &count, NULL);
if (!flags) {
if (virDomainSetVcpus(dom, count) != 0) {
@@ -2927,7 +2928,7 @@ cmdSetmem(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- kilobytes = vshCommandOptUL(cmd, "kilobytes", NULL);
+ kilobytes = vshCommandOptUL(cmd, "kilobytes", NULL, NULL);
if (kilobytes <= 0) {
virDomainFree(dom);
vshError(ctl, _("Invalid value of %lu for memory size"), kilobytes);
@@ -2984,7 +2985,7 @@ cmdSetmaxmem(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- kilobytes = vshCommandOptInt(cmd, "kilobytes", &kilobytes);
+ kilobytes = vshCommandOptInt(cmd, "kilobytes", &kilobytes, NULL);
if (kilobytes <= 0) {
virDomainFree(dom);
vshError(ctl, _("Invalid value of %d for memory size"), kilobytes);
@@ -3056,22 +3057,22 @@ cmdMemtune(vshControl * ctl, const vshCmd * cmd)
return FALSE;
hard_limit =
- vshCommandOptLongLong(cmd, "hard-limit", NULL);
+ vshCommandOptLongLong(cmd, "hard-limit", NULL, NULL);
if (hard_limit)
nparams++;
soft_limit =
- vshCommandOptLongLong(cmd, "soft-limit", NULL);
+ vshCommandOptLongLong(cmd, "soft-limit", NULL, NULL);
if (soft_limit)
nparams++;
swap_hard_limit =
- vshCommandOptLongLong(cmd, "swap-hard-limit", NULL);
+ vshCommandOptLongLong(cmd, "swap-hard-limit", NULL, NULL);
if (swap_hard_limit)
nparams++;
min_guarantee =
- vshCommandOptLongLong(cmd, "min-guarantee", NULL);
+ vshCommandOptLongLong(cmd, "min-guarantee", NULL, NULL);
if (min_guarantee)
nparams++;
@@ -3670,7 +3671,7 @@ cmdMigrate (vshControl *ctl, const vshCmd *cmd)
if (vshCommandOptBool (cmd, "live"))
live_flag = TRUE;
- timeout = vshCommandOptInt(cmd, "timeout", &found);
+ timeout = vshCommandOptInt(cmd, "timeout", &found, NULL);
if (found) {
if (! live_flag) {
vshError(ctl, "%s", _("migrate: Unexpected timeout for offline migration"));
@@ -3807,7 +3808,7 @@ cmdMigrateSetMaxDowntime(vshControl *ctl, const vshCmd *cmd)
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
return FALSE;
- downtime = vshCommandOptLongLong(cmd, "downtime", &found);
+ downtime = vshCommandOptLongLong(cmd, "downtime", &found, NULL);
if (!found || downtime < 1) {
vshError(ctl, "%s", _("migrate: Invalid downtime"));
goto done;
@@ -10796,7 +10797,7 @@ vshCommandOpt(const vshCmd *cmd, const char *name)
* Returns option as INT
*/
static int
-vshCommandOptInt(const vshCmd *cmd, const char *name, int *found)
+vshCommandOptInt(const vshCmd *cmd, const char *name, int *found, int *opt_found)
{
vshCmdOpt *arg = vshCommandOpt(cmd, name);
int res = 0, num_found = FALSE;
@@ -10811,11 +10812,13 @@ vshCommandOptInt(const vshCmd *cmd, const char *name, int *found)
}
if (found)
*found = num_found;
+ if (opt_found)
+ *opt_found = arg ? TRUE : FALSE;
return res;
}
static unsigned long
-vshCommandOptUL(const vshCmd *cmd, const char *name, int *found)
+vshCommandOptUL(const vshCmd *cmd, const char *name, int *found, int *opt_found)
{
vshCmdOpt *arg = vshCommandOpt(cmd, name);
unsigned long res = 0;
@@ -10831,6 +10834,8 @@ vshCommandOptUL(const vshCmd *cmd, const char *name, int *found)
}
if (found)
*found = num_found;
+ if (opt_found)
+ *opt_found = arg ? TRUE : FALSE;
return res;
}
@@ -10858,7 +10863,8 @@ vshCommandOptString(const vshCmd *cmd, const char *name, int *found)
* Returns option as long long
*/
static long long
-vshCommandOptLongLong(const vshCmd *cmd, const char *name, int *found)
+vshCommandOptLongLong(const vshCmd *cmd, const char *name, int *found,
+ int *opt_found)
{
vshCmdOpt *arg = vshCommandOpt(cmd, name);
int num_found = FALSE;
@@ -10869,6 +10875,8 @@ vshCommandOptLongLong(const vshCmd *cmd, const char *name, int *found)
num_found = !virStrToLong_ll(arg->data, &end_p, 10, &res);
if (found)
*found = num_found;
+ if (opt_found)
+ *opt_found = arg ? TRUE : FALSE;
return res;
}
--
1.7.4
2
2
Index: libvirt/src/conf/secret_conf.c
===================================================================
***************
*** 154,160 ****
_("invalid value of 'private'"));
goto cleanup;
}
- VIR_FREE(prop);
}
uuidstr = virXPathString("string(./uuid)", ctxt);
--- 154,159 ----
***************
*** 170,176 ****
"%s", _("malformed uuid element"));
goto cleanup;
}
- VIR_FREE(uuidstr);
}
def->description = virXPathString("string(./description)", ctxt);
--- 169,174 ----
***************
*** 181,187 ****
def = NULL;
cleanup:
! VIR_FREE(prop);
virSecretDefFree(def);
xmlXPathFreeContext(ctxt);
return ret;
--- 179,190 ----
def = NULL;
cleanup:
! if (prop) {
! VIR_FREE(prop);
! }
! if (uuidstr) {
! VIR_FREE(uuidstr);
! }
virSecretDefFree(def);
xmlXPathFreeContext(ctxt);
return ret;
Index: libvirt/src/nwfilter/nwfilter_gentech_driver.c
===================================================================
***************
*** 662,673 ****
}
virNWFilterUnlockIface(ifname);
-
- VIR_FREE(ptrs);
}
err_exit:
virNWFilterUnlockFilterUpdates();
for (j = 0; j < nEntries; j++)
--- 662,675 ----
}
virNWFilterUnlockIface(ifname);
}
err_exit:
+ if (ptrs) {
+ VIR_FREE(ptrs);
+ }
+
virNWFilterUnlockFilterUpdates();
for (j = 0; j < nEntries; j++)
Index: libvirt/src/remote/remote_driver.c
===================================================================
***************
*** 474,495 ****
--- 474,510 ----
for (i = 0; i < vars->n; i++) {
var = &vars->p[i];
if (STRCASEEQ (var->name, "name")) {
+ if (name) {
+ VIR_FREE(name);
+ }
name = strdup (var->value);
if (!name) goto out_of_memory;
var->ignore = 1;
} else if (STRCASEEQ (var->name, "command")) {
+ if (command) {
+ VIR_FREE(command);
+ }
command = strdup (var->value);
if (!command) goto out_of_memory;
var->ignore = 1;
} else if (STRCASEEQ (var->name, "socket")) {
+ if (sockname) {
+ VIR_FREE(sockname);
+ }
sockname = strdup (var->value);
if (!sockname) goto out_of_memory;
var->ignore = 1;
} else if (STRCASEEQ (var->name, "auth")) {
+ if (authtype) {
+ VIR_FREE(authtype);
+ }
authtype = strdup (var->value);
if (!authtype) goto out_of_memory;
var->ignore = 1;
} else if (STRCASEEQ (var->name, "netcat")) {
+ if (netcat) {
+ VIR_FREE(netcat);
+ }
netcat = strdup (var->value);
if (!netcat) goto out_of_memory;
var->ignore = 1;
Index: libvirt/src/util/conf.c
===================================================================
***************
*** 651,656 ****
--- 651,657 ----
SKIP_BLANKS;
if (CUR != '=') {
virConfError(ctxt, VIR_ERR_CONF_SYNTAX, _("expecting an
assignment"));
+ VIR_FREE(name);
return(-1);
}
NEXT;
Index: libvirt/src/util/storage_file.c
===================================================================
***************
*** 742,747 ****
--- 742,748 ----
if (format < 0 ||
format >= VIR_STORAGE_FILE_LAST) {
virReportSystemError(EINVAL, _("unknown storage file format
%d"), format);
+ VIR_FREE(head);
return -1;
}
Index: libvirt/src/util/xml.c
===================================================================
***************
*** 107,113 ****
virXMLError(VIR_ERR_INTERNAL_ERROR,
_("\'%s\' value longer than %Zd bytes in
virXPathStringLimit()"),
xpath, maxlen);
! return NULL;
}
return tmp;
--- 107,114 ----
virXMLError(VIR_ERR_INTERNAL_ERROR,
_("\'%s\' value longer than %Zd bytes in
virXPathStringLimit()"),
xpath, maxlen);
! VIR_FREE(tmp);
! return NULL;
}
return tmp;
Index: libvirt/tools/virsh.c
===================================================================
***************
*** 8697,8702 ****
--- 8697,8703 ----
{
const char *dir;
int found;
+ int dir_root = FALSE;
if (!ctl->imode) {
vshError(ctl, "%s", _("cd: command valid only in interactive
mode"));
***************
*** 8708,8721 ****
uid_t uid = geteuid();
dir = virGetUserDirectory(uid);
}
! if (!dir)
dir = "/";
if (chdir (dir) == -1) {
vshError(ctl, _("cd: %s: %s"), strerror(errno), dir);
return FALSE;
}
return TRUE;
}
--- 8709,8730 ----
uid_t uid = geteuid();
dir = virGetUserDirectory(uid);
}
! if (!dir) {
dir = "/";
+ dir_root = TRUE;
+ }
if (chdir (dir) == -1) {
vshError(ctl, _("cd: %s: %s"), strerror(errno), dir);
+ if (!dir_root) {
+ VIR_FREE(dir);
+ }
return FALSE;
}
+ if (!dir_root) {
+ VIR_FREE(dir);
+ }
return TRUE;
}
Kind regards,
Phil Petty
2
1
Hi there,
I have been testing the Network Filter [1] feature of libvirt with KVM on RHEL-5.6 and RHEL-6. On RHEL-5.6, it works well except the $IP variable is not supported thus cannot use the clean-filter.
The major problem I found on RHEL-6 is that the iptables rules introduced by nwfilter does not prevent any traffic. The problem is that all traffic going to the VM virtual NIC interface goes through the INPUT chain of the iptables instead of the supposed-to-be FORWARD chain (this is what the nwfilter rules are working on) so that none of the rules have any effect.
I am not sure whether this is a libvirt problem or iptables problem. But it seems to me that changing from RHEL-5.6 to RHEL-6, the network traffic works differently.
Has anyone had similar experience? Any suggestion or comments are welcome.
Thank you very much.
Shi
[1] http://libvirt.org/formatnwfilter.html
--
Shi Jin, PhD
4
5
For qemu names the primary vga as "qxl-vga":
1) if vram is specified for 2nd qxl device:
-vga qxl -global qxl-vga.vram_size=$SIZE \
-device qxl,id=video1,vram_size=$SIZE,...
2) if vram is not specified for 2nd qxl device, (use the default
set by global):
-vga qxl -global qxl-vga.vram_size=$SIZE \
-device qxl,id=video1,...
For qemu names all qxl devices as "qxl":
1) if vram is specified for 2nd qxl device:
-vga qxl -global qxl.vram_size=$SIZE \
-device qxl,id=video1,vram_size=$SIZE ...
2) if vram is not specified for 2nd qxl device:
-vga qxl -global qxl-vga.vram_size=$SIZE \
-device qxl,id=video1,...
"-global" is the only way to define vram_size for the primary qxl
device, regardless of how qemu names it, (It's not good a good
way, as original idea of "-global" is to set a global default for
a driver property, but to specify vram for first qxl device, we
have to use it).
For other qxl devices, as they are represented by "-device", could
specify it directly and seperately for each, and it overrides the
default set by "-global" if specified.
---
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 16 +++++++++
tests/qemuhelptest.c | 1 +
.../qemuxml2argv-graphics-spice-qxl-vga.args | 7 ++++
.../qemuxml2argv-graphics-spice-qxl-vga.xml | 36 ++++++++++++++++++++
.../qemuxml2argv-graphics-spice.args | 4 +-
tests/qemuxml2argvtest.c | 4 ++
tests/qemuxml2xmltest.c | 1 +
9 files changed, 70 insertions(+), 2 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 5f08a20..cce6b5f 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1118,6 +1118,8 @@ qemuCapsParseDeviceStr(const char *str, unsigned long long *flags)
}
if (strstr(str, "virtio-net-pci.tx="))
*flags |= QEMUD_CMD_FLAG_VIRTIO_TX_ALG;
+ if (strstr(str, "name \"qxl-vga\""))
+ *flags |= QEMUD_CMD_FLAG_DEVICE_QXL_VGA;
return 0;
}
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 63cbbb3..f36c3ab 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -93,6 +93,7 @@ enum qemuCapsFlags {
QEMUD_CMD_FLAG_CHARDEV_SPICEVMC = (1LL << 56), /* newer -chardev spicevmc */
QEMUD_CMD_FLAG_DEVICE_SPICEVMC = (1LL << 57), /* older -device spicevmc*/
QEMUD_CMD_FLAG_VIRTIO_TX_ALG = (1LL << 58), /* -device virtio-net-pci,tx=string */
+ QEMUD_CMD_FLAG_DEVICE_QXL_VGA = (1LL << 59), /* Is the primary and vga compatible qxl device named qxl-vga? */
};
virCapsPtr qemuCapsInit(virCapsPtr old_caps);
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 0db2843..c0bc343 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1928,6 +1928,10 @@ qemuBuildVideoDevStr(virDomainVideoDefPtr video,
virBufferVSprintf(&buf, "%s", model);
virBufferVSprintf(&buf, ",id=%s", video->info.alias);
+
+ if (video->type == VIR_DOMAIN_VIDEO_TYPE_QXL && video->vram)
+ virBufferVSprintf(&buf, ",vram_size=%u", video->vram);
+
if (qemuBuildDeviceAddressStr(&buf, &video->info, qemuCmdFlags) < 0)
goto error;
@@ -4023,6 +4027,18 @@ qemuBuildCommandLine(virConnectPtr conn,
}
virCommandAddArgList(cmd, "-vga", vgastr, NULL);
+
+ if (def->videos[0]->type == VIR_DOMAIN_VIDEO_TYPE_QXL) {
+ if (def->videos[0]->vram &&
+ (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE)) {
+ if (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE_QXL_VGA)
+ virCommandAddArgFormat(cmd, "-global qxl-vga.vram_size=%u",
+ def->videos[0]->vram);
+ else
+ virCommandAddArgFormat(cmd, "-global qxl.vram_size=%u",
+ def->videos[0]->vram);
+ }
+ }
}
} else {
diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c
index 11890ab..202888d 100644
--- a/tests/qemuhelptest.c
+++ b/tests/qemuhelptest.c
@@ -481,6 +481,7 @@ mymain(int argc, char **argv)
QEMUD_CMD_FLAG_DRIVE_AIO |
QEMUD_CMD_FLAG_CCID_PASSTHRU |
QEMUD_CMD_FLAG_CHARDEV_SPICEVMC |
+ QEMUD_CMD_FLAG_DEVICE_QXL_VGA |
QEMUD_CMD_FLAG_VIRTIO_TX_ALG,
12001, 1, 0);
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.args
new file mode 100644
index 0000000..efc51d1
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.args
@@ -0,0 +1,7 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nodefaults -monitor \
+unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda \
+/dev/HostVG/QEMUGuest1 -usb -spice port=5903,tls-port=5904,addr=127.0.0.1,\
+x509-dir=/etc/pki/libvirt-spice,tls-channel=main,plaintext-channel=inputs -vga \
+qxl -global qxl-vga.vram_size=65536 -device qxl,id=video1,vram_size=65536,bus=pci.0,addr=0x4 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
new file mode 100644
index 0000000..fc9f3fe
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
@@ -0,0 +1,36 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
+ <vcpu>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'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' unit='0'/>
+ </disk>
+ <controller type='ide' index='0'/>
+ <input type='mouse' bus='ps2'/>
+ <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'>
+ <channel name='main' mode='secure'/>
+ <channel name='inputs' mode='insecure'/>
+ </graphics>
+ <video>
+ <model type='qxl' vram='65536' heads='1'/>
+ </video>
+ <video>
+ <model type='qxl' vram='65536' heads='1'/>
+ </video>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
index a8fb243..f7109b0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
@@ -3,5 +3,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \
unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda \
/dev/HostVG/QEMUGuest1 -usb -spice port=5903,tls-port=5904,addr=127.0.0.1,\
x509-dir=/etc/pki/libvirt-spice,tls-channel=main,plaintext-channel=inputs -vga \
-qxl -device qxl,id=video1,bus=pci.0,addr=0x4 -device virtio-balloon-pci,\
-id=balloon0,bus=pci.0,addr=0x3
+qxl -global qxl.vram_size=65536 -device qxl,id=video1,vram_size=65536,bus=pci.0,addr=0x4 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 4817d51..d5b240e 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -354,6 +354,10 @@ mymain(int argc, char **argv)
DO_TEST("graphics-spice",
QEMUD_CMD_FLAG_VGA | QEMUD_CMD_FLAG_VGA_QXL |
QEMUD_CMD_FLAG_DEVICE | QEMUD_CMD_FLAG_SPICE, false);
+ DO_TEST("graphics-spice-qxl-vga",
+ QEMUD_CMD_FLAG_VGA | QEMUD_CMD_FLAG_VGA_QXL |
+ QEMUD_CMD_FLAG_DEVICE | QEMUD_CMD_FLAG_SPICE |
+ QEMUD_CMD_FLAG_DEVICE_QXL_VGA, false);
DO_TEST("input-usbmouse", 0, false);
DO_TEST("input-usbtablet", 0, false);
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 67e721b..c0c36ad 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -152,6 +152,7 @@ mymain(int argc, char **argv)
DO_TEST("graphics-sdl");
DO_TEST("graphics-sdl-fullscreen");
DO_TEST("graphics-spice");
+ DO_TEST("graphics-spice-qxl-vga");
DO_TEST("input-usbmouse");
DO_TEST("input-usbtablet");
DO_TEST("input-xen");
--
1.7.4
2
5
04 Mar '11
This fixes a possible crash of libvirtd during its startup. When qemu
driver reconnects to running domains, it iterates over all domain
objects in a hash. When reconnecting to an associated qemu monitor
fails and the domain is transient, it's immediately removed from the
hash. Despite the fact that it's explicitly forbidden to do so. If
libvirtd is lucky enough, virHashForEach will access random memory when
the callback finishes and the deamon will crash.
Since it's trivial to fix virHashForEach to allow removal of hash
entries while iterating through them, I went this way instead of fixing
qemuReconnectDomain callback (and possibly others) to avoid deleting the
entries.
---
src/util/hash.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/util/hash.c b/src/util/hash.c
index 92ee234..2a9a9cf 100644
--- a/src/util/hash.c
+++ b/src/util/hash.c
@@ -548,9 +548,8 @@ virHashRemoveEntry(virHashTablePtr table, const void *name)
* @data: opaque data to pass to the iterator
*
* Iterates over every element in the hash table, invoking the
- * 'iter' callback. The callback must not call any other virHash*
- * functions, and in particular must not attempt to remove the
- * element.
+ * 'iter' callback. The callback is allowed to remove the element using
+ * virHashRemoveEntry but calling other virHash* functions is prohibited.
*
* Returns number of items iterated over upon completion, -1 on failure
*/
@@ -563,11 +562,12 @@ int virHashForEach(virHashTablePtr table, virHashIterator iter, void *data) {
for (i = 0 ; i < table->size ; i++) {
virHashEntryPtr entry = table->table + i;
while (entry) {
+ virHashEntryPtr next = entry->next;
if (entry->valid) {
iter(entry->payload, entry->name, data);
count++;
}
- entry = entry->next;
+ entry = next;
}
}
return (count);
--
1.7.4.1
3
4
03 Mar '11
Posted as an RFC because there are still two open bugs to be solved.
I've tested that with this installed, I was able to do 'virsh save
domain file' without compression to a local file using qemu fd:
migration.
1. I'm working on making virFileOperation use SCM_RIGHTS so that we
can pass an arbitrary fd from the child back to the parent. This is
necessary for supporting root-squash NFS domain save via fd, since a
child cannot consistently modify the appropriate locks necessary to
issue a monitor command (the current virFileOperation implementation
guarantees that the hook will execute on the right fd, but does not
guarantee whether the operation is in the parent or a child, and thus
the operation is not permitted to modify any state in the parent other
than by its return value). The current state of the patch just falls
back to exec: migration if the parent process can't reopen the fd.
2. I also need to test for qemu capabilities, as qemu 0.11.0 does
_not_ support fd: migration, so the old exec: migration path must
remain. But checking for capabilities is a bear in itself, since we
should be caching qemu capabilities when a domain is started, and not
calling 'qemu -help' for every subsequent command that needs to know.
Eric Blake (3):
qemu: use lighter-weight fd:n on incoming tunneled migration
qemu: support migration to fd
qemu: allow simple domain save to use fd: protocol
src/qemu/qemu_driver.c | 16 ++++++++++++--
src/qemu/qemu_migration.c | 44 +++++++++++------------------------------
src/qemu/qemu_monitor.c | 22 +++++++++++++++++++++
src/qemu/qemu_monitor.h | 4 +++
src/qemu/qemu_monitor_json.c | 21 +++++++++++++++++++-
src/qemu/qemu_monitor_json.h | 6 ++++-
src/qemu/qemu_monitor_text.c | 24 +++++++++++++++++++++-
src/qemu/qemu_monitor_text.h | 6 ++++-
8 files changed, 103 insertions(+), 40 deletions(-)
--
1.7.4
2
6
Passwords are allowed to contain <, >, &, ', " characters.
Those need to be replaced by the corresponding entities.
Reported by Hereward Cooper.
---
src/esx/esx_driver.c | 28 ++++++++++++++++++++++------
src/esx/esx_util.c | 19 +++++++++++++++++++
src/esx/esx_util.h | 2 ++
3 files changed, 43 insertions(+), 6 deletions(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 116ad0f..13374b7 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -626,6 +626,7 @@ esxConnectToHost(esxPrivate *priv, virConnectAuthPtr auth,
int result = -1;
char ipAddress[NI_MAXHOST] = "";
char *username = NULL;
+ char *unescapedPassword = NULL;
char *password = NULL;
char *url = NULL;
esxVI_String *propertyNameList = NULL;
@@ -657,13 +658,19 @@ esxConnectToHost(esxPrivate *priv, virConnectAuthPtr auth,
}
}
- password = virRequestPassword(auth, username, hostname);
+ unescapedPassword = virRequestPassword(auth, username, hostname);
- if (password == NULL) {
+ if (unescapedPassword == NULL) {
ESX_ERROR(VIR_ERR_AUTH_FAILED, "%s", _("Password request failed"));
goto cleanup;
}
+ password = esxUtil_EscapeForXml(unescapedPassword);
+
+ if (password == NULL) {
+ goto cleanup;
+ }
+
if (virAsprintf(&url, "%s://%s:%d/sdk", priv->transport, hostname,
port) < 0) {
virReportOOMError();
@@ -727,8 +734,9 @@ esxConnectToHost(esxPrivate *priv, virConnectAuthPtr auth,
result = 0;
cleanup:
- VIR_FREE(password);
VIR_FREE(username);
+ VIR_FREE(unescapedPassword);
+ VIR_FREE(password);
VIR_FREE(url);
esxVI_String_Free(&propertyNameList);
esxVI_ObjectContent_Free(&hostSystem);
@@ -748,6 +756,7 @@ esxConnectToVCenter(esxPrivate *priv, virConnectAuthPtr auth,
int result = -1;
char ipAddress[NI_MAXHOST] = "";
char *username = NULL;
+ char *unescapedPassword = NULL;
char *password = NULL;
char *url = NULL;
@@ -779,13 +788,19 @@ esxConnectToVCenter(esxPrivate *priv, virConnectAuthPtr auth,
}
}
- password = virRequestPassword(auth, username, hostname);
+ unescapedPassword = virRequestPassword(auth, username, hostname);
- if (password == NULL) {
+ if (unescapedPassword == NULL) {
ESX_ERROR(VIR_ERR_AUTH_FAILED, "%s", _("Password request failed"));
goto cleanup;
}
+ password = esxUtil_EscapeForXml(unescapedPassword);
+
+ if (password == NULL) {
+ goto cleanup;
+ }
+
if (virAsprintf(&url, "%s://%s:%d/sdk", priv->transport, hostname,
port) < 0) {
virReportOOMError();
@@ -822,8 +837,9 @@ esxConnectToVCenter(esxPrivate *priv, virConnectAuthPtr auth,
result = 0;
cleanup:
- VIR_FREE(password);
VIR_FREE(username);
+ VIR_FREE(unescapedPassword);
+ VIR_FREE(password);
VIR_FREE(url);
return result;
diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c
index 2603957..9ef947c 100644
--- a/src/esx/esx_util.c
+++ b/src/esx/esx_util.c
@@ -552,3 +552,22 @@ esxUtil_EscapeDatastoreItem(const char *string)
return escaped2;
}
+
+
+
+char *
+esxUtil_EscapeForXml(const char *string)
+{
+ virBuffer buffer = VIR_BUFFER_INITIALIZER;
+
+ virBufferEscapeString(&buffer, "%s", string);
+
+ if (virBufferError(&buffer)) {
+ virReportOOMError();
+ virBufferFreeAndReset(&buffer);
+
+ return NULL;
+ }
+
+ return virBufferContentAndReset(&buffer);
+}
diff --git a/src/esx/esx_util.h b/src/esx/esx_util.h
index d00e28a..39fdb6d 100644
--- a/src/esx/esx_util.h
+++ b/src/esx/esx_util.h
@@ -62,4 +62,6 @@ void esxUtil_ReplaceSpecialWindowsPathChars(char *string);
char *esxUtil_EscapeDatastoreItem(const char *string);
+char *esxUtil_EscapeForXml(const char *string);
+
#endif /* __ESX_UTIL_H__ */
--
1.7.0.4
2
2
In virFileOperation, the parent does a fallback to a non-fork
attempt if it detects that the child returned EACCES. However,
the child was calling _exit(-EACCESS), which does _not_ appear
as EACCES in the parent.
* src/util/util.c (virFileOperation): Correctly pass EACCES from
child to parent.
---
src/util/util.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/util/util.c b/src/util/util.c
index bac71c8..0fe1c41 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -1559,6 +1559,15 @@ parenterror:
goto childerror;
}
childerror:
+ /* Hook sets ret to -errno on failure, but exit must be positive.
+ * If we exit with EACCES, then parent tries again. */
+ /* XXX This makes assumptions about errno being < 255, which is
+ * not true on Hurd. */
+ ret = -ret;
+ if ((ret & 0xff) != ret) {
+ VIR_WARN("unable to pass desired return value %d", ret);
+ ret = 0xff;
+ }
_exit(ret);
}
--
1.7.4
3
3
* tests/xml2sexprdata/*.sexpr: Add backslash-newlines.
* tests/sexpr2xmldata/*.sexpr: Likewise.
* tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args: Likewise.
---
Mind-numbing replacement of long lines with backslash-newline
pairs to make them less than 80 columns. Also fixes the
annoying files in tests/sexpr2xmldata that didn't used to
end in newlines. Prereq to keep 'make syntax-check' happy
after the next patch in the series.
[What's the bet that git send-email choked on this message?]
tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args | 7 ++++++-
tests/sexpr2xmldata/sexpr2xml-boot-grub.sexpr | 7 ++++++-
tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.sexpr | 11 ++++++++++-
.../sexpr2xml-disk-block-shareable.sexpr | 7 ++++++-
tests/sexpr2xmldata/sexpr2xml-disk-block.sexpr | 9 ++++++++-
.../sexpr2xml-disk-drv-blktap-qcow.sexpr | 9 ++++++++-
.../sexpr2xml-disk-drv-blktap-raw.sexpr | 9 ++++++++-
.../sexpr2xml-disk-drv-blktap2-raw.sexpr | 9 ++++++++-
tests/sexpr2xmldata/sexpr2xml-disk-file.sexpr | 9 ++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-kernel.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr | 10 +++++++++-
.../sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr | 10 +++++++++-
.../sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr | 10 +++++++++-
.../sexpr2xml-fv-serial-dev-2-ports.sexpr | 10 +++++++++-
.../sexpr2xml-fv-serial-dev-2nd-port.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr | 10 +++++++++-
.../sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr | 10 +++++++++-
.../sexpr2xml-fv-serial-tcp-telnet.sexpr | 11 ++++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr | 11 ++++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr | 11 ++++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr | 11 ++++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-fv-v2.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-fv.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-net-bridged.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-net-e1000.sexpr | 11 ++++++++++-
tests/sexpr2xmldata/sexpr2xml-net-routed.sexpr | 11 ++++++++++-
tests/sexpr2xmldata/sexpr2xml-pci-devs.sexpr | 11 ++++++++++-
tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr | 6 +++++-
tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr | 9 ++++++++-
tests/sexpr2xmldata/sexpr2xml-pv-vcpus.sexpr | 9 ++++++++-
.../sexpr2xml-pv-vfb-new-vncdisplay.sexpr | 11 ++++++++++-
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr | 10 +++++++++-
tests/sexpr2xmldata/sexpr2xml-pv.sexpr | 9 ++++++++-
tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr | 6 +++++-
tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-curmem.sexpr | 7 ++++++-
.../xml2sexpr-disk-block-shareable.sexpr | 7 ++++++-
tests/xml2sexprdata/xml2sexpr-disk-block.sexpr | 9 ++++++++-
.../xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr | 9 ++++++++-
.../xml2sexpr-disk-drv-blktap-qcow.sexpr | 9 ++++++++-
.../xml2sexpr-disk-drv-blktap-raw.sexpr | 9 ++++++++-
.../xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr | 9 ++++++++-
.../xml2sexpr-disk-drv-blktap2-raw.sexpr | 9 ++++++++-
.../xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr | 9 ++++++++-
tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr | 9 ++++++++-
tests/xml2sexprdata/xml2sexpr-disk-file.sexpr | 9 ++++++++-
tests/xml2sexprdata/xml2sexpr-escape.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr | 10 +++++++++-
tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr | 9 ++++++++-
.../xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr | 9 ++++++++-
.../xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr | 10 +++++++++-
.../xml2sexpr-fv-serial-dev-2-ports.sexpr | 10 +++++++++-
.../xml2sexpr-fv-serial-dev-2nd-port.sexpr | 10 +++++++++-
tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr | 10 +++++++++-
tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr | 10 +++++++++-
tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr | 10 +++++++++-
tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr | 10 +++++++++-
.../xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr | 10 +++++++++-
.../xml2sexpr-fv-serial-tcp-telnet.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr | 10 +++++++++-
tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr | 10 +++++++++-
tests/xml2sexprdata/xml2sexpr-fv-usbtablet.sexpr | 10 +++++++++-
tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr | 10 +++++++++-
tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-fv.sexpr | 10 +++++++++-
tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-net-routed.sexpr | 11 ++++++++++-
.../xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr | 10 +++++++++-
tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr | 6 +++++-
tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr | 7 ++++++-
tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr | 9 ++++++++-
.../xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr | 11 ++++++++++-
tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr | 10 +++++++++-
tests/xml2sexprdata/xml2sexpr-pv.sexpr | 9 ++++++++-
92 files changed, 801 insertions(+), 92 deletions(-)
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args
index 15d2a1b..80617d4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args
@@ -1 +1,6 @@
-LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,format=qcow2,cache=none,aio=native -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,bus=1,unit=0,format=raw,aio=threads -net none -serial none -parallel none -usb
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \
+pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,\
+format=qcow2,cache=none,aio=native -drive file=/dev/HostVG/QEMUGuest2,if=ide,\
+media=cdrom,bus=1,unit=0,format=raw,aio=threads -net none -serial none \
+-parallel none -usb
diff --git a/tests/sexpr2xmldata/sexpr2xml-boot-grub.sexpr b/tests/sexpr2xmldata/sexpr2xml-boot-grub.sexpr
index f42fc32..c8c0cb1 100644
--- a/tests/sexpr2xmldata/sexpr2xml-boot-grub.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-boot-grub.sexpr
@@ -1 +1,6 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/usr/lib/xen/boot/pv-grub-x86_64.gz')(args '(hd0,0)/grub/menu.lst')))(device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestVG')(mode 'w'))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/usr/lib/xen/boot/pv-grub-x86_64.gz')\
+(args '(hd0,0)/grub/menu.lst')))(device (vbd (dev 'xvda')\
+(uname 'phy:/dev/MainVG/GuestVG')(mode 'w'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.sexpr b/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.sexpr
index 24143a3..cb9e3f8 100644
--- a/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.sexpr
@@ -1 +1,10 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')(script 'vif-bridge')(ip '192.0.2.1')))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w')))\
+(device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')\
+(script 'vif-bridge')(ip '192.0.2.1')))
diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.sexpr b/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.sexpr
index 184c1e8..80d4167 100644
--- a/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.sexpr
@@ -1 +1,6 @@
-(domain (domid 6)(name 'pvtest')(memory 384)(maxmem 512)(vcpus 1)(uuid '49a0c6ffc066539264983632d093c2e7')(bootloader '/usr/bin/pygrub')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(device (tap (dev 'xvda')(uname 'tap:aio:/var/lib/xen/images/rhel5pv.img')(mode 'w!')))(device (vif (mac '00:16:3e:23:9e:eb')(bridge 'xenbr0')(script 'vif-bridge'))))
+(domain (domid 6)(name 'pvtest')(memory 384)(maxmem 512)(vcpus 1)\
+(uuid '49a0c6ffc066539264983632d093c2e7')(bootloader '/usr/bin/pygrub')\
+(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')\
+(device (tap (dev 'xvda')(uname 'tap:aio:/var/lib/xen/images/rhel5pv.img')\
+(mode 'w!')))(device (vif (mac '00:16:3e:23:9e:eb')(bridge 'xenbr0')\
+(script 'vif-bridge'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-block.sexpr b/tests/sexpr2xmldata/sexpr2xml-disk-block.sexpr
index 01dd420..3f64ba6 100644
--- a/tests/sexpr2xmldata/sexpr2xml-disk-block.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-block.sexpr
@@ -1 +1,8 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestVG')(mode 'w'))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'phy:/dev/MainVG/GuestVG')(mode 'w'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.sexpr b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.sexpr
index 5c7c8ee..b96fa61 100644
--- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.sexpr
@@ -1 +1,8 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (tap (dev 'xvda')(uname 'tap:qcow:/root/some.img')(mode 'w'))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (tap (dev 'xvda')\
+(uname 'tap:qcow:/root/some.img')(mode 'w'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.sexpr b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.sexpr
index ac11292..ef7cb4b 100644
--- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.sexpr
@@ -1 +1,8 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (tap (dev 'xvda')(uname 'tap:aio:/root/some.img')(mode 'w'))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (tap (dev 'xvda')\
+(uname 'tap:aio:/root/some.img')(mode 'w'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.sexpr b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.sexpr
index 79bc9b1..a72a733 100644
--- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.sexpr
@@ -1 +1,8 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (tap2 (dev 'xvda')(uname 'tap2:aio:/root/some.img')(mode 'w'))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (tap2 (dev 'xvda')\
+(uname 'tap2:aio:/root/some.img')(mode 'w'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-file.sexpr b/tests/sexpr2xmldata/sexpr2xml-disk-file.sexpr
index ddf7810..d582ea0 100644
--- a/tests/sexpr2xmldata/sexpr2xml-disk-file.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-file.sexpr
@@ -1 +1,8 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-kernel.sexpr
index 96f699c..25231ad 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-kernel.sexpr
@@ -1 +1,9 @@
-(domain (domid 15)(name 'fvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (hvm (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')(loader '/usr/lib/xen/boot/hvmloader')(vcpus 2)(usb 1)(serial pty)))(device (vbd (dev 'ioemu:xvda')(uname 'file:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(domain (domid 15)(name 'fvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (hvm (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')(loader '/usr/lib/xen/boot/hvmloader')(vcpus 2)\
+(usb 1)(serial pty)))(device (vbd (dev 'ioemu:xvda')\
+(uname 'file:/root/some.img')(mode 'w'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr
index 1668e15..9caf8a0 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.sexpr
@@ -1 +1,9 @@
-(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(vnc 1)(keymap ja)(localtime 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
+(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\
+(acpi 1)(vnc 1)(keymap ja)(localtime 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr
index 47ff828..e7031dc 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr
@@ -1 +1,9 @@
-(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type 'ioemu'))))
+(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\
+(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')\
+(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(model 'e1000')(type 'ioemu'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr
index eee2304..acfc477 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr
@@ -1 +1,9 @@
-(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type 'netfront'))))
+(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\
+(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')\
+(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type 'netfront'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr
index 104f979..39a8fbb 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.sexpr
@@ -1 +1,9 @@
-(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel tcp:localhost:9999)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
+(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel tcp:localhost:9999)\
+(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.sexpr
index e709eb0..32bf699 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.sexpr
@@ -1 +1,9 @@
-(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8ff')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial (/dev/ttyS0 /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
+(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8ff')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial (/dev/ttyS0 /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')\
+(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\
+(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.sexpr
index 3a14cf9..ddd94fd 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.sexpr
@@ -1 +1,9 @@
-(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8ff')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial (none /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
+(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8ff')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial (none /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr
index 28c4346..40e0200 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.sexpr
@@ -1 +1,9 @@
-(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial file:/tmp/serial.log)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
+(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial file:/tmp/serial.log)(device_model '/usr/lib64/xen/bin/qemu-dm')\
+(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\
+(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr
index a87c493..4670468 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.sexpr
@@ -1 +1,9 @@
-(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial null)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
+(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial null)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr
index 11a7952..2dacb90 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.sexpr
@@ -1 +1,9 @@
-(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial pipe:/tmp/serial.pipe)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
+(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial pipe:/tmp/serial.pipe)(device_model '/usr/lib64/xen/bin/qemu-dm')\
+(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\
+(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr
index 0ef0576..85cf07e 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.sexpr
@@ -1 +1,9 @@
-(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial pty)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
+(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial pty)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr
index 58e223c..6a559e7 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.sexpr
@@ -1 +1,9 @@
-(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial stdio)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
+(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial stdio)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.sexpr
index ed914f7..cda45e4 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.sexpr
@@ -1 +1,10 @@
-(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial telnet:localhost:9999,server,nowait)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
+(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial telnet:localhost:9999,server,nowait)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr
index 5d49158..94ae80e 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.sexpr
@@ -1 +1,10 @@
-(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial tcp:localhost:9999,server,nowait)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
+(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial tcp:localhost:9999,server,nowait)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr
index f07dc4e..8e1aeb8 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.sexpr
@@ -1 +1,10 @@
-(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial udp:localhost:9998@localhost:9999)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
+(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial udp:localhost:9998@localhost:9999)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr
index ff46c64..2bab722 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.sexpr
@@ -1 +1,10 @@
-(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial unix:/tmp/serial.sock,server,nowait)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
+(domain (domid 1)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial unix:/tmp/serial.sock,server,nowait)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr
index 08ef565..6937813 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.sexpr
@@ -1 +1,9 @@
-(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(vnc 1)(keymap ja)(soundhw 'all')))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
+(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\
+(acpi 1)(vnc 1)(keymap ja)(soundhw 'all')))(device (vbd (dev 'ioemu:hda')\
+(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr
index 79115d0..ff22666 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound.sexpr
@@ -1 +1,9 @@
-(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(vnc 1)(keymap ja)(soundhw 'sb16,es1370')))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
+(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\
+(acpi 1)(vnc 1)(keymap ja)(soundhw 'sb16,es1370')))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr
index da9ae6a..dcc6ab2 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.sexpr
@@ -1 +1,9 @@
-(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(usbdevice mouse)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
+(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\
+(acpi 1)(usbdevice mouse)(vnc 1)(keymap ja)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr
index 058166f..39e5a72 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.sexpr
@@ -1 +1,9 @@
-(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(usbdevice tablet)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
+(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\
+(acpi 1)(usb 1)(usbdevice tablet)(vnc 1)(keymap ja)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr
index 5d4579d..c34c7da 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-utc.sexpr
@@ -1 +1,9 @@
-(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
+(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\
+(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')\
+(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-v2.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-v2.sexpr
index bd71958..92e807c 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-v2.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-v2.sexpr
@@ -1 +1,9 @@
-(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
+(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(acpi 1)(vnc 1)\
+(keymap ja)))(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')\
+(mode 'w')))(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')\
+(mode 'r')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv.sexpr
index 5d4579d..c34c7da 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-fv.sexpr
@@ -1 +1,9 @@
-(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
+(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')\
+(acpi 1)(vnc 1)(keymap ja)))(device (vbd (dev 'ioemu:hda')\
+(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type ioemu))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-net-bridged.sexpr b/tests/sexpr2xmldata/sexpr2xml-net-bridged.sexpr
index 6ef84c4..70a57c4 100644
--- a/tests/sexpr2xmldata/sexpr2xml-net-bridged.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-net-bridged.sexpr
@@ -1 +1,9 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')(script 'vif-bridge'))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w')))\
+(device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')(script 'vif-bridge'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-net-e1000.sexpr b/tests/sexpr2xmldata/sexpr2xml-net-e1000.sexpr
index 2c838f9..a560380 100644
--- a/tests/sexpr2xmldata/sexpr2xml-net-e1000.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-net-e1000.sexpr
@@ -1 +1,10 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')(script 'vif-bridge')(model 'e1000'))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w')))\
+(device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')\
+(script 'vif-bridge')(model 'e1000'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-net-routed.sexpr b/tests/sexpr2xmldata/sexpr2xml-net-routed.sexpr
index a1a0ab5..d0e4cd5 100644
--- a/tests/sexpr2xmldata/sexpr2xml-net-routed.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-net-routed.sexpr
@@ -1 +1,10 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vif (mac '00:11:22:33:44:55')(dev 'eth3')(script 'vif-routed')(ip '172.14.5.6')))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w')))\
+(device (vif (mac '00:11:22:33:44:55')(dev 'eth3')(script 'vif-routed')\
+(ip '172.14.5.6')))
diff --git a/tests/sexpr2xmldata/sexpr2xml-pci-devs.sexpr b/tests/sexpr2xmldata/sexpr2xml-pci-devs.sexpr
index 624c6e9..29f4665 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pci-devs.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-pci-devs.sexpr
@@ -1 +1,10 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (pci (backend 0)(dev (domain 0x0001) (bus 0x0c) (slot 0x1b) (func 0x2))(dev (domain 0x0000) (bus 0x01) (slot 0x13) (func 0x0))))(device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestVG')(mode 'w'))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (pci (backend 0)(dev (domain 0x0001)\
+ (bus 0x0c) (slot 0x1b) (func 0x2))(dev (domain 0x0000) (bus 0x01) (slot 0x13)\
+ (func 0x0))))(device (vbd (dev 'xvda')\
+(uname 'phy:/dev/MainVG/GuestVG')(mode 'w'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr
index 51b511c..7161557 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr
@@ -1 +1,5 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(bootloader '/usr/bin/pypxeboot')(bootloader_args 'mac=AA:00:86:e2:35:72')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(bootloader '/usr/bin/pypxeboot')\
+(bootloader_args 'mac=AA:00:86:e2:35:72')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr
index 9951f79..e80259c 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr
@@ -1 +1,8 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(localtime 1)(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')(localtime 1)\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.sexpr b/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.sexpr
index 2be6822..200b8ca 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.sexpr
@@ -1 +1,8 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 4)(vcpu_avail 3)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 4)\
+(vcpu_avail 3)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.sexpr b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.sexpr
index 76c7947..0a2c45c 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.sexpr
@@ -1 +1,10 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vfb (type vnc)(vncunused 0)(vnclisten 0.0.0.0)(vncpasswd 123456)(keymap ja)(vncdisplay 25)))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w')))(device (vfb (type vnc)\
+(vncunused 0)(vnclisten 0.0.0.0)(vncpasswd 123456)(keymap ja)\
+(vncdisplay 25)))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.sexpr b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.sexpr
index f0f8df7..3fdc8a5 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.sexpr
@@ -1 +1,9 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vfb (type vnc)(vncunused 1)(vnclisten 0.0.0.0)(vncpasswd 123456)(keymap ja)))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w')))(device (vfb (type vnc)(vncunused 1)\
+(vnclisten 0.0.0.0)(vncpasswd 123456)(keymap ja)))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr
index 4452b1e..c825f32 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr
@@ -1 +1,9 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')(vnc 1)(vncunused 1)(vnclisten 0.0.0.0)(vncpasswd 123456)(keymap ja)))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')(vnc 1)(vncunused 1)(vnclisten 0.0.0.0)\
+(vncpasswd 123456)(keymap ja)))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w'))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv.sexpr b/tests/sexpr2xmldata/sexpr2xml-pv.sexpr
index ddf7810..d582ea0 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv.sexpr
+++ b/tests/sexpr2xmldata/sexpr2xml-pv.sexpr
@@ -1 +1,8 @@
-(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w'))))
diff --git a/tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr b/tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr
index 49d9f8d..88c0f68 100644
--- a/tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr
@@ -1 +1,5 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/usr/lib/xen/boot/pv-grub-x86_64.gz')(args '(hd0,0)/grub/menu.lst')))(device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestLV')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')(image (linux \
+(kernel '/usr/lib/xen/boot/pv-grub-x86_64.gz')(args '(hd0,0)/grub/menu.lst')))\
+(device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestLV')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr b/tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr
index 898fe2d..56ff525 100644
--- a/tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr
@@ -1 +1,10 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')(script 'vif-bridge')(ip '192.0.2.1'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')(image (linux \
+(kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w')))\
+(device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')\
+(script 'vif-bridge')(ip '192.0.2.1'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-curmem.sexpr b/tests/xml2sexprdata/xml2sexpr-curmem.sexpr
index 4b9c9a7..e7149b3 100644
--- a/tests/xml2sexprdata/xml2sexpr-curmem.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-curmem.sexpr
@@ -1 +1,6 @@
-(vm (name 'rhel5')(memory 175)(maxmem 385)(vcpus 1)(uuid '4f77abd2-3019-58e8-3bab-6fbf2118f880')(bootloader '/usr/bin/pygrub')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(device (tap (dev 'xvda')(uname 'tap:aio:/xen/rhel5.img')(mode 'w')))(device (vif (mac '00:16:3e:1d:06:15')(bridge 'xenbr0')(script 'vif-bridge'))))
\ No newline at end of file
+(vm (name 'rhel5')(memory 175)(maxmem 385)(vcpus 1)\
+(uuid '4f77abd2-3019-58e8-3bab-6fbf2118f880')(bootloader '/usr/bin/pygrub')\
+(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')\
+(device (tap (dev 'xvda')(uname 'tap:aio:/xen/rhel5.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1d:06:15')(bridge 'xenbr0')\
+(script 'vif-bridge'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr
index 6c7aa54..8c0b1cd 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr
@@ -1 +1,6 @@
-(vm (name 'pvtest')(memory 384)(maxmem 512)(vcpus 1)(uuid '49a0c6ff-c066-5392-6498-3632d093c2e7')(bootloader '/usr/bin/pygrub')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(device (tap (dev 'xvda')(uname 'tap:aio:/var/lib/xen/images/rhel5pv.img')(mode 'w!')))(device (vif (mac '00:16:3e:23:9e:eb')(bridge 'xenbr0')(script 'vif-bridge'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 384)(maxmem 512)(vcpus 1)\
+(uuid '49a0c6ff-c066-5392-6498-3632d093c2e7')(bootloader '/usr/bin/pygrub')\
+(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')\
+(device (tap (dev 'xvda')(uname 'tap:aio:/var/lib/xen/images/rhel5pv.img')\
+(mode 'w!')))(device (vif (mac '00:16:3e:23:9e:eb')(bridge 'xenbr0')\
+(script 'vif-bridge'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-block.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-block.sexpr
index 1885c55..960801a 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-block.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-disk-block.sexpr
@@ -1 +1,8 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestLV')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'phy:/dev/MainVG/GuestLV')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr
index 1885c55..960801a 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr
@@ -1 +1,8 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestLV')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'phy:/dev/MainVG/GuestLV')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.sexpr
index 61609b3..1e1b381 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.sexpr
@@ -1 +1,8 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (tap (dev 'xvda')(uname 'tap:qcow:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (tap (dev 'xvda')\
+(uname 'tap:qcow:/root/some.img')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.sexpr
index ad2d730..6b66e43 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.sexpr
@@ -1 +1,8 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (tap (dev 'xvda')(uname 'tap:aio:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (tap (dev 'xvda')\
+(uname 'tap:aio:/root/some.img')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr
index ad2d730..6b66e43 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr
@@ -1 +1,8 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (tap (dev 'xvda')(uname 'tap:aio:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (tap (dev 'xvda')\
+(uname 'tap:aio:/root/some.img')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.sexpr
index 0293cc6..1e79bcf 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.sexpr
@@ -1 +1,8 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (tap2 (dev 'xvda')(uname 'tap2:aio:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (tap2 (dev 'xvda')\
+(uname 'tap2:aio:/root/some.img')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr
index 0293cc6..1e79bcf 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr
@@ -1 +1,8 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (tap2 (dev 'xvda')(uname 'tap2:aio:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (tap2 (dev 'xvda')\
+(uname 'tap2:aio:/root/some.img')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr
index 60db610..dac0aa3 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr
@@ -1 +1,8 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-file.sexpr b/tests/xml2sexprdata/xml2sexpr-disk-file.sexpr
index 60db610..dac0aa3 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-file.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-disk-file.sexpr
@@ -1 +1,8 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-escape.sexpr b/tests/xml2sexprdata/xml2sexpr-escape.sexpr
index c78d6a6..7b29131 100644
--- a/tests/xml2sexprdata/xml2sexpr-escape.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-escape.sexpr
@@ -1 +1,10 @@
-(vm (name 'fvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (hvm (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5…"devel" ')(loader '/usr/lib/xen/boot/hvmloader')(vcpus 2)(boot c)(usb 1)(parallel none)(serial pty)(device_model '/usr/lib/xen/bin/qemu-dm')))(device (vbd (dev 'ioemu:xvda')(uname 'file:/root/\'\\some.img')(mode 'w'))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (hvm (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os&version="devel" ')\
+(loader '/usr/lib/xen/boot/hvmloader')(vcpus 2)(boot c)(usb 1)(parallel none)\
+(serial pty)(device_model '/usr/lib/xen/bin/qemu-dm')))\
+(device (vbd (dev 'ioemu:xvda')(uname 'file:/root/\'\\some.img')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr
index 2f91138..4950832 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr
@@ -1 +1,10 @@
-(vm (name 'fvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (hvm (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')(loader '/usr/lib/xen/boot/hvmloader')(vcpus 2)(boot c)(usb 1)(parallel none)(serial pty)(device_model '/usr/lib/xen/bin/qemu-dm')))(device (vbd (dev 'ioemu:xvda')(uname 'file:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (hvm (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')(loader '/usr/lib/xen/boot/hvmloader')(vcpus 2)\
+(boot c)(usb 1)(parallel none)(serial pty)\
+(device_model '/usr/lib/xen/bin/qemu-dm')))\
+(device (vbd (dev 'ioemu:xvda')(uname 'file:/root/some.img')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr
index f2a94f6..4f91119 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(localtime 1)(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)(localtime 1)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')(localtime 1)\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)\
+(localtime 1)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr
index e9fd597..71df15b 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr
@@ -1 +1,8 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)(usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)\
+(usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')\
+(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\
+(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr
index c888592..7fe2544 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr
@@ -1 +1,8 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)(usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type netfront))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)\
+(usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')\
+(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\
+(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(type netfront))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr
index 1fcf7e6..38504b1 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel tcp:localhost:9999)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel tcp:localhost:9999)\
+(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.sexpr
index 2048159..f3bfbd7 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2-ports.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial (/dev/ttyS0 /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial (/dev/ttyS0 /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')\
+(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\
+(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.sexpr
index f00e69c..9ecbbe0 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-dev-2nd-port.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial (none /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial (none /dev/ttyS1))(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr
index 7c2b388..be40218 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial file:/tmp/serial.log)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial file:/tmp/serial.log)(device_model '/usr/lib64/xen/bin/qemu-dm')\
+(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\
+(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr
index d9eecdf..40243a7 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial null)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial null)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr
index c4fe7cd..4e2dc78 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial pipe:/tmp/serial.pipe)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial pipe:/tmp/serial.pipe)(device_model '/usr/lib64/xen/bin/qemu-dm')\
+(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')\
+(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')\
+(script 'vif-bridge')(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr
index 3af2233..7ae9315 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial pty)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial pty)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr
index f918169..8369bb4 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial stdio)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial stdio)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp-telnet.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp-telnet.sexpr
index 9326199..40120cf 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp-telnet.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp-telnet.sexpr
@@ -1 +1,10 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial telnet:localhost:9999,server,nowait)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial telnet:localhost:9999,server,nowait)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr
index 50b0b70..7938a7b 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr
@@ -1 +1,10 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial tcp:localhost:9999,server,nowait)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial tcp:localhost:9999,server,nowait)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr
index 279dbf4..3c19f25 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr
@@ -1 +1,10 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial udp:localhost:9998@localhost:9999)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial udp:localhost:9998@localhost:9999)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr
index 94ff6f9..67ceeaa 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr
@@ -1 +1,10 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial unix:/tmp/serial.sock,server,nowait)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)\
+(serial unix:/tmp/serial.sock,server,nowait)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr
index 25868c4..4c37c35 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)(soundhw 'sb16,es1370')(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)\
+(soundhw 'sb16,es1370')(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr
index f904d9b..c0ad2bc 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(usbdevice mouse)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(usbdevice mouse)(parallel none)\
+(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-usbtablet.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-usbtablet.sexpr
index 6ab3c9d..ff1c695 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-usbtablet.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-usbtablet.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(usbdevice tablet)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(usbdevice tablet)(parallel none)\
+(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr
index 451c77d..81fb92d 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr
index 84a121f..b27e990 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr
@@ -1 +1,10 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)(usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)(vncunused 0)(vncdisplay 17)(keymap 'ja')))(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)\
+(usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')\
+(vnc 1)(vncunused 0)(vncdisplay 17)(keymap 'ja')))\
+(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr
index 089e66e..908ae94 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr
@@ -1 +1,10 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)(usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)(vncunused 1)(keymap 'ja')))(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)\
+(usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')\
+(vnc 1)(vncunused 1)(keymap 'ja')))(device (vbd (dev 'hda:disk')\
+(uname 'file:/root/foo.img')(mode 'w')))(device (vbd (dev 'hdc:cdrom')\
+(uname 'file:/root/boot.iso')(mode 'r')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-fv.sexpr b/tests/xml2sexprdata/xml2sexpr-fv.sexpr
index 451c77d..81fb92d 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv.sexpr
@@ -1 +1,9 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)\
+(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')\
+(on_reboot 'restart')(on_crash 'restart')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)\
+(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)\
+(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))\
+(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')\
+(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr b/tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr
index fbc5c43..0c0c62e 100644
--- a/tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr
@@ -1 +1,10 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')(script 'vif-bridge'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w')))\
+(device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')\
+(script 'vif-bridge'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr b/tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr
index a040966..d95ed82 100644
--- a/tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr
@@ -1 +1,10 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')(script 'vif-bridge')(model 'e1000'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w')))\
+(device (vif (mac '00:11:22:33:44:55')(bridge 'xenbr2')\
+(script 'vif-bridge')(model 'e1000'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-net-routed.sexpr b/tests/xml2sexprdata/xml2sexpr-net-routed.sexpr
index eed9bbc..3430e31 100644
--- a/tests/xml2sexprdata/xml2sexpr-net-routed.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-net-routed.sexpr
@@ -1 +1,10 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vif (mac '00:11:22:33:44:55')(script 'vif-routed')(ip '172.14.5.6'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w')))\
+(device (vif (mac '00:11:22:33:44:55')(script 'vif-routed')\
+(ip '172.14.5.6'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr b/tests/xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr
index 548bea3..eeebee3 100644
--- a/tests/xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr
@@ -1 +1,9 @@
-(vm (name 'test')(memory 350)(maxmem 382)(vcpus 1)(uuid 'cc2315e7-d26a-307a-438c-6d188ec4c09c')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)(apic 1)(pae 1)(usb 1)(parallel none)(serial none)(device_model '/usr/lib/xen/bin/qemu-dm')(vnc 1)(vncunused 0)(vncdisplay 6)))(device (vbd (dev 'hda:disk')(uname 'phy:/dev/sda8')(mode 'w')))(device (vbd (dev 'hdc:cdrom')(mode 'r')))(device (vif (mac '00:16:3e:0a:7b:39')(model 'e1000')(type ioemu))))
\ No newline at end of file
+(vm (name 'test')(memory 350)(maxmem 382)(vcpus 1)\
+(uuid 'cc2315e7-d26a-307a-438c-6d188ec4c09c')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(acpi 1)\
+(apic 1)(pae 1)(usb 1)(parallel none)(serial none)\
+(device_model '/usr/lib/xen/bin/qemu-dm')(vnc 1)(vncunused 0)(vncdisplay 6)))\
+(device (vbd (dev 'hda:disk')(uname 'phy:/dev/sda8')(mode 'w')))\
+(device (vbd (dev 'hdc:cdrom')(mode 'r')))\
+(device (vif (mac '00:16:3e:0a:7b:39')(model 'e1000')(type ioemu))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr b/tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr
index b767932..fdc48cf 100644
--- a/tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr
@@ -1 +1,10 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestLV')(mode 'w')))(device (pci (dev (domain 0x0001)(bus 0x0c)(slot 0x1b)(func 0x2))(dev (domain 0x0000)(bus 0x01)(slot 0x13)(func 0x0)))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'phy:/dev/MainVG/GuestLV')(mode 'w')))\
+(device (pci (dev (domain 0x0001)(bus 0x0c)(slot 0x1b)(func 0x2))\
+(dev (domain 0x0000)(bus 0x01)(slot 0x13)(func 0x0)))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr
index 70b06f4..c11938e 100644
--- a/tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr
@@ -1 +1,5 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(bootloader '/usr/bin/pypxeboot')(bootloader_args 'mac=AA:00:86:e2:35:72')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(bootloader '/usr/bin/pypxeboot')\
+(bootloader_args 'mac=AA:00:86:e2:35:72')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr
index 16bbdfd..589bbdf 100644
--- a/tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr
@@ -1 +1,6 @@
-(vm (name 'rhel5')(memory 175)(maxmem 385)(vcpus 1)(uuid '4f77abd2-3019-58e8-3bab-6fbf2118f880')(bootloader '/usr/bin/pygrub')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(localtime 1)(device (tap (dev 'xvda')(uname 'tap:aio:/xen/rhel5.img')(mode 'w')))(device (vif (mac '00:16:3e:1d:06:15')(bridge 'xenbr0')(script 'vif-bridge'))))
\ No newline at end of file
+(vm (name 'rhel5')(memory 175)(maxmem 385)(vcpus 1)\
+(uuid '4f77abd2-3019-58e8-3bab-6fbf2118f880')(bootloader '/usr/bin/pygrub')\
+(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(localtime 1)\
+(device (tap (dev 'xvda')(uname 'tap:aio:/xen/rhel5.img')(mode 'w')))\
+(device (vif (mac '00:16:3e:1d:06:15')(bridge 'xenbr0')\
+(script 'vif-bridge'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr
index e886545..df854ca 100644
--- a/tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr
@@ -1 +1,8 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 4)(vcpu_avail 3)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 4)(vcpu_avail 3)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr
index 42a8bc3..5eb0133 100644
--- a/tests/xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr
@@ -1 +1,10 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vkbd))(device (vfb (type vnc)(vncunused 1)(vnclisten '127.0.0.1')(vncpasswd '123456')(keymap 'ja'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w')))(device (vkbd))\
+(device (vfb (type vnc)(vncunused 1)(vnclisten '127.0.0.1')\
+(vncpasswd '123456')(keymap 'ja'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr
index 7d4de13..c74098f 100644
--- a/tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr
@@ -1 +1,10 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vkbd))(device (vfb (type vnc)(vncunused 0)(vncdisplay 6)(vnclisten '127.0.0.1')(vncpasswd '123456')(keymap 'ja'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w')))(device (vkbd))\
+(device (vfb (type vnc)(vncunused 0)(vncdisplay 6)(vnclisten '127.0.0.1')\
+(vncpasswd '123456')(keymap 'ja'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr
index 9857066..1e22b83 100644
--- a/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr
@@ -1 +1,9 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')(vnc 1)(vncunused 0)(vncdisplay 6)(vnclisten '127.0.0.1')(vncpasswd '123456')(keymap 'ja')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')(vnc 1)(vncunused 0)(vncdisplay 6)\
+(vnclisten '127.0.0.1')(vncpasswd '123456')(keymap 'ja')))\
+(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))\
diff --git a/tests/xml2sexprdata/xml2sexpr-pv.sexpr b/tests/xml2sexprdata/xml2sexpr-pv.sexpr
index 60db610..dac0aa3 100644
--- a/tests/xml2sexprdata/xml2sexpr-pv.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-pv.sexpr
@@ -1 +1,8 @@
-(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5… ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
\ No newline at end of file
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)\
+(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')\
+(on_reboot 'destroy')(on_crash 'destroy')\
+(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')\
+(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')\
+(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/\
+core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')\
+(uname 'file:/root/some.img')(mode 'w'))))\
--
1.7.4
2
3
[libvirt] [PATCH] Pass virSecurityManagerPtr to virSecurityDAC{Set, Restore}ChardevCallback
by Soren Hansen 03 Mar '11
by Soren Hansen 03 Mar '11
03 Mar '11
virSecurityDAC{Set,Restore}ChardevCallback expect virSecurityManagerPtr,
but are passed virDomainObjPtr instead. This makes
virSecurityDACSetChardevLabel set a wrong uid/gid on chardevs. This
patch fixes this behaviour.
Signed-off-by: Soren Hansen <soren(a)linux2go.dk>
---
src/security/security_dac.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/security/security_dac.c b/src/security/security_dac.c
index 1c1a037..b8de232 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -509,7 +509,7 @@ virSecurityDACRestoreSecurityAllLabel(virSecurityManagerPtr mgr,
if (virDomainChrDefForeach(vm->def,
false,
virSecurityDACRestoreChardevCallback,
- vm) < 0)
+ mgr) < 0)
rc = -1;
if (vm->def->os.kernel &&
@@ -565,7 +565,7 @@ virSecurityDACSetSecurityAllLabel(virSecurityManagerPtr mgr,
if (virDomainChrDefForeach(vm->def,
true,
virSecurityDACSetChardevCallback,
- vm) < 0)
+ mgr) < 0)
return -1;
if (vm->def->os.kernel &&
--
1.7.4.1
3
2
This patch set main goal is to allow dumping
of full debug informations for operations occuring
in libvirt daemon before a crash.
The principle is to save all logs to a round-robbin memory
buffer (which we already do, except we never use that
buffer), save the general daemon logs to a libvirtd.log
file for which we keep an open descriptor, and upon
reception of a fatal signal, save the memory buffer
directly to the file descriptor and fsync it.
There is quite a few remarks about this, we already have
that buffer but we don't log everything in, only what's
output, that's what patch 1 changes, then we need to
provide a function to dump this, so there is a new internal
API for it. We also need to be cautious about what
system call we operate from the signal handler, but
basically we should limit ourselves here to write/fsync and
sigaction which are safe there dixit POSIX.
Something like killall -USR2 libvirtd allows to see the
kind of output one get, an idle libvirtd is quiet, but
handle/timer/fdpolls tend to be very verbose, maybe we need
an intermediate debug level, but that would also impact the
API. Maybe now that this part is well debugged some of those
could be suppressed or commented off.
Also the buffer is a statically allocated 64KB, maybe this
could be made more flexible but IMHO that's not fundamental.
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
2
3
[libvirt] [PATCH 6/6] Dump the debug buffer to libvirtd.log on fatal signal
by Daniel Veillard 03 Mar '11
by Daniel Veillard 03 Mar '11
03 Mar '11
In case of imminent crash or upon request (signal USR2),
dump the logging buffer to the libvirtd.log file for
post-mortem analysis
* daemon/libvirtd.c: create a sig_fatal() handler connected to
SIGFPE SIGSEGV SIGILL SIGABRT SIGBUS and SIGUSR2, just dumping
the log buffer to the libvirtd.log open file descriptor
Signed-off-by: Daniel Veillard <veillard(a)redhat.com>
---
daemon/libvirtd.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 51 insertions(+), 0 deletions(-)
2
2
Depending on whether it's run as root or user, the log is saved
in the local state dir or in $HOME/.libvirt. The file descriptor
is kept as a global variable used by following patches.
* daemon/libvirtd.c: add libvirtd.log as the output for logs
Signed-off-by: Daniel Veillard <veillard(a)redhat.com>
---
daemon/libvirtd.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 85 insertions(+), 5 deletions(-)
2
2
03 Mar '11
Hi all,
When libvirt is running on a system with limited number of processes allowed
to be created by the user under which qemu processes are run, we hit
scalability issues.
My take on this issue is that it's in fact a host configuration issue and it
should just be documented that users need to increase the limit if they're
going to run large number of domains or on a large number of VCPUs.
I don't think libvirt should be involved in changing the limit in any way,
especially since it's not possible to change the limit in runtime as doing so
can only affect new processes.
However, I'd like to be sure this is also the thinking of broader community,
esp. Dan :-)
Jirka
2
2