[libvirt] [PATCH 0/3] Support https, ftps and tftp for cdrom URL
by Aline Manera
From: Aline Manera <alinefm(a)br.ibm.com>
qemu/KVM also supports https, ftps and tftp URL for cdrom definition.
With this patchset we will support all the protocols supported by qemu/KVM.
Aline Manera (3):
Add https protocol support for cdrom disk
Add ftps protocol support for cdrom disk
Add tftp protocol support for cdrom disk
docs/formatdomain.html.in | 24 +++++++++++++
docs/schemas/domaincommon.rng | 3 ++
src/conf/domain_conf.c | 5 ++-
src/conf/domain_conf.h | 3 ++
src/qemu/qemu_command.c | 18 ++++++++++
.../qemuxml2argv-disk-cdrom-network-ftps.args | 8 +++++
.../qemuxml2argv-disk-cdrom-network-ftps.xml | 37 ++++++++++++++++++++
.../qemuxml2argv-disk-cdrom-network-https.args | 8 +++++
.../qemuxml2argv-disk-cdrom-network-https.xml | 37 ++++++++++++++++++++
.../qemuxml2argv-disk-cdrom-network-tftp.args | 7 ++++
.../qemuxml2argv-disk-cdrom-network-tftp.xml | 37 ++++++++++++++++++++
tests/qemuxml2argvtest.c | 6 ++++
12 files changed, 192 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-ftps.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-ftps.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-https.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-https.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-tftp.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-network-tftp.xml
--
1.7.10.4
11 years, 7 months
[libvirt] [PATCH 00/14] Add ability to handle the <metadata> element using the API
by Peter Krempa
This series adds the initialy omitted functionality of changing the <metadata>
element using the virDomain[Get|Set]Metadata API.
First few patches are cleanup of some code noticed during implementation of the
other stuff.
Peter Krempa (14):
virsh-domain: Remove spurious ATTRIBUTE_UNUSED from cmdDesc
virsh-domain: Line up signal names array
qemu: Factor out body of qemuDomainGetMetadata for universal use
qemu: Factor out body of qemuDomainSetMetadata for universal use
conf: Factor out setting of metadata to simplify code
util: Add helper to convert libxml2 nodes to a string
virsh-domain: use virXMLNodeDump instead of xmlNodeDump
virsh-domain: Add command to allow modifications of XML metadata
conf: Add support for requesting of XML metadata via the API
conf: allow to add XML metadata using the virDomainSetMetadata api
lib: Don't force the key argument when deleting metadata
lxc: Add metadata modification APIs
test: Add <metadata> support into the test driver
tests: Add metadata tests
src/conf/domain_conf.c | 171 ++++++++++++++++++++++++++
src/conf/domain_conf.h | 17 +++
src/libvirt.c | 3 +-
src/libvirt_private.syms | 4 +
src/lxc/lxc_driver.c | 70 +++++++++++
src/qemu/qemu_driver.c | 122 ++-----------------
src/test/test_driver.c | 68 +++++++++++
src/util/virxml.c | 187 +++++++++++++++++++++++++++++
src/util/virxml.h | 13 ++
tests/Makefile.am | 7 ++
tests/metadatatest.c | 245 ++++++++++++++++++++++++++++++++++++++
tools/virsh-domain.c | 304 ++++++++++++++++++++++++++++++++---------------
12 files changed, 1001 insertions(+), 210 deletions(-)
create mode 100644 tests/metadatatest.c
--
1.8.3.2
11 years, 7 months
[libvirt] make check error
by hzguanqiang@corp.netease.com
Hi guys,
I made a automated test for the libvirt code in git source repository right now, It reported a check error.
The operation steps and error info are as following:
ubuntu@ubuntu:~/github/libvirt.git$ ./autogen.sh
ubuntu@ubuntu:~/github/libvirt.git$ ./configure --enable-werror
ubuntu@ubuntu:~/github/libvirt.git$ make check
............
make check-local
make[3]: Entering directory `/home/ubuntu/github/libvirt.git/daemon'
GEN check-augeas
make[3]: Leaving directory `/home/ubuntu/github/libvirt.git/daemon'
make[2]: Leaving directory `/home/ubuntu/github/libvirt.git/daemon'
make[1]: Leaving directory `/home/ubuntu/github/libvirt.git/daemon'
Making check in tools
make[1]: Entering directory `/home/ubuntu/github/libvirt.git/tools'
GEN libvirt-guests.sh
make check-am
make[2]: Entering directory `/home/ubuntu/github/libvirt.git/tools'
CC virsh-virsh.o
CC virsh-virsh-console.o
CC virsh-virsh-domain.o
virsh-domain.c: In function 'cmdMetadata':
virsh-domain.c:6857:10: error: declaration of 'remove' shadows a global declaration [-Werror=shadow]
cc1: all warnings being treated as errors
make[2]: *** [virsh-virsh-domain.o] Error 1
make[2]: Leaving directory `/home/ubuntu/github/libvirt.git/tools'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/home/ubuntu/github/libvirt.git/tools'
make: *** [check-recursive] Error 1
What's the problem? Thanks.
BTW, The code version is:
ubuntu@ubuntu:~/github/libvirt.git$ git branch -a -v
* master 7655ed0 conf: Don't corrupt metadata on OOM
remotes/origin/HEAD -> origin/master
remotes/origin/master 7655ed0 conf: Don't corrupt metadata on OOM
------------------
Best regards!
GuanQiang
2013-09-17
11 years, 7 months
[libvirt] [PATCH 0/2] Build fixes after metadata series
by Peter Krempa
Some people reported a few issues on different systems/compilers.
Series pushed under the build-breaker rule.
Peter Krempa (2):
conf: Avoid false positive of uninitialized variable use
virsh: Don't shadow global variable "remove" in cmdMetadata
src/conf/domain_conf.c | 9 +++------
tools/virsh-domain.c | 6 +++---
2 files changed, 6 insertions(+), 9 deletions(-)
--
1.8.3.2
11 years, 7 months
[libvirt] [PATCH] build: fix VPATH build of remote driver
by Eric Blake
Commit 073e1575 tried to set things up so that 1) generated files
to be shipped in the tarball always live in srcdir, and 2) we have
no files in SOURCES that depend on any other files with a literal
$(srcdir) in the name, because that situation can cause confusing
results for the make expansion of $@ depending on whether the file
is found locally or via VPATH. But all my testing for that patch
was done incrementally, where all the protocol.[ch] files had
already been generated prior to the patch and were up-to-date in
the srcdir, and thus I missed one case where $@ causes grief in a
VPATH build from a fresh checkout:
We have a pattern rule for generating remote_protocol.[ch], and
what's more, the rule for protocol.c depends on protocol.h AND
on the protocol.x file. The pattern for protocol.c is only
satisfied via the VPATH lookup for protocol.x, and if protocol.h
doesn't yet exist, the VPATH rule kicks in and we end up with a
dependency on a file with $(srcdir) in the name. Based on make's
rules for $@, this resulted in make building remote_protocol.h
into srcdir (where we want it), then remote_protocol.c into
builddir (oops, not so good for the tarball), and also causes
the build to fail (the compiler can't find the .h if it lives
in a different directory than the .c):
CC remote/libvirt_driver_remote_la-remote_protocol.lo
remote/remote_protocol.c:7:29: fatal error: remote_protocol.h: No such file or directory
#include "remote_protocol.h"
^
compilation terminated.
As before, the fix is to hard-code the output file to go into
srcdir in spite of $@; but since this is in a pattern rule, we
are forced to use $@ in the recipe, so the patch is a bit
trickier than what was done in commit 073e1575.
* src/Makefile.am (%protocol.c, %protocol.h): Force output to srcdir.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the build-breaker rule.
src/Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index da6f7a1..1388c5f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1014,11 +1014,11 @@ endif WITH_REMOTE
%protocol.c: %protocol.x %protocol.h $(srcdir)/rpc/genprotocol.pl
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -c \
- $< $@
+ $< $(srcdir)/$(subst $(srcdir)/,,$@)
%protocol.h: %protocol.x $(srcdir)/rpc/genprotocol.pl
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -h \
- $< $@
+ $< $(srcdir)/$(subst $(srcdir)/,,$@)
if WITH_XEN
noinst_LTLIBRARIES += libvirt_driver_xen_impl.la
--
1.8.3.1
11 years, 7 months
[libvirt] [PATCH] conf: Don't corrupt metadata on OOM
by Peter Krempa
Eric Blake suggested that we could do a little better in case copying of
the metadata to be set fails. With this patch, the old metadata is
discarded after the new string is copied successfuly.
---
src/conf/domain_conf.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7e78068..60f25ab 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -18599,19 +18599,24 @@ virDomainDefSetMetadata(virDomainDefPtr def,
xmlDocPtr doc = NULL;
xmlNodePtr old;
xmlNodePtr new;
+ char *tmp;
int ret = -1;
switch ((virDomainMetadataType) type) {
case VIR_DOMAIN_METADATA_DESCRIPTION:
- VIR_FREE(def->description);
- if (VIR_STRDUP(def->description, metadata) < 0)
+ if (VIR_STRDUP(tmp, metadata) < 0)
goto cleanup;
+
+ VIR_FREE(def->description);
+ def->description = tmp;
break;
case VIR_DOMAIN_METADATA_TITLE:
- VIR_FREE(def->title);
- if (VIR_STRDUP(def->title, metadata) < 0)
+ if (VIR_STRDUP(tmp, metadata) < 0)
goto cleanup;
+
+ VIR_FREE(def->title);
+ def->title = tmp;
break;
case VIR_DOMAIN_METADATA_ELEMENT:
--
1.8.3.2
11 years, 7 months
[libvirt] [PATCH] qemu: Fix memleak after commit 59898a88ce8431bd3ea249b8789edc2ef9985827
by Peter Krempa
If the ABI compatibility check with the "migratable" user XML is
successful, we would leak the originaly parsed XML from the user that
would not be used in this case.
Reported by Ján Tomko.
---
src/qemu/qemu_driver.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 75348a1..0763f9b 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5274,6 +5274,8 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
/* use the user provided XML */
newdef = def2;
def2 = NULL;
+ } else {
+ virDomainDefFree(def2);
}
virDomainDefFree(def);
--
1.8.3.2
11 years, 7 months
[libvirt] [PATCH 0/2] Fix reverting of external snapshots with custom XML
by Peter Krempa
The external snapshot code mistakenly used non-"migratable" XMLs
in the save image which caused problems with restoring them
via the workaround way of doing virDomainRestore().
This series adds workaround to add compatibility with older snapshots
and fixes the problem in the snapshot code.
Unfortunately, this is not testable with unit tests. I'll try to
do a autotest virt-test test case for this particular issue.
Peter Krempa (2):
qemu: Fix checking of ABI stability when restoring external
checkpoints
qemu: Use "migratable" XML definition when doing external checkpoints
src/qemu/qemu_driver.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
--
1.8.3.2
11 years, 7 months
[libvirt] [PATCH v2 0/6]qemu: add usb-bot scsi controller support
by Guannan Ren
BZ:https://bugzilla.redhat.com/show_bug.cgi?id=917702
v2: After discussion in BZ, qemu guys hope the usb-bot(+usb-uas) can be
supported although the absence of its hot-plug feature.
In this patch, libvirt gives an unsupported error in this case.
v1: https://www.redhat.com/archives/libvir-list/2013-September/msg00020.html
And as the missing of hot-plug feature, the replacement of usb-storage is
not a urgent thing. disk attached to usb-storage supports hot-plug/unplug
already.
Guannan Ren(6)
qemu: add usb-bot qemu cap flag
qemu: add usb-bot model scsi controller support
qemu: add usb-bot support from disks points of view
qemu: refactor out function to build scsi device qemu commandline
qemu: no hot-plug/unplug support currently for usb-bot
tests: add xml2argv test for usb-bot scsi controller
docs/formatdomain.html.in | 4 ++--
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
src/conf/domain_conf.h | 5 +++++
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------
src/qemu/qemu_hotplug.c | 14 ++++++++++++++
src/vmx/vmx.c | 3 ++-
tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-usbbot.args | 11 +++++++++++
tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-usbbot.xml | 33 +++++++++++++++++++++++++++++++++
tests/qemuxml2argvtest.c | 3 +++
13 files changed, 259 insertions(+), 58 deletions(-)
11 years, 7 months