[libvirt] virDomainBlockJobAbort and block_job_cancel
by Stefan Hajnoczi
Block job cancellation waits until the job has been cancelled before
returning. This allows clients to know that the operation has been
cancelled successfully. Unfortunately, these semantics are not really
possible with today's QEMU and libvirt code.
A command that waits for block I/O completion may wait for many
minutes. During this time the monitor is unavailable. While the QMP
protocol may in theory support multiple in-flight commands, both QEMU
and libvirt's implemenations are geared towards one command at a time.
So in practice a hung cancellation command would make the monitor
unavailable - we need to avoid this.
This means block_job_cancel cannot wait until the job is cancelled or
it risks hanging the monitor if there is a block I/O timeout. We need
a solution that reflects this in QEMU and libvirt, here is what I
propose:
block_job_cancel returns immediately upon marking the job cancelled.
The job may still be finishing block I/O but will cancel itself at
some point in the future. When the job actually completes it raises
the new BLOCK_JOB_CANCELLED event.
This means that virDomainBlockJobAbort() returns to the client without
a guarantee that the job has completed. If the client enumerates jobs
it may still see a job that has not finished cancelling. The client
must register a handler for the BLOCK_JOB_CANCELLED event if it wants
to know when the job really goes away. The BLOCK_JOB_CANCELLED event
has the same fields as the BLOCK_JOB_COMPLETED event, except it lacks
the optional "error" message field.
The impact on clients is that they need to add a BLOCK_JOB_CANCELLED
handler if they really want to wait. Most clients today (not many
exist) will be fine without waiting for cancellation.
Any objections or thoughts on this?
Stefan
13 years
[libvirt] [PATCH] When checking nttyFDs to see if it is != 1, be sure to use '1' and not '-1'
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
* src/lxc/lxc_controller.c: Fix check for tty count
---
src/lxc/lxc_controller.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 43414ba..bb936ee 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -1388,9 +1388,9 @@ lxcControllerRun(virDomainDefPtr def,
VIR_FREE(devptmx);
}
} else {
- if (nttyFDs != -1) {
- lxcError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Expected exactly one TTY fd"));
+ if (nttyFDs != 1) {
+ lxcError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Expected exactly one TTY fd, but got %zu"), nttyFDs);
goto cleanup;
}
}
--
1.7.7.3
13 years
[libvirt] [PATCH] Fix installation of libvirt-guests.service
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The installation rules for the libvirt-guests.service were
totally broken
- Installing in the wrong location
- The location was not overridable
- The install-systemd rule was not invoked anywhere
- The install-systemd rule was not invoking install-initscript
which it depends on
- The installed service file lacked a .service extension
* tools/Makefile.am: Fix install of libvirt-guests.service
---
tools/Makefile.am | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/tools/Makefile.am b/tools/Makefile.am
index c735398..25f0ffe 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -148,9 +148,9 @@ endif
virsh.1: virsh.pod
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
-install-data-local: install-init
+install-data-local: install-init install-systemd
-uninstall-local: uninstall-init
+uninstall-local: uninstall-init uninstall-systemd
install-sysconfig:
mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig
@@ -162,17 +162,20 @@ uninstall-sysconfig:
EXTRA_DIST += libvirt-guests.init.sh
-if LIBVIRT_INIT_SCRIPT_RED_HAT
-install-init: libvirt-guests.init install-sysconfig
+install-initscript: libvirt-guests.init
mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d
$(INSTALL_SCRIPT) libvirt-guests.init \
$(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests
-uninstall-init: install-sysconfig
+uninstall-initscript:
rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests
-BUILT_SOURCES += libvirt-guests.init
+
+if LIBVIRT_INIT_SCRIPT_RED_HAT
+BUILT_SOURCES += libvirt-guests.init
+install-init: install-sysconfig install-initscript
+uninstall-init: uninstall-sysconfig uninstall-initscript
else
install-init:
uninstall-init:
@@ -194,14 +197,16 @@ libvirt-guests.init: libvirt-guests.init.sh $(top_builddir)/config.status
EXTRA_DIST += libvirt-guests.service.in
+SYSTEMD_UNIT_DIR = /lib/systemd/system
+
if LIBVIRT_INIT_SCRIPT_SYSTEMD
-install-systemd: libvirt-guests.service install-sysconfig
- mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/systemd.d
+install-systemd: libvirt-guests.service install-initscript install-sysconfig
+ mkdir -p $(DESTDIR)$(SYSTEMD_UNIT_DIR)
$(INSTALL_SCRIPT) libvirt-guests.service \
- $(DESTDIR)$(sysconfdir)/rc.d/systemd.d/libvirt-guests
+ $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
-uninstall-systemd: install-sysconfig
- rm -f $(DESTDIR)$(sysconfdir)/rc.d/systemd.d/libvirt-guests
+uninstall-systemd: uninstall-initscript uninstall-sysconfig
+ rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
BUILT_SOURCES += libvirt-guests.service
--
1.7.7.3
13 years
[libvirt] [PATCH] Ensure to prefix %{buildroot} when overriding systemd install location
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The %makeinstall macro does not set DESTDIR, instead of explicitly
prefixes %{buildroot} onto all paths. Thus we need todo the same
when setting the systemd unit dir
* libvirt.spec.in: Prefix %{buildroot} onto %{unitdir}
---
libvirt.spec.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 4fe1c6a..80c5c1f 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -776,7 +776,7 @@ gzip -9 ChangeLog
%install
rm -fr %{buildroot}
-%makeinstall SYSTEMD_UNIT_DIR=%{_unitdir}
+%makeinstall SYSTEMD_UNIT_DIR=%{buildroot}%{_unitdir}
for i in domain-events/events-c dominfo domsuspend hellolibvirt openauth python xml/nwfilter systemtap
do
(cd examples/$i ; make clean ; rm -rf .deps .libs Makefile Makefile.in)
--
1.7.7.3
13 years
[libvirt] [PATCH 2/2] nwfilter: Pass the VM operation type into the nwfilter subsystem
by Stefan Berger
Another preparatory patch for DHCP snooping where we want to be able to
differentiate between a VM start/interface attach and other operations
like VM resume and libvirtd restart so that upon VM start we can internally
discard all DHCP leases that may still be active for a VM's interface
identified by its MAC address (and the VM's UUID). This then helps to prevent
installation of filters with IP addresses from a previous run of the VM upon
for example a libvird restart or a 'kill -SIGHUP':
Pass the VM operation into the nwfilter subsystem. Also this parameter
currently is an ATTRIBUTE_UNUSED in 'virNWFilterInstantiate' until the
DHCP snooping patches make use of it.
I am 'abusing' the enum type originally introduced for 802.1Qb{g|h} to
determine what type of operation is being used. Introducing another type
probably doesn't make much sense but maybe renaming this enum type to
something like 'virVMOperation' would?
---
src/conf/domain_nwfilter.c | 3 ++-
src/conf/domain_nwfilter.h | 2 ++
src/lxc/lxc_driver.c | 10 ++++++++--
src/nwfilter/nwfilter_driver.c | 3 ++-
src/nwfilter/nwfilter_gentech_driver.c | 15 +++++++++++----
src/nwfilter/nwfilter_gentech_driver.h | 1 +
src/qemu/qemu_command.c | 8 +++++---
src/qemu/qemu_command.h | 1 +
src/qemu/qemu_hotplug.c | 4 +++-
src/qemu/qemu_process.c | 7 +++++--
src/uml/uml_conf.c | 14 +++++++++-----
src/uml/uml_conf.h | 3 ++-
src/uml/uml_driver.c | 3 ++-
13 files changed, 53 insertions(+), 21 deletions(-)
Index: libvirt-acl/src/conf/domain_nwfilter.c
===================================================================
--- libvirt-acl.orig/src/conf/domain_nwfilter.c
+++ libvirt-acl/src/conf/domain_nwfilter.c
@@ -38,9 +38,10 @@ virDomainConfNWFilterRegister(virDomainC
int
virDomainConfNWFilterInstantiate(virConnectPtr conn,
const unsigned char *vmuuid,
+ enum virNetDevVPortProfileOp vmOp,
virDomainNetDefPtr net) {
if (nwfilterDriver != NULL)
- return nwfilterDriver->instantiateFilter(conn, vmuuid, net);
+ return nwfilterDriver->instantiateFilter(conn, vmuuid, vmOp, net);
/* driver module not available -- don't indicate failure */
return 0;
}
Index: libvirt-acl/src/conf/domain_nwfilter.h
===================================================================
--- libvirt-acl.orig/src/conf/domain_nwfilter.h
+++ libvirt-acl/src/conf/domain_nwfilter.h
@@ -25,6 +25,7 @@
typedef int (*virDomainConfInstantiateNWFilter)(virConnectPtr conn,
const unsigned char *vmuuid,
+ enum virNetDevVPortProfileOp,
virDomainNetDefPtr net);
typedef void (*virDomainConfTeardownNWFilter)(virDomainNetDefPtr net);
@@ -38,6 +39,7 @@ void virDomainConfNWFilterRegister(virDo
int virDomainConfNWFilterInstantiate(virConnectPtr conn,
const unsigned char *vmuuid,
+ enum virNetDevVPortProfileOp vmOp,
virDomainNetDefPtr net);
void virDomainConfNWFilterTeardown(virDomainNetDefPtr net);
void virDomainConfVMNWFilterTeardown(virDomainObjPtr vm);
Index: libvirt-acl/src/nwfilter/nwfilter_driver.c
===================================================================
--- libvirt-acl.orig/src/nwfilter/nwfilter_driver.c
+++ libvirt-acl/src/nwfilter/nwfilter_driver.c
@@ -444,9 +444,10 @@ cleanup:
static int
nwfilterInstantiateFilter(virConnectPtr conn,
const unsigned char *vmuuid,
+ enum virNetDevVPortProfileOp vmOp,
virDomainNetDefPtr net)
{
- return virNWFilterInstantiateFilter(conn, vmuuid, net);
+ return virNWFilterInstantiateFilter(conn, vmuuid, vmOp, net);
}
Index: libvirt-acl/src/nwfilter/nwfilter_gentech_driver.c
===================================================================
--- libvirt-acl.orig/src/nwfilter/nwfilter_gentech_driver.c
+++ libvirt-acl/src/nwfilter/nwfilter_gentech_driver.c
@@ -627,6 +627,7 @@ virNWFilterRuleInstancesToArray(int nEnt
*/
static int
virNWFilterInstantiate(const unsigned char *vmuuid ATTRIBUTE_UNUSED,
+ enum virNetDevVPortProfileOp vmOp ATTRIBUTE_UNUSED,
virNWFilterTechDriverPtr techdriver,
enum virDomainNetType nettype,
virNWFilterDefPtr filter,
@@ -764,6 +765,7 @@ err_unresolvable_vars:
*/
static int
__virNWFilterInstantiateFilter(const unsigned char *vmuuid,
+ enum virNetDevVPortProfileOp vmOp,
bool teardownOld,
const char *ifname,
int ifindex,
@@ -856,7 +858,7 @@ __virNWFilterInstantiateFilter(const uns
break;
}
- rc = virNWFilterInstantiate(vmuuid,
+ rc = virNWFilterInstantiate(vmuuid, vmOp,
techdriver,
nettype,
filter,
@@ -888,6 +890,7 @@ err_exit:
static int
_virNWFilterInstantiateFilter(virConnectPtr conn,
const unsigned char *vmuuid,
+ enum virNetDevVPortProfileOp vmOp,
const virDomainNetDefPtr net,
bool teardownOld,
enum instCase useNewFilter,
@@ -913,7 +916,7 @@ _virNWFilterInstantiateFilter(virConnect
goto cleanup;
}
- rc = __virNWFilterInstantiateFilter(vmuuid,
+ rc = __virNWFilterInstantiateFilter(vmuuid, vmOp,
teardownOld,
net->ifname,
ifindex,
@@ -951,6 +954,7 @@ virNWFilterInstantiateFilterLate(const u
virNWFilterLockFilterUpdates();
rc = __virNWFilterInstantiateFilter(vmuuid,
+ VIR_NETDEV_VPORT_PROFILE_OP_NO_OP,
true,
ifname,
ifindex,
@@ -982,11 +986,12 @@ virNWFilterInstantiateFilterLate(const u
int
virNWFilterInstantiateFilter(virConnectPtr conn,
const unsigned char *vmuuid,
+ enum virNetDevVPortProfileOp vmOp,
const virDomainNetDefPtr net)
{
bool foundNewFilter = false;
- return _virNWFilterInstantiateFilter(conn, vmuuid, net,
+ return _virNWFilterInstantiateFilter(conn, vmuuid, vmOp, net,
1,
INSTANTIATE_ALWAYS,
&foundNewFilter);
@@ -1001,7 +1006,9 @@ virNWFilterUpdateInstantiateFilter(virCo
{
bool foundNewFilter = false;
- int rc = _virNWFilterInstantiateFilter(conn, vmuuid, net,
+ int rc = _virNWFilterInstantiateFilter(conn, vmuuid,
+ VIR_NETDEV_VPORT_PROFILE_OP_NO_OP,
+ net,
0,
INSTANTIATE_FOLLOW_NEWFILTER,
&foundNewFilter);
Index: libvirt-acl/src/nwfilter/nwfilter_gentech_driver.h
===================================================================
--- libvirt-acl.orig/src/nwfilter/nwfilter_gentech_driver.h
+++ libvirt-acl/src/nwfilter/nwfilter_gentech_driver.h
@@ -39,6 +39,7 @@ enum instCase {
int virNWFilterInstantiateFilter(virConnectPtr conn,
const unsigned char *vmuuid,
+ enum virNetDevVPortProfileOp vmOp,
const virDomainNetDefPtr net);
int virNWFilterUpdateInstantiateFilter(virConnectPtr conn,
const unsigned char *vmuuid,
Index: libvirt-acl/src/qemu/qemu_command.c
===================================================================
--- libvirt-acl.orig/src/qemu/qemu_command.c
+++ libvirt-acl/src/qemu/qemu_command.c
@@ -171,6 +171,7 @@ qemuPhysIfaceConnect(virDomainDefPtr def
int
qemuNetworkIfaceConnect(virDomainDefPtr def,
virConnectPtr conn,
+ enum virNetDevVPortProfileOp vmOp,
struct qemud_driver *driver,
virDomainNetDefPtr net,
virBitmapPtr qemuCaps)
@@ -275,7 +276,8 @@ qemuNetworkIfaceConnect(virDomainDefPtr
if (tapfd >= 0) {
if ((net->filter) && (net->ifname)) {
- if (virDomainConfNWFilterInstantiate(conn, def->uuid, net) < 0)
+ if (virDomainConfNWFilterInstantiate(conn, def->uuid, vmOp,
+ net) < 0)
VIR_FORCE_CLOSE(tapfd);
}
}
@@ -4339,8 +4341,8 @@ qemuBuildCommandLine(virConnectPtr conn,
actualType = virDomainNetGetActualType(net);
if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK ||
actualType == VIR_DOMAIN_NET_TYPE_BRIDGE) {
- int tapfd = qemuNetworkIfaceConnect(def, conn, driver, net,
- qemuCaps);
+ int tapfd = qemuNetworkIfaceConnect(def, conn, vmop, driver,
+ net, qemuCaps);
if (tapfd < 0)
goto error;
Index: libvirt-acl/src/lxc/lxc_driver.c
===================================================================
--- libvirt-acl.orig/src/lxc/lxc_driver.c
+++ libvirt-acl/src/lxc/lxc_driver.c
@@ -1184,6 +1184,7 @@ static void lxcVmCleanup(lxc_driver_t *d
static int lxcSetupInterfaceBridged(virConnectPtr conn,
virDomainDefPtr vm,
+ enum virNetDevVPortProfileOp vmOp,
virDomainNetDefPtr net,
const char *brname,
unsigned int *nveths,
@@ -1228,7 +1229,8 @@ static int lxcSetupInterfaceBridged(virC
}
if (net->filter &&
- virDomainConfNWFilterInstantiate(conn, vm->uuid, net) < 0)
+ virDomainConfNWFilterInstantiate(conn, vm->uuid, vmOp,
+ net) < 0)
goto cleanup;
ret = 0;
@@ -1319,6 +1321,7 @@ cleanup:
*/
static int lxcSetupInterfaces(virConnectPtr conn,
virDomainDefPtr def,
+ enum virNetDevVPortProfileOp vmOp,
unsigned int *nveths,
char ***veths)
{
@@ -1349,6 +1352,7 @@ static int lxcSetupInterfaces(virConnect
if (lxcSetupInterfaceBridged(conn,
def,
+ vmOp,
def->nets[i],
brname,
nveths,
@@ -1368,6 +1372,7 @@ static int lxcSetupInterfaces(virConnect
}
if (lxcSetupInterfaceBridged(conn,
def,
+ vmOp,
def->nets[i],
brname,
nveths,
@@ -1818,7 +1823,8 @@ static int lxcVmStart(virConnectPtr conn
}
}
- if (lxcSetupInterfaces(conn, vm->def, &nveths, &veths) != 0)
+ if (lxcSetupInterfaces(conn, vm->def, VIR_NETDEV_VPORT_PROFILE_OP_CREATE,
+ &nveths, &veths) != 0)
goto cleanup;
/* Save the configuration for the controller */
Index: libvirt-acl/src/qemu/qemu_command.h
===================================================================
--- libvirt-acl.orig/src/qemu/qemu_command.h
+++ libvirt-acl/src/qemu/qemu_command.h
@@ -126,6 +126,7 @@ char * qemuBuildRedirdevDevStr(virDomain
int qemuNetworkIfaceConnect(virDomainDefPtr def,
virConnectPtr conn,
+ enum virNetDevVPortProfileOp vmOp,
struct qemud_driver *driver,
virDomainNetDefPtr net,
virBitmapPtr qemuCaps)
Index: libvirt-acl/src/qemu/qemu_hotplug.c
===================================================================
--- libvirt-acl.orig/src/qemu/qemu_hotplug.c
+++ libvirt-acl/src/qemu/qemu_hotplug.c
@@ -669,7 +669,9 @@ int qemuDomainAttachNetDevice(virConnect
actualType = virDomainNetGetActualType(net);
if (actualType == VIR_DOMAIN_NET_TYPE_BRIDGE ||
actualType == VIR_DOMAIN_NET_TYPE_NETWORK) {
- if ((tapfd = qemuNetworkIfaceConnect(vm->def, conn, driver, net,
+ if ((tapfd = qemuNetworkIfaceConnect(vm->def, conn,
+ VIR_NETDEV_VPORT_PROFILE_OP_CREATE,
+ driver, net,
priv->qemuCaps)) < 0)
goto cleanup;
iface_connected = true;
Index: libvirt-acl/src/qemu/qemu_process.c
===================================================================
--- libvirt-acl.orig/src/qemu/qemu_process.c
+++ libvirt-acl/src/qemu/qemu_process.c
@@ -2310,6 +2310,7 @@ qemuProcessNotifyNets(virDomainDefPtr de
static int
qemuProcessFiltersInstantiate(virConnectPtr conn,
+ enum virNetDevVPortProfileOp vmOp,
virDomainDefPtr def)
{
int err = 0;
@@ -2321,7 +2322,8 @@ qemuProcessFiltersInstantiate(virConnect
for (i = 0 ; i < def->nnets ; i++) {
virDomainNetDefPtr net = def->nets[i];
if ((net->filter) && (net->ifname)) {
- if (virDomainConfNWFilterInstantiate(conn, def->uuid, net) < 0) {
+ if (virDomainConfNWFilterInstantiate(conn, def->uuid, vmOp,
+ net) < 0) {
err = 1;
break;
}
@@ -2662,7 +2664,8 @@ qemuProcessReconnect(void *opaque)
if (qemuProcessNotifyNets(obj->def) < 0)
goto error;
- if (qemuProcessFiltersInstantiate(conn, obj->def))
+ if (qemuProcessFiltersInstantiate(conn, VIR_NETDEV_VPORT_PROFILE_OP_NO_OP,
+ obj->def))
goto error;
if (qemuDomainCheckEjectableMedia(driver, obj) < 0)
Index: libvirt-acl/src/uml/uml_conf.c
===================================================================
--- libvirt-acl.orig/src/uml/uml_conf.c
+++ libvirt-acl/src/uml/uml_conf.c
@@ -118,6 +118,7 @@ virCapsPtr umlCapsInit(void) {
static int
umlConnectTapDevice(virConnectPtr conn,
virDomainDefPtr vm,
+ enum virNetDevVPortProfileOp vmOp,
virDomainNetDefPtr net,
const char *bridge)
{
@@ -144,7 +145,7 @@ umlConnectTapDevice(virConnectPtr conn,
}
if (net->filter) {
- if (virDomainConfNWFilterInstantiate(conn, vm->uuid, net) < 0) {
+ if (virDomainConfNWFilterInstantiate(conn, vm->uuid, vmOp, net) < 0) {
if (template_ifname)
VIR_FREE(net->ifname);
goto error;
@@ -162,6 +163,7 @@ error:
static char *
umlBuildCommandLineNet(virConnectPtr conn,
virDomainDefPtr vm,
+ enum virNetDevVPortProfileOp vmOp,
virDomainNetDefPtr def,
int idx)
{
@@ -227,7 +229,7 @@ umlBuildCommandLineNet(virConnectPtr con
goto error;
}
- if (umlConnectTapDevice(conn, vm, def, bridge) < 0) {
+ if (umlConnectTapDevice(conn, vm, vmOp, def, bridge) < 0) {
VIR_FREE(bridge);
goto error;
}
@@ -238,7 +240,7 @@ umlBuildCommandLineNet(virConnectPtr con
}
case VIR_DOMAIN_NET_TYPE_BRIDGE:
- if (umlConnectTapDevice(conn, vm, def,
+ if (umlConnectTapDevice(conn, vm, vmOp, def,
def->data.bridge.brname) < 0)
goto error;
@@ -399,7 +401,8 @@ static char *umlNextArg(char *args)
*/
virCommandPtr umlBuildCommandLine(virConnectPtr conn,
struct uml_driver *driver,
- virDomainObjPtr vm)
+ virDomainObjPtr vm,
+ enum virNetDevVPortProfileOp vmOp)
{
int i, j;
struct utsname ut;
@@ -432,7 +435,8 @@ virCommandPtr umlBuildCommandLine(virCon
}
for (i = 0 ; i < vm->def->nnets ; i++) {
- char *ret = umlBuildCommandLineNet(conn, vm->def, vm->def->nets[i], i);
+ char *ret = umlBuildCommandLineNet(conn, vm->def, vmOp,
+ vm->def->nets[i], i);
if (!ret)
goto error;
virCommandAddArg(cmd, ret);
Index: libvirt-acl/src/uml/uml_conf.h
===================================================================
--- libvirt-acl.orig/src/uml/uml_conf.h
+++ libvirt-acl/src/uml/uml_conf.h
@@ -79,6 +79,7 @@ virCapsPtr umlCapsInit (v
virCommandPtr umlBuildCommandLine(virConnectPtr conn,
struct uml_driver *driver,
- virDomainObjPtr dom);
+ virDomainObjPtr dom,
+ enum virNetDevVPortProfileOp vmOp);
#endif /* __UML_CONF_H */
Index: libvirt-acl/src/uml/uml_driver.c
===================================================================
--- libvirt-acl.orig/src/uml/uml_driver.c
+++ libvirt-acl/src/uml/uml_driver.c
@@ -1039,7 +1039,8 @@ static int umlStartVMDaemon(virConnectPt
return -1;
}
- if (!(cmd = umlBuildCommandLine(conn, driver, vm))) {
+ if (!(cmd = umlBuildCommandLine(conn, driver, vm,
+ VIR_NETDEV_VPORT_PROFILE_OP_CREATE))) {
VIR_FORCE_CLOSE(logfd);
virDomainConfVMNWFilterTeardown(vm);
umlCleanupTapDevices(vm);
13 years
[libvirt] [RFC v5 PATCH 0/5] PowerPC : Extend Libvirt for PowerPC architecture
by Prerna Saxena
Libvirt continues to be the key interface to configure and manage the
KVM guest instances on x86. This patch set is an effort to enable
libvirt to support KVM guest configuration and management on Power Book3S
machines.
Based on community discussion around the earlier version, this patch
series augments the present 'kvm' driver to support PowerPC-KVM based
guests. With the CPU driver for PowerPC already merged, this patch series
adds on clean-ups, and some test cases as suggested.
This series mostly focuses on cleanup and addition of testcases for base-
powerpc patches. The patches for enabling spapr-vio based addressing would
be sent out shortly, with the right domain schema additions.
Series description:
-------------------
Patch 1/5 : Use sysfs to decipher cpu topology information.
Patch 2/5 : Modify the tests/nodeinfotest.c to use sysfs in addition to
proc/cpuinfo.
Patch 3/5 : Add support for ppc64 qemu
Patch 4/5 : Clean up qemuBuildCommandLine to remove x86-specific assumptions.
Patch 5/5 : Add ppc64 specific definitions to domain.rng
Changelog:
----------
** v1->v2 :
* Patches 1,2,3 unchanged ; The hacks in Patch 4 of v1 replaced by a
new patch to neatly select arch-specific features.
** v2->v3 :
* Patches 1,2,3 have minor cleanups ; Patch 4 no longer has an
arch-specific handler routine. It is now replaced by a much simpler
patch that merely removes x86/pc-specific assumptions from libvirt.
Patch 5 is a new addition from Michael Ellerman that adds a new
device-tree based addressing mechanism for the 'pseries' guest.
** v3->v4 :
* Patch 1 has minor cleanups,
Patch 2 is a new addition that introduces test cases for patch 1.
Patch 3,4 also have minor cleanups
Patch 5 is a new addition, it contains ppc64 specific definitions
to domain.rng
** v4->v5 :
* Patch 1 fixes some issues that were causing testcase (patch 2) to fail.
Patch 2 has minor cleanups.
Patch 3 unchanged.
Patch 4 has a whitespace cleanup.
Patch 5 is a subset of the original patch, it contains ppc64 specific
additions to domain.rng
--
Prerna Saxena
Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India
13 years
[libvirt] Interface pools and passthrough mode (issue to discuss)
by Shradha Shah
Hello All,
While working on my patches I came across an issue which I would like to discuss with everybody.
The definition of passthrough mode in the Network XML Format document says that, in passthrough mode each physical interface can only be in use by a single guest interface at a time.
Consider the scenario where we a single KVM host:
We can define 2 network configurations, one that uses vepa and other that uses passthrough mode with the same interface pool.
# virsh net-define vepa_network.xml
# virsh net-define passthrough-network.xml
Examples:
<network>
<name>vepa-network</name>
<uuid>81ff9090-c91e-6742-64da-4a736edb9a8f</uuid>
<forward mode="vepa">
<interface dev="eth10"/>
<interface dev="eth11"/>
<interface dev="eth12"/>
</forward>
</network>
<network>
<name>passthrough-network</name>
<uuid>81ff9090-c91e-6742-64da-4a736edb9a88</uuid>
<forward mode="passthrough">
<interface dev="eth10"/>
<interface dev="eth11"/>
<interface dev="eth12"/>
</forward>
</network>
Suppose we use the vepa-network for guest1 and passthrough network for guest2.
Examples:
Guest 1: (snippet of xml)
<interface type='network'>
<source network='vepa-network'/>
<mac address='00:50:56:0e:86:3b'/>
<actual type='direct'>
<source mode='vepa'/>
</actual>
</interface>
Guest2: (snippet of xml)
<interface type='network'>
<source network='passthrough-network'/>
<mac address='00:50:56:0e:86:4b'/>
<actual type='direct'>
<source mode='passthrough'/>
</actual>
</interface>
# virsh define guest1.xml
# virsh define guest2.xml
# virsh start guest1
# virsh start guest2
Since the virNetworkDef is different for the two network configs, how does libvirt keep track of the interfaces in use at this point?
Wouldn't libvirt use the first free interface in both cases which will be eth10 since the usageCount will be zero in both cases start of day?
Many Thanks,
Regards,
Shradha Shah
13 years
[libvirt] [PATCH] build: fix build with older libxml2
by Eric Blake
On RHEL 5, with libxml2-2.6.26, the build failed with:
virsh.c: In function 'vshNodeIsSuperset':
virsh.c:11951: warning: implicit declaration of function 'xmlChildElementCount'
(or if warnings aren't errors, a link failure later on).
* src/util/xml.h (virXMLChildElementCount): New prototype.
* src/util/xml.c (virXMLChildElementCount): New function.
* src/libvirt_private.syms (xml.h): Export it.
* tools/virsh.c (vshNodeIsSuperset): Use it.
---
I haven't decided yet whether this is trivial enough to push under
the build-breaker rule, but it did fix my build on RHEL 5.
src/libvirt_private.syms | 1 +
src/util/xml.c | 20 ++++++++++++++++++++
src/util/xml.h | 1 +
tools/virsh.c | 9 +++++----
4 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 99a1099..a81c230 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1400,6 +1400,7 @@ virTimeStringThenRaw;
# xml.h
+virXMLChildElementCount;
virXMLParseHelper;
virXMLPropString;
virXMLSaveFile;
diff --git a/src/util/xml.c b/src/util/xml.c
index 4e98b05..2909e85 100644
--- a/src/util/xml.c
+++ b/src/util/xml.c
@@ -833,3 +833,23 @@ virXMLSaveFile(const char *path,
return virFileRewrite(path, S_IRUSR | S_IWUSR, virXMLRewriteFile, &data);
}
+
+/* Returns the number of children of node, or -1 on error. */
+long
+virXMLChildElementCount(xmlNodePtr node)
+{
+ long ret = 0;
+ xmlNodePtr cur = NULL;
+
+ /* xmlChildElementCount returns 0 on error, which isn't helpful;
+ * besides, it is not available in libxml2 2.6. */
+ if (!node || node->type != XML_ELEMENT_NODE)
+ return -1;
+ cur = node->children;
+ while (cur) {
+ if (cur->type == XML_ELEMENT_NODE)
+ ret++;
+ cur = cur->next;
+ }
+ return ret;
+}
diff --git a/src/util/xml.h b/src/util/xml.h
index c492063..a3750fa 100644
--- a/src/util/xml.h
+++ b/src/util/xml.h
@@ -52,6 +52,7 @@ int virXPathNodeSet(const char *xpath,
xmlNodePtr **list);
char * virXMLPropString(xmlNodePtr node,
const char *name);
+long virXMLChildElementCount(xmlNodePtr node);
/* Internal function; prefer the macros below. */
xmlDocPtr virXMLParseHelper(int domcode,
diff --git a/tools/virsh.c b/tools/virsh.c
index d02be5c..a51478f 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -11919,7 +11919,7 @@ vshNodeIsSuperset(xmlNodePtr n1, xmlNodePtr n2)
bool found;
bool visited;
bool ret = false;
- unsigned long n1_child_size, n2_child_size, n1_iter;
+ long n1_child_size, n2_child_size, n1_iter;
virBitmapPtr bitmap;
if (!n1 && !n2)
@@ -11948,9 +11948,10 @@ vshNodeIsSuperset(xmlNodePtr n1, xmlNodePtr n2)
attr = attr->next;
}
- n1_child_size = xmlChildElementCount(n1);
- n2_child_size = xmlChildElementCount(n2);
- if (n1_child_size < n2_child_size)
+ n1_child_size = virXMLChildElementCount(n1);
+ n2_child_size = virXMLChildElementCount(n2);
+ if (n1_child_size < 0 || n2_child_size < 0 ||
+ n1_child_size < n2_child_size)
return false;
if (n1_child_size == 0 && n2_child_size == 0)
--
1.7.7.3
13 years
[libvirt] [PATCH 1/2] maint: use common xml quoting style
by Eric Blake
According to the official XML specification [1], attributes
can be specified with either ' or " (where the difference is
that you can use '"' or '"' but must use """,
and conversely for "'" or "'" vs. '''). But our
code generation in src/conf prefers to output the '' notation,
as it is easier to write C string literals for that style.
Using a consistent style throughout libvirt will make it
easier for users to copy-and-paste without wondering why we
switch quoting styles mid-stream.
[1] http://www.w3.org/TR/xml11/#NT-Reference
Mechanical conversion done with:
$ find -name '*.xml' | \
xargs sed -i 's/\([a-zA-Z0-9_]*=\)"\([^"]*\)"/\1'\''\2'\''/g'
followed by inspecting the results, and touching up the change
in tests/xml2sexprdata/xml2sexpr-escape.xml to fix 'make check'.
* cfg.mk (sc_rng_quote_style): Enforce the rule.
* examples/xml/storage/*.xml: Fix fallout.
* examples/xml/test/*.xml: Likewise.
* python/libvirt-*override-api.xml: Likewise.
* src/network/default.xml: Likewise.
* tests/*/*.xml: Likewise.
---
cfg.mk | 7 ++
examples/xml/storage/pool-dir.xml | 2 +-
examples/xml/storage/pool-fs.xml | 4 +-
examples/xml/storage/pool-logical.xml | 4 +-
examples/xml/storage/pool-netfs.xml | 6 +-
examples/xml/storage/vol-cow.xml | 6 +-
examples/xml/storage/vol-qcow.xml | 6 +-
examples/xml/storage/vol-qcow2.xml | 6 +-
examples/xml/storage/vol-raw.xml | 6 +-
examples/xml/storage/vol-sparse.xml | 4 +-
examples/xml/storage/vol-vmdk.xml | 6 +-
examples/xml/test/testnode.xml | 14 ++--
examples/xml/test/testnodeinline.xml | 66 ++++++++++----------
python/libvirt-override-api.xml | 20 +++---
python/libvirt-qemu-override-api.xml | 2 +-
src/network/default.xml | 6 +-
.../networkxml2argvdata/nat-network-dns-hosts.xml | 2 +-
tests/networkxml2xmlin/8021Qbh-net.xml | 16 +++---
tests/networkxml2xmlin/direct-net.xml | 4 +-
tests/networkxml2xmlin/host-bridge-net.xml | 4 +-
tests/networkxml2xmlin/isolated-network.xml | 6 +-
tests/networkxml2xmlin/nat-network.xml | 20 +++---
tests/networkxml2xmlin/netboot-network.xml | 12 ++--
tests/networkxml2xmlin/netboot-proxy-network.xml | 10 ++--
tests/networkxml2xmlin/routed-network.xml | 6 +-
tests/networkxml2xmlin/vepa-net.xml | 24 ++++----
tests/nwfilterxml2xmlin/stp-test.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa1.xml | 6 +-
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa2.xml | 6 +-
.../qemuxml2argv-cpu-topology1.xml | 2 +-
.../qemuxml2argv-cpu-topology2.xml | 2 +-
.../qemuxml2argv-cpu-topology3.xml | 2 +-
.../qemuxml2argv-numatune-memory.xml | 2 +-
tests/storagepoolxml2xmlin/pool-iscsi-auth.xml | 4 +-
.../pool-iscsi-vendor-product.xml | 4 +-
tests/storagepoolxml2xmlin/pool-iscsi.xml | 4 +-
tests/storagepoolxml2xmlin/pool-logical-create.xml | 6 +-
tests/storagepoolxml2xmlin/pool-mpath.xml | 2 +-
tests/storagepoolxml2xmlin/pool-scsi.xml | 4 +-
tests/storagevolxml2xmlin/vol-file.xml | 2 +-
tests/storagevolxml2xmlin/vol-qcow2.xml | 2 +-
tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.xml | 12 ++--
tests/xml2sexprdata/xml2sexpr-disk-drv-blkback.xml | 2 +-
.../xml2sexpr-disk-drv-blktap-qcow.xml | 2 +-
.../xml2sexpr-disk-drv-blktap-raw.xml | 2 +-
tests/xml2sexprdata/xml2sexpr-disk-drv-blktap.xml | 2 +-
.../xml2sexpr-disk-drv-blktap2-raw.xml | 2 +-
tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.xml | 2 +-
tests/xml2sexprdata/xml2sexpr-disk-drv-loop.xml | 2 +-
tests/xml2sexprdata/xml2sexpr-escape.xml | 2 +-
tests/xml2sexprdata/xml2sexpr-net-bridged.xml | 10 ++--
tests/xml2sexprdata/xml2sexpr-net-e1000.xml | 10 ++--
tests/xml2sexprdata/xml2sexpr-net-routed.xml | 12 ++--
tests/xml2sexprdata/xml2sexpr-pv-vfb-new-auto.xml | 2 +-
tests/xml2sexprdata/xml2sexpr-pv-vfb-new.xml | 2 +-
tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml | 2 +-
.../xml2vmxdata/xml2vmx-serial-network-client.xml | 4 +-
.../xml2vmxdata/xml2vmx-serial-network-server.xml | 4 +-
58 files changed, 201 insertions(+), 194 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 817b5f3..c964c27 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -419,6 +419,13 @@ sc_TAB_in_indentation:
halt='indent with space, not TAB, in C, sh, html, py, and RNG schemas' \
$(_sc_search_regexp)
+# In xml files, prefer name='abc' over name="abc"
+sc_rng_quote_style:
+ @prohibit='\b[-a-zA-Z0-9_]+="' \
+ in_vc_files='\.(xml)$$' \
+ halt='use name='\'val\'', not name="val", in xml' \
+ $(_sc_search_regexp)
+
ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
|isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper
diff --git a/examples/xml/storage/pool-dir.xml b/examples/xml/storage/pool-dir.xml
index 47a3bfa..4c10792 100644
--- a/examples/xml/storage/pool-dir.xml
+++ b/examples/xml/storage/pool-dir.xml
@@ -1,4 +1,4 @@
-<pool type="dir">
+<pool type='dir'>
<name>virtimages</name>
<target>
<path>/var/lib/virt/images</path>
diff --git a/examples/xml/storage/pool-fs.xml b/examples/xml/storage/pool-fs.xml
index b0417d9..c8037f9 100644
--- a/examples/xml/storage/pool-fs.xml
+++ b/examples/xml/storage/pool-fs.xml
@@ -1,7 +1,7 @@
-<pool type="fs">
+<pool type='fs'>
<name>virtimages</name>
<source>
- <device path="/dev/VolGroup00/VirtImages"/>
+ <device path='/dev/VolGroup00/VirtImages'/>
</source>
<target>
<path>/var/lib/virt/images</path>
diff --git a/examples/xml/storage/pool-logical.xml b/examples/xml/storage/pool-logical.xml
index c33e903..16c34cb 100644
--- a/examples/xml/storage/pool-logical.xml
+++ b/examples/xml/storage/pool-logical.xml
@@ -1,7 +1,7 @@
-<pool type="logical">
+<pool type='logical'>
<name>HostVG</name>
<source>
- <device path="/dev/sda1"/>
+ <device path='/dev/sda1'/>
</source>
<target>
<path>/dev/HostVG</path>
diff --git a/examples/xml/storage/pool-netfs.xml b/examples/xml/storage/pool-netfs.xml
index d1df2e2..0585492 100644
--- a/examples/xml/storage/pool-netfs.xml
+++ b/examples/xml/storage/pool-netfs.xml
@@ -1,8 +1,8 @@
-<pool type="netfs">
+<pool type='netfs'>
<name>virtimages</name>
<source>
- <host name="nfs.example.com"/>
- <directory path="/var/lib/virt/images"/>
+ <host name='nfs.example.com'/>
+ <directory path='/var/lib/virt/images'/>
</source>
<target>
<path>/var/lib/virt/images</path>
diff --git a/examples/xml/storage/vol-cow.xml b/examples/xml/storage/vol-cow.xml
index 1d80a01..e584362 100644
--- a/examples/xml/storage/vol-cow.xml
+++ b/examples/xml/storage/vol-cow.xml
@@ -1,10 +1,10 @@
-<volume type="file">
+<volume type='file'>
<name>cow.img</name>
<storage>
<allocation>0</allocation>
- <capacity unit="T">1</capacity>
+ <capacity unit='T'>1</capacity>
</storage>
<target>
- <format type="cow"/>
+ <format type='cow'/>
</target>
</volume>
diff --git a/examples/xml/storage/vol-qcow.xml b/examples/xml/storage/vol-qcow.xml
index af2011d..879cfcd 100644
--- a/examples/xml/storage/vol-qcow.xml
+++ b/examples/xml/storage/vol-qcow.xml
@@ -1,10 +1,10 @@
-<volume type="file">
+<volume type='file'>
<name>qcow.img</name>
<storage>
<allocation>0</allocation>
- <capacity unit="T">1</capacity>
+ <capacity unit='T'>1</capacity>
</storage>
<target>
- <format type="qcow"/>
+ <format type='qcow'/>
</target>
</volume>
diff --git a/examples/xml/storage/vol-qcow2.xml b/examples/xml/storage/vol-qcow2.xml
index 9d944a7..7d806f5 100644
--- a/examples/xml/storage/vol-qcow2.xml
+++ b/examples/xml/storage/vol-qcow2.xml
@@ -1,10 +1,10 @@
-<volume type="file">
+<volume type='file'>
<name>qcow2.img</name>
<storage>
<allocation>0</allocation>
- <capacity unit="T">1</capacity>
+ <capacity unit='T'>1</capacity>
</storage>
<target>
- <format type="qcow2"/>
+ <format type='qcow2'/>
</target>
</volume>
diff --git a/examples/xml/storage/vol-raw.xml b/examples/xml/storage/vol-raw.xml
index 59d4b45..8b08090 100644
--- a/examples/xml/storage/vol-raw.xml
+++ b/examples/xml/storage/vol-raw.xml
@@ -1,7 +1,7 @@
-<volume type="file">
+<volume type='file'>
<name>raw.img</name>
<storage>
- <allocation unit="M">10</allocation>
- <capacity unit="M">1000</capacity>
+ <allocation unit='M'>10</allocation>
+ <capacity unit='M'>1000</capacity>
</storage>
</volume>
diff --git a/examples/xml/storage/vol-sparse.xml b/examples/xml/storage/vol-sparse.xml
index c529a49..40e286a 100644
--- a/examples/xml/storage/vol-sparse.xml
+++ b/examples/xml/storage/vol-sparse.xml
@@ -1,7 +1,7 @@
-<volume type="file">
+<volume type='file'>
<name>sparse.img</name>
<storage>
<allocation>0</allocation>
- <capacity unit="T">1</capacity>
+ <capacity unit='T'>1</capacity>
</storage>
</volume>
diff --git a/examples/xml/storage/vol-vmdk.xml b/examples/xml/storage/vol-vmdk.xml
index 5af0a84..2aa8e0b 100644
--- a/examples/xml/storage/vol-vmdk.xml
+++ b/examples/xml/storage/vol-vmdk.xml
@@ -1,10 +1,10 @@
-<volume type="file">
+<volume type='file'>
<name>vmdk3.img</name>
<storage>
<allocation>0</allocation>
- <capacity unit="T">1</capacity>
+ <capacity unit='T'>1</capacity>
</storage>
<target>
- <format type="vmdk"/>
+ <format type='vmdk'/>
</target>
</volume>
diff --git a/examples/xml/test/testnode.xml b/examples/xml/test/testnode.xml
index 001e353..ad02da5 100644
--- a/examples/xml/test/testnode.xml
+++ b/examples/xml/test/testnode.xml
@@ -7,14 +7,14 @@
virsh -c test://absolute/path/to/this/dir/testnode.xml nodeinfo
-->
- <domain file="testdomfv0.xml"/>
- <domain file="testdomfc4.xml"/>
- <network file="testnetpriv.xml"/>
- <network file="testnetdef.xml"/>
- <pool file="testpool.xml">
- <volume file="testvol.xml"/>
+ <domain file='testdomfv0.xml'/>
+ <domain file='testdomfc4.xml'/>
+ <network file='testnetpriv.xml'/>
+ <network file='testnetdef.xml'/>
+ <pool file='testpool.xml'>
+ <volume file='testvol.xml'/>
</pool>
- <device file="testdev.xml"/>
+ <device file='testdev.xml'/>
<cpu>
<mhz>6000</mhz>
diff --git a/examples/xml/test/testnodeinline.xml b/examples/xml/test/testnodeinline.xml
index b353f39..2de8773 100644
--- a/examples/xml/test/testnodeinline.xml
+++ b/examples/xml/test/testnodeinline.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version='1.0'?>
<node>
<!-- This file gives an example config for the mock 'test' backend
driver to libvirt. This is intended to allow relible unit testing
@@ -8,13 +8,13 @@
virsh -connect test:////path/to/this/dir/testnode.xml nodeinfo
-->
- <domain type="test">
+ <domain type='test'>
<name>fv0</name>
<uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
- <boot dev="hd"/>
+ <boot dev='hd'/>
</os>
<memory>524288</memory>
<maxMemory>1524288</maxMemory>
@@ -29,28 +29,28 @@
</features>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
- <interface type="bridge">
- <source bridge="xenbr0"/>
- <mac address="00:16:3e:5d:c7:9e"/>
- <script path="vif-bridge"/>
+ <interface type='bridge'>
+ <source bridge='xenbr0'/>
+ <mac address='00:16:3e:5d:c7:9e'/>
+ <script path='vif-bridge'/>
</interface>
- <disk type="file">
- <source file="/root/fv0"/>
- <target dev="hda"/>
+ <disk type='file'>
+ <source file='/root/fv0'/>
+ <target dev='hda'/>
</disk>
- <disk type="file" device="cdrom">
- <source file="/root/fc5-x86_64-boot.iso"/>
- <target dev="hdc"/>
+ <disk type='file' device='cdrom'>
+ <source file='/root/fc5-x86_64-boot.iso'/>
+ <target dev='hdc'/>
<readonly/>
</disk>
- <disk type="file" device="floppy">
- <source file="/root/fd.img"/>
- <target dev="fda"/>
+ <disk type='file' device='floppy'>
+ <source file='/root/fd.img'/>
+ <target dev='fda'/>
</disk>
- <graphics type="vnc" port="5904"/>
+ <graphics type='vnc' port='5904'/>
</devices>
</domain>
- <domain type="test">
+ <domain type='test'>
<name>fc4</name>
<uuid>EF86180145B911CB88E3AFBFE5370493</uuid>
<os>
@@ -64,36 +64,36 @@
<currentMemory>131072</currentMemory>
<vcpu>1</vcpu>
<devices>
- <disk type="file">
- <source file="/u/fc4.img"/>
- <target dev="sda1"/>
+ <disk type='file'>
+ <source file='/u/fc4.img'/>
+ <target dev='sda1'/>
</disk>
- <interface type="bridge">
- <source bridge="xenbr0"/>
- <mac address="aa:00:00:00:00:11"/>
- <script path="/etc/xen/scripts/vif-bridge"/>
+ <interface type='bridge'>
+ <source bridge='xenbr0'/>
+ <mac address='aa:00:00:00:00:11'/>
+ <script path='/etc/xen/scripts/vif-bridge'/>
</interface>
- <console tty="/dev/pts/5"/>
+ <console tty='/dev/pts/5'/>
</devices>
</domain>
<network>
<name>private</name>
<uuid>004b22212d78c30f5aa5f03c87d21e69</uuid>
- <bridge name="brpriv"/>
- <ip address="192.168.124.1" netmask="255.255.255.0">
+ <bridge name='brpriv'/>
+ <ip address='192.168.124.1' netmask='255.255.255.0'>
<dhcp>
- <range start="192.168.124.128" end="192.168.124.253"/>
+ <range start='192.168.124.128' end='192.168.124.253'/>
</dhcp>
</ip>
</network>
<network>
<name>default</name>
<uuid>004b96e12d78c30f5aa5f03c87d21e69</uuid>
- <bridge name="brdefault"/>
- <forward dev="eth0"/>
- <ip address="192.168.122.1" netmask="255.255.255.0">
+ <bridge name='brdefault'/>
+ <forward dev='eth0'/>
+ <ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
- <range start="192.168.122.128" end="192.168.122.253"/>
+ <range start='192.168.122.128' end='192.168.122.253'/>
</dhcp>
</ip>
</network>
diff --git a/python/libvirt-override-api.xml b/python/libvirt-override-api.xml
index 7c18763..1c78de4 100644
--- a/python/libvirt-override-api.xml
+++ b/python/libvirt-override-api.xml
@@ -1,20 +1,20 @@
-<?xml version="1.0"?>
+<?xml version='1.0'?>
<api name='libvir-python'>
<symbols>
- <function name="virConnectGetVersion" file='python'>
+ <function name='virConnectGetVersion' file='python'>
<info>Returns the running hypervisor version of the connection host</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
- <return type='int' info="0 on success, -1 on error"/>
+ <return type='int' info='0 on success, -1 on error'/>
</function>
- <function name="virConnectGetLibVersion" file='python'>
+ <function name='virConnectGetLibVersion' file='python'>
<info>Returns the libvirt version of the connection host</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
- <return type='int' info="0 on success, -1 on error"/>
+ <return type='int' info='0 on success, -1 on error'/>
</function>
- <function name="virConnectListDomainsID" file='python'>
+ <function name='virConnectListDomainsID' file='python'>
<info>Returns the list of the ID of the domains on the hypervisor</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
- <return type='int *' info="the list of ID or None in case of error"/>
+ <return type='int *' info='the list of ID or None in case of error'/>
</function>
<function name='virConnectListDefinedDomains' file='python'>
<info>list the defined domains, stores the pointers to the names in @names</info>
@@ -160,12 +160,12 @@
<return type='virDomainMemoryStats' info='a dictionary of statistics'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
</function>
- <function name="virNodeGetCellsFreeMemory" file='python'>
+ <function name='virNodeGetCellsFreeMemory' file='python'>
<info>Returns the available memory for a list of cells</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='startCell' type='int' info='first cell in the list'/>
<arg name='maxCells' type='int' info='number of cell in the list'/>
- <return type='int *' info="the list available memory in the cells"/>
+ <return type='int *' info='the list available memory in the cells'/>
</function>
<function name='virDomainGetSchedulerParameters' file='python'>
<info>Get the scheduler parameters, the @params array will be filled with the values.</info>
@@ -374,7 +374,7 @@
<arg name='dom' type='virDomainPtr' info='dummy domain pointer'/>
<arg name='snap' type='virDomainSnapshotPtr' info='pointer to the snapshot'/>
<arg name='flags' type='unsigned int' info='flags'/>
- <return type='int' info="0 on success, -1 on error"/>
+ <return type='int' info='0 on success, -1 on error'/>
</function>
<function name='virDomainGetBlockJobInfo' file='python'>
<info>Get progress information for a block job</info>
diff --git a/python/libvirt-qemu-override-api.xml b/python/libvirt-qemu-override-api.xml
index d69acea..d4bce23 100644
--- a/python/libvirt-qemu-override-api.xml
+++ b/python/libvirt-qemu-override-api.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version='1.0'?>
<api name='libvir-qemu-python'>
<symbols>
<function name='virDomainQemuMonitorCommand' file='python-qemu'>
diff --git a/src/network/default.xml b/src/network/default.xml
index 9cfc01e..2c44f13 100644
--- a/src/network/default.xml
+++ b/src/network/default.xml
@@ -1,10 +1,10 @@
<network>
<name>default</name>
- <bridge name="virbr0" />
+ <bridge name='virbr0' />
<forward/>
- <ip address="192.168.122.1" netmask="255.255.255.0">
+ <ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
- <range start="192.168.122.2" end="192.168.122.254" />
+ <range start='192.168.122.2' end='192.168.122.254' />
</dhcp>
</ip>
</network>
diff --git a/tests/networkxml2argvdata/nat-network-dns-hosts.xml b/tests/networkxml2argvdata/nat-network-dns-hosts.xml
index 2180a5d..cbde112 100644
--- a/tests/networkxml2argvdata/nat-network-dns-hosts.xml
+++ b/tests/networkxml2argvdata/nat-network-dns-hosts.xml
@@ -3,7 +3,7 @@
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
<forward dev='eth0' mode='nat'/>
<bridge name='virbr0' stp='on' delay='0' />
- <domain name="example.com"/>
+ <domain name='example.com'/>
<dns>
<host ip='192.168.122.1'>
<hostname>host</hostname>
diff --git a/tests/networkxml2xmlin/8021Qbh-net.xml b/tests/networkxml2xmlin/8021Qbh-net.xml
index 2d779dc..33930d5 100644
--- a/tests/networkxml2xmlin/8021Qbh-net.xml
+++ b/tests/networkxml2xmlin/8021Qbh-net.xml
@@ -1,14 +1,14 @@
<network>
<name>8021Qbh-net</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a8c</uuid>
- <forward mode="private" dev="eth1">
- <interface dev="eth1"/>
- <interface dev="eth2"/>
- <interface dev="eth3"/>
- <interface dev="eth4"/>
- <interface dev="eth5"/>
+ <forward mode='private' dev='eth1'>
+ <interface dev='eth1'/>
+ <interface dev='eth2'/>
+ <interface dev='eth3'/>
+ <interface dev='eth4'/>
+ <interface dev='eth5'/>
</forward>
- <virtualport type="802.1Qbh">
- <parameters profileid="spongebob24"/>
+ <virtualport type='802.1Qbh'>
+ <parameters profileid='spongebob24'/>
</virtualport>
</network>
diff --git a/tests/networkxml2xmlin/direct-net.xml b/tests/networkxml2xmlin/direct-net.xml
index d73c454..86e1206 100644
--- a/tests/networkxml2xmlin/direct-net.xml
+++ b/tests/networkxml2xmlin/direct-net.xml
@@ -1,7 +1,7 @@
<network>
<name>direct-net</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a8f</uuid>
- <forward mode="bridge">
- <interface dev="eth10"/>
+ <forward mode='bridge'>
+ <interface dev='eth10'/>
</forward>
</network>
diff --git a/tests/networkxml2xmlin/host-bridge-net.xml b/tests/networkxml2xmlin/host-bridge-net.xml
index 960bc2d..c76d64a 100644
--- a/tests/networkxml2xmlin/host-bridge-net.xml
+++ b/tests/networkxml2xmlin/host-bridge-net.xml
@@ -1,6 +1,6 @@
<network>
<name>host-bridge-net</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a8e</uuid>
- <forward mode="bridge"/>
- <bridge name="br0"/>
+ <forward mode='bridge'/>
+ <bridge name='br0'/>
</network>
diff --git a/tests/networkxml2xmlin/isolated-network.xml b/tests/networkxml2xmlin/isolated-network.xml
index 0d562ea..ec9e4e2 100644
--- a/tests/networkxml2xmlin/isolated-network.xml
+++ b/tests/networkxml2xmlin/isolated-network.xml
@@ -1,11 +1,11 @@
<network>
<name>private</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <bridge name="virbr2" />
+ <bridge name='virbr2' />
<mac address='52:54:00:17:3F:37'/>
- <ip address="192.168.152.1" netmask="255.255.255.0">
+ <ip address='192.168.152.1' netmask='255.255.255.0'>
<dhcp>
- <range start="192.168.152.2" end="192.168.152.254" />
+ <range start='192.168.152.2' end='192.168.152.254' />
</dhcp>
</ip>
</network>
diff --git a/tests/networkxml2xmlin/nat-network.xml b/tests/networkxml2xmlin/nat-network.xml
index 23f7fcb..1f1c605 100644
--- a/tests/networkxml2xmlin/nat-network.xml
+++ b/tests/networkxml2xmlin/nat-network.xml
@@ -1,21 +1,21 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <bridge name="virbr0" />
- <forward mode="nat" dev="eth1"/>
- <ip address="192.168.122.1" netmask="255.255.255.0">
+ <bridge name='virbr0' />
+ <forward mode='nat' dev='eth1'/>
+ <ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
- <range start="192.168.122.2" end="192.168.122.254" />
- <host mac="00:16:3e:77:e2:ed" name="a.example.com" ip="192.168.122.10" />
- <host mac="00:16:3e:3e:a9:1a" name="b.example.com" ip="192.168.122.11" />
+ <range start='192.168.122.2' end='192.168.122.254' />
+ <host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10' />
+ <host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11' />
</dhcp>
</ip>
- <ip family="ipv4" address="192.168.123.1" netmask="255.255.255.0">
+ <ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
</ip>
- <ip family="ipv6" address="2001:db8:ac10:fe01::1" prefix="64">
+ <ip family='ipv6' address='2001:db8:ac10:fe01::1' prefix='64'>
</ip>
- <ip family="ipv6" address="2001:db8:ac10:fd01::1" prefix="64">
+ <ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
</ip>
- <ip family="ipv4" address="10.24.10.1">
+ <ip family='ipv4' address='10.24.10.1'>
</ip>
</network>
diff --git a/tests/networkxml2xmlin/netboot-network.xml b/tests/networkxml2xmlin/netboot-network.xml
index ed75663..d6b842c 100644
--- a/tests/networkxml2xmlin/netboot-network.xml
+++ b/tests/networkxml2xmlin/netboot-network.xml
@@ -1,14 +1,14 @@
<network>
<name>netboot</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <bridge name="virbr1" stp='off' delay='1'/>
- <domain name="example.com"/>
+ <bridge name='virbr1' stp='off' delay='1'/>
+ <domain name='example.com'/>
<forward/>
- <ip address="192.168.122.1" netmask="255.255.255.0">
- <tftp root="/var/lib/tftproot" />
+ <ip address='192.168.122.1' netmask='255.255.255.0'>
+ <tftp root='/var/lib/tftproot' />
<dhcp>
- <range start="192.168.122.2" end="192.168.122.254" />
- <bootp file="pxeboot.img" />
+ <range start='192.168.122.2' end='192.168.122.254' />
+ <bootp file='pxeboot.img' />
</dhcp>
</ip>
</network>
diff --git a/tests/networkxml2xmlin/netboot-proxy-network.xml b/tests/networkxml2xmlin/netboot-proxy-network.xml
index ecb6738..f07a4b2 100644
--- a/tests/networkxml2xmlin/netboot-proxy-network.xml
+++ b/tests/networkxml2xmlin/netboot-proxy-network.xml
@@ -1,13 +1,13 @@
<network>
<name>netboot</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <bridge name="virbr1" stp='off' delay='1'/>
- <domain name="example.com"/>
+ <bridge name='virbr1' stp='off' delay='1'/>
+ <domain name='example.com'/>
<forward/>
- <ip address="192.168.122.1" netmask="255.255.255.0">
+ <ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
- <range start="192.168.122.2" end="192.168.122.254" />
- <bootp file="pxeboot.img" server="10.20.30.40" />
+ <range start='192.168.122.2' end='192.168.122.254' />
+ <bootp file='pxeboot.img' server='10.20.30.40' />
</dhcp>
</ip>
</network>
diff --git a/tests/networkxml2xmlin/routed-network.xml b/tests/networkxml2xmlin/routed-network.xml
index 61d73c0..5e47038 100644
--- a/tests/networkxml2xmlin/routed-network.xml
+++ b/tests/networkxml2xmlin/routed-network.xml
@@ -1,9 +1,9 @@
<network>
<name>local</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
- <bridge name="virbr1" />
+ <bridge name='virbr1' />
<mac address='12:34:56:78:9A:BC'/>
- <forward mode="route" dev="eth1"/>
- <ip address="192.168.122.1" netmask="255.255.255.0">
+ <forward mode='route' dev='eth1'/>
+ <ip address='192.168.122.1' netmask='255.255.255.0'>
</ip>
</network>
diff --git a/tests/networkxml2xmlin/vepa-net.xml b/tests/networkxml2xmlin/vepa-net.xml
index b1a40c6..5672ed3 100644
--- a/tests/networkxml2xmlin/vepa-net.xml
+++ b/tests/networkxml2xmlin/vepa-net.xml
@@ -1,22 +1,22 @@
<network>
<name>vepa-net</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a8b</uuid>
- <forward mode="vepa">
- <interface dev="eth1"/>
- <interface dev="eth2"/>
- <interface dev="eth3"/>
+ <forward mode='vepa'>
+ <interface dev='eth1'/>
+ <interface dev='eth2'/>
+ <interface dev='eth3'/>
</forward>
- <virtualport type="802.1Qbg">
- <parameters managerid="11" typeid="1193047" typeidversion="2" instanceid="b153fa89-1b87-9719-ec12-99e0054fb844"/>
+ <virtualport type='802.1Qbg'>
+ <parameters managerid='11' typeid='1193047' typeidversion='2' instanceid='b153fa89-1b87-9719-ec12-99e0054fb844'/>
</virtualport>
- <portgroup name="bob" default="yes">
- <virtualport type="802.1Qbg">
- <parameters managerid="12" typeid="2193047" typeidversion="3" instanceid="5d00e0ba-e15c-959c-fbb6-b595b0655735"/>
+ <portgroup name='bob' default='yes'>
+ <virtualport type='802.1Qbg'>
+ <parameters managerid='12' typeid='2193047' typeidversion='3' instanceid='5d00e0ba-e15c-959c-fbb6-b595b0655735'/>
</virtualport>
</portgroup>
- <portgroup name="alice">
- <virtualport type="802.1Qbg">
- <parameters managerid="13" typeid="3193047" typeidversion="4" instanceid="70bf45f9-01a8-f5ee-3c0f-e25a0a2e44a6"/>
+ <portgroup name='alice'>
+ <virtualport type='802.1Qbg'>
+ <parameters managerid='13' typeid='3193047' typeidversion='4' instanceid='70bf45f9-01a8-f5ee-3c0f-e25a0a2e44a6'/>
</virtualport>
</portgroup>
</network>
diff --git a/tests/nwfilterxml2xmlin/stp-test.xml b/tests/nwfilterxml2xmlin/stp-test.xml
index de9d3e2..3056df8 100644
--- a/tests/nwfilterxml2xmlin/stp-test.xml
+++ b/tests/nwfilterxml2xmlin/stp-test.xml
@@ -8,14 +8,14 @@
<rule action='return' direction='out'>
<stp srcmacaddr='1:2:3:4:5:6' srcmacmask='ff:ff:ff:ff:ff:ff'
root-priority='0x1234' root-priority-hi='0x2345'
- root-address="6:5:4:3:2:1" root-address-mask='ff:ff:ff:ff:ff:ff'
+ root-address='6:5:4:3:2:1' root-address-mask='ff:ff:ff:ff:ff:ff'
root-cost='0x11223344' root-cost-hi='0x22334455' />
</rule>
<rule action='reject' direction='in'>
<stp srcmacaddr='1:2:3:4:5:6' srcmacmask='ff:ff:ff:ff:ff:ff'
sender-priority='0x1234'
- sender-address="6:5:4:3:2:1"
+ sender-address='6:5:4:3:2:1'
port='123' port-hi='234'
age='5544' age-hi='5555'
max-age='7777' max-age-hi='8888'
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa1.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa1.xml
index 9fcdda8..de03711 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa1.xml
@@ -9,10 +9,10 @@
<boot dev='network'/>
</os>
<cpu>
- <topology sockets="2" cores="4" threads="2"/>
+ <topology sockets='2' cores='4' threads='2'/>
<numa>
- <cell cpus="0-7" memory="109550"/>
- <cell cpus="8-15" memory="109550"/>
+ <cell cpus='0-7' memory='109550'/>
+ <cell cpus='8-15' memory='109550'/>
</numa>
</cpu>
<clock offset='utc'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa2.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa2.xml
index 9fcdda8..de03711 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-numa2.xml
@@ -9,10 +9,10 @@
<boot dev='network'/>
</os>
<cpu>
- <topology sockets="2" cores="4" threads="2"/>
+ <topology sockets='2' cores='4' threads='2'/>
<numa>
- <cell cpus="0-7" memory="109550"/>
- <cell cpus="8-15" memory="109550"/>
+ <cell cpus='0-7' memory='109550'/>
+ <cell cpus='8-15' memory='109550'/>
</numa>
</cpu>
<clock offset='utc'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology1.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology1.xml
index 6b37207..7530950 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology1.xml
@@ -9,7 +9,7 @@
<boot dev='network'/>
</os>
<cpu>
- <topology sockets="3" cores="2" threads="1"/>
+ <topology sockets='3' cores='2' threads='1'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology2.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology2.xml
index 9f09e81..904d4fe 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology2.xml
@@ -10,7 +10,7 @@
</os>
<cpu match='exact'>
<model>core2duo</model>
- <topology sockets="1" cores="2" threads="3"/>
+ <topology sockets='1' cores='2' threads='3'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology3.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology3.xml
index 6b37207..7530950 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology3.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology3.xml
@@ -9,7 +9,7 @@
<boot dev='network'/>
</os>
<cpu>
- <topology sockets="3" cores="2" threads="1"/>
+ <topology sockets='3' cores='2' threads='1'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-numatune-memory.xml b/tests/qemuxml2argvdata/qemuxml2argv-numatune-memory.xml
index 66ec6d0..dff63e4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-numatune-memory.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-numatune-memory.xml
@@ -5,7 +5,7 @@
<currentMemory>219136</currentMemory>
<vcpu>2</vcpu>
<numatune>
- <memory mode="strict" nodeset="0-5,^4"/>
+ <memory mode='strict' nodeset='0-5,^4'/>
</numatune>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/storagepoolxml2xmlin/pool-iscsi-auth.xml b/tests/storagepoolxml2xmlin/pool-iscsi-auth.xml
index f7d4d52..f0755bf 100644
--- a/tests/storagepoolxml2xmlin/pool-iscsi-auth.xml
+++ b/tests/storagepoolxml2xmlin/pool-iscsi-auth.xml
@@ -2,8 +2,8 @@
<name>virtimages</name>
<uuid>e9392370-2917-565e-692b-d057f46512d6</uuid>
<source>
- <host name="iscsi.example.com"/>
- <device path="demo-target"/>
+ <host name='iscsi.example.com'/>
+ <device path='demo-target'/>
<auth type='chap' login='foobar' passwd='frobbar'/>
</source>
<target>
diff --git a/tests/storagepoolxml2xmlin/pool-iscsi-vendor-product.xml b/tests/storagepoolxml2xmlin/pool-iscsi-vendor-product.xml
index 01fbd9b..3889464 100644
--- a/tests/storagepoolxml2xmlin/pool-iscsi-vendor-product.xml
+++ b/tests/storagepoolxml2xmlin/pool-iscsi-vendor-product.xml
@@ -2,8 +2,8 @@
<name>virtimages</name>
<uuid>e9392370-2917-565e-692b-d057f46512d6</uuid>
<source>
- <host name="iscsi.example.com"/>
- <device path="demo-target"/>
+ <host name='iscsi.example.com'/>
+ <device path='demo-target'/>
<auth type='chap' login='foobar' passwd='frobbar'/>
<vendor name='test-vendor'/>
<product name='test-product'/>
diff --git a/tests/storagepoolxml2xmlin/pool-iscsi.xml b/tests/storagepoolxml2xmlin/pool-iscsi.xml
index 37a16f7..c22b02e 100644
--- a/tests/storagepoolxml2xmlin/pool-iscsi.xml
+++ b/tests/storagepoolxml2xmlin/pool-iscsi.xml
@@ -2,8 +2,8 @@
<name>virtimages</name>
<uuid>e9392370-2917-565e-692b-d057f46512d6</uuid>
<source>
- <host name="iscsi.example.com"/>
- <device path="demo-target"/>
+ <host name='iscsi.example.com'/>
+ <device path='demo-target'/>
</source>
<target>
<path>/dev/disk/by-path</path>
diff --git a/tests/storagepoolxml2xmlin/pool-logical-create.xml b/tests/storagepoolxml2xmlin/pool-logical-create.xml
index 4c67089..9b3a6f3 100644
--- a/tests/storagepoolxml2xmlin/pool-logical-create.xml
+++ b/tests/storagepoolxml2xmlin/pool-logical-create.xml
@@ -5,9 +5,9 @@
<allocation>99220455424</allocation>
<available>671088640</available>
<source>
- <device path="/dev/sdb1"/>
- <device path="/dev/sdb2"/>
- <device path="/dev/sdb3"/>
+ <device path='/dev/sdb1'/>
+ <device path='/dev/sdb2'/>
+ <device path='/dev/sdb3'/>
</source>
<target>
<path>/dev/HostVG</path>
diff --git a/tests/storagepoolxml2xmlin/pool-mpath.xml b/tests/storagepoolxml2xmlin/pool-mpath.xml
index a5fbbcb..7144cc3 100644
--- a/tests/storagepoolxml2xmlin/pool-mpath.xml
+++ b/tests/storagepoolxml2xmlin/pool-mpath.xml
@@ -1,4 +1,4 @@
-<pool type="mpath">
+<pool type='mpath'>
<name>mpath</name>
<uuid>e9392370-2917-565e-692b-d057f46512d6</uuid>
<target>
diff --git a/tests/storagepoolxml2xmlin/pool-scsi.xml b/tests/storagepoolxml2xmlin/pool-scsi.xml
index 3650e43..85720d0 100644
--- a/tests/storagepoolxml2xmlin/pool-scsi.xml
+++ b/tests/storagepoolxml2xmlin/pool-scsi.xml
@@ -1,8 +1,8 @@
-<pool type="scsi">
+<pool type='scsi'>
<name>hba0</name>
<uuid>e9392370-2917-565e-692b-d057f46512d6</uuid>
<source>
- <adapter name="host0"/>
+ <adapter name='host0'/>
</source>
<target>
<path>/dev/disk/by-path</path>
diff --git a/tests/storagevolxml2xmlin/vol-file.xml b/tests/storagevolxml2xmlin/vol-file.xml
index d7de0aa..f9a3635 100644
--- a/tests/storagevolxml2xmlin/vol-file.xml
+++ b/tests/storagevolxml2xmlin/vol-file.xml
@@ -1,7 +1,7 @@
<volume>
<name>sparse.img</name>
<source/>
- <capacity unit="T">1</capacity>
+ <capacity unit='T'>1</capacity>
<allocation>0</allocation>
<target>
<path>/var/lib/libvirt/images/sparse.img</path>
diff --git a/tests/storagevolxml2xmlin/vol-qcow2.xml b/tests/storagevolxml2xmlin/vol-qcow2.xml
index b4924de..22ce6a0 100644
--- a/tests/storagevolxml2xmlin/vol-qcow2.xml
+++ b/tests/storagevolxml2xmlin/vol-qcow2.xml
@@ -3,7 +3,7 @@
<key>/var/lib/libvirt/images/OtherDemo.img</key>
<source>
</source>
- <capacity unit="G">5</capacity>
+ <capacity unit='G'>5</capacity>
<allocation>294912</allocation>
<target>
<path>/var/lib/libvirt/images/OtherDemo.img</path>
diff --git a/tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.xml b/tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.xml
index 83daf82..73cfda7 100644
--- a/tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.xml
+++ b/tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.xml
@@ -17,12 +17,12 @@
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
- <interface type="bridge">
- <mac address="00:11:22:33:44:55"/>
- <source bridge="xenbr2"/>
- <ip address="192.0.2.1"/>
- <script path="vif-bridge"/>
- <target dev="vif4.0"/>
+ <interface type='bridge'>
+ <mac address='00:11:22:33:44:55'/>
+ <source bridge='xenbr2'/>
+ <ip address='192.0.2.1'/>
+ <script path='vif-bridge'/>
+ <target dev='vif4.0'/>
</interface>
<console tty='/dev/pts/4'/>
</devices>
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blkback.xml b/tests/xml2sexprdata/xml2sexpr-disk-drv-blkback.xml
index 97d88e0..1cdc850 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blkback.xml
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blkback.xml
@@ -14,7 +14,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='block' device='disk'>
- <driver name="phy"/>
+ <driver name='phy'/>
<source dev='/dev/MainVG/GuestLV'/>
<target dev='xvda'/>
</disk>
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.xml b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.xml
index 008658c..91e22c7 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.xml
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-qcow.xml
@@ -14,7 +14,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
- <driver name="tap" type="qcow"/>
+ <driver name='tap' type='qcow'/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.xml b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.xml
index 630b3f9..218a8e4 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.xml
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap-raw.xml
@@ -14,7 +14,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
- <driver name="tap" type="aio"/>
+ <driver name='tap' type='aio'/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap.xml b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap.xml
index 324b6d0..4b9a88b 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap.xml
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap.xml
@@ -14,7 +14,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
- <driver name="tap"/>
+ <driver name='tap'/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.xml b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.xml
index 0cc37cc..6a18368 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.xml
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2-raw.xml
@@ -14,7 +14,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
- <driver name="tap2" type="aio"/>
+ <driver name='tap2' type='aio'/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.xml b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.xml
index 67cce17..44d0ee7 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.xml
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-blktap2.xml
@@ -14,7 +14,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
- <driver name="tap2"/>
+ <driver name='tap2'/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
diff --git a/tests/xml2sexprdata/xml2sexpr-disk-drv-loop.xml b/tests/xml2sexprdata/xml2sexpr-disk-drv-loop.xml
index 978ca7c..cd5d7cc 100644
--- a/tests/xml2sexprdata/xml2sexpr-disk-drv-loop.xml
+++ b/tests/xml2sexprdata/xml2sexpr-disk-drv-loop.xml
@@ -14,7 +14,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
- <driver name="file"/>
+ <driver name='file'/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
diff --git a/tests/xml2sexprdata/xml2sexpr-escape.xml b/tests/xml2sexprdata/xml2sexpr-escape.xml
index 6eed578..bca2c81 100644
--- a/tests/xml2sexprdata/xml2sexpr-escape.xml
+++ b/tests/xml2sexprdata/xml2sexpr-escape.xml
@@ -5,7 +5,7 @@
<type>hvm</type>
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
- <cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test..."devel" </cmdline>
+ <cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test..." </cmdline>
<loader>/usr/lib/xen/boot/hvmloader</loader>
</os>
<memory>430080</memory>
diff --git a/tests/xml2sexprdata/xml2sexpr-net-bridged.xml b/tests/xml2sexprdata/xml2sexpr-net-bridged.xml
index 5f68a6d..80a91ac 100644
--- a/tests/xml2sexprdata/xml2sexpr-net-bridged.xml
+++ b/tests/xml2sexprdata/xml2sexpr-net-bridged.xml
@@ -17,11 +17,11 @@
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
- <interface type="bridge">
- <mac address="00:11:22:33:44:55"/>
- <source bridge="xenbr2"/>
- <script path="vif-bridge"/>
- <target dev="vif4.0"/>
+ <interface type='bridge'>
+ <mac address='00:11:22:33:44:55'/>
+ <source bridge='xenbr2'/>
+ <script path='vif-bridge'/>
+ <target dev='vif4.0'/>
</interface>
<console tty='/dev/pts/4'/>
</devices>
diff --git a/tests/xml2sexprdata/xml2sexpr-net-e1000.xml b/tests/xml2sexprdata/xml2sexpr-net-e1000.xml
index 6e9ce94..3916d54 100644
--- a/tests/xml2sexprdata/xml2sexpr-net-e1000.xml
+++ b/tests/xml2sexprdata/xml2sexpr-net-e1000.xml
@@ -17,12 +17,12 @@
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
- <interface type="bridge">
- <mac address="00:11:22:33:44:55"/>
- <source bridge="xenbr2"/>
- <script path="vif-bridge"/>
+ <interface type='bridge'>
+ <mac address='00:11:22:33:44:55'/>
+ <source bridge='xenbr2'/>
+ <script path='vif-bridge'/>
<model type='e1000'/>
- <target dev="vif4.0"/>
+ <target dev='vif4.0'/>
</interface>
<console tty='/dev/pts/4'/>
</devices>
diff --git a/tests/xml2sexprdata/xml2sexpr-net-routed.xml b/tests/xml2sexprdata/xml2sexpr-net-routed.xml
index 778c911..1fa24e6 100644
--- a/tests/xml2sexprdata/xml2sexpr-net-routed.xml
+++ b/tests/xml2sexprdata/xml2sexpr-net-routed.xml
@@ -17,12 +17,12 @@
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
- <interface type="ethernet">
- <mac address="00:11:22:33:44:55"/>
- <ip address="172.14.5.6"/>
- <source dev="eth3"/>
- <script path="vif-routed"/>
- <target dev="vif4.0"/>
+ <interface type='ethernet'>
+ <mac address='00:11:22:33:44:55'/>
+ <ip address='172.14.5.6'/>
+ <source dev='eth3'/>
+ <script path='vif-routed'/>
+ <target dev='vif4.0'/>
</interface>
<console tty='/dev/pts/4'/>
</devices>
diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vfb-new-auto.xml b/tests/xml2sexprdata/xml2sexpr-pv-vfb-new-auto.xml
index c17d9d5..ec12fb3 100644
--- a/tests/xml2sexprdata/xml2sexpr-pv-vfb-new-auto.xml
+++ b/tests/xml2sexprdata/xml2sexpr-pv-vfb-new-auto.xml
@@ -18,6 +18,6 @@
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
- <graphics type='vnc' port='-1' autoport='yes' listen="127.0.0.1" passwd="123456" keymap="ja"/>
+ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123456' keymap='ja'/>
</devices>
</domain>
diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vfb-new.xml b/tests/xml2sexprdata/xml2sexpr-pv-vfb-new.xml
index a8430eb..5b0d19a 100644
--- a/tests/xml2sexprdata/xml2sexpr-pv-vfb-new.xml
+++ b/tests/xml2sexprdata/xml2sexpr-pv-vfb-new.xml
@@ -18,6 +18,6 @@
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
- <graphics type='vnc' port='5906' listen="127.0.0.1" passwd="123456" keymap="ja"/>
+ <graphics type='vnc' port='5906' listen='127.0.0.1' passwd='123456' keymap='ja'/>
</devices>
</domain>
diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml b/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml
index a8430eb..5b0d19a 100644
--- a/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml
+++ b/tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml
@@ -18,6 +18,6 @@
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
- <graphics type='vnc' port='5906' listen="127.0.0.1" passwd="123456" keymap="ja"/>
+ <graphics type='vnc' port='5906' listen='127.0.0.1' passwd='123456' keymap='ja'/>
</devices>
</domain>
diff --git a/tests/xml2vmxdata/xml2vmx-serial-network-client.xml b/tests/xml2vmxdata/xml2vmx-serial-network-client.xml
index e2a5afe..a40b135 100644
--- a/tests/xml2vmxdata/xml2vmx-serial-network-client.xml
+++ b/tests/xml2vmxdata/xml2vmx-serial-network-client.xml
@@ -7,8 +7,8 @@
</os>
<devices>
<serial type='tcp'>
- <source mode="connect" host="192.168.0.17" service="42001"/>
- <protocol type="raw"/>
+ <source mode='connect' host='192.168.0.17' service='42001'/>
+ <protocol type='raw'/>
<target port='0'/>
</serial>
</devices>
diff --git a/tests/xml2vmxdata/xml2vmx-serial-network-server.xml b/tests/xml2vmxdata/xml2vmx-serial-network-server.xml
index a17e2fe..2d33073 100644
--- a/tests/xml2vmxdata/xml2vmx-serial-network-server.xml
+++ b/tests/xml2vmxdata/xml2vmx-serial-network-server.xml
@@ -7,8 +7,8 @@
</os>
<devices>
<serial type='tcp'>
- <source mode="bind" host="0.0.0.0" service="42001"/>
- <protocol type="tls"/>
+ <source mode='bind' host='0.0.0.0' service='42001'/>
+ <protocol type='tls'/>
<target port='0'/>
</serial>
</devices>
--
1.7.7.3
13 years