[libvirt] [PATCH] build: make autobuild require rpm build deps
by Eric Blake
I spent far too long on a new machine trying to figure out why
./autobuild.sh failed during the rpm build failure (complaining
that libvirt_parthelper was supposed to be packaged but was not
built), and finally traced it to a missing parted-devel
installation. I don't know why we have --nodeps in place, but
removing it would make rpmbuild error out much sooner, and with
a much less cryptic failure case.
* autobuild.sh: Drop --nodeps from rpmbuild lines.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
I'm okay ditching this patch if someone can explain why the
--nodeps line should be there.
autobuild.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/autobuild.sh b/autobuild.sh
index e5aa35c..0ab5f5e 100755
--- a/autobuild.sh
+++ b/autobuild.sh
@@ -60,7 +60,7 @@ else
fi
if test -f /usr/bin/rpmbuild ; then
- rpmbuild --nodeps \
+ rpmbuild \
--define "extra_release $EXTRA_RELEASE" \
--define "_sourcedir `pwd`" \
-ba --clean libvirt.spec
@@ -111,7 +111,7 @@ fi
if test -x /usr/bin/i686-w64-mingw32-gcc && test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
if test -f /usr/bin/rpmbuild ; then
- rpmbuild --nodeps \
+ rpmbuild \
--define "extra_release $EXTRA_RELEASE" \
--define "_sourcedir `pwd`" \
-ba --clean mingw-libvirt.spec
--
1.8.3.1
11 years, 2 months
[libvirt] [PATCHv3 RESEND 0/5] Handling of undefine and redefine snapshots with VirtualBox 4.2
by Manuel VIVES
Hi,
This is a serie of patches in order to support undefining and redefining
snapshots with VirtualBox 4.2.
The serie of patches is rather big, and adds among other things some utility functions unrelated to VirtualBox in patches 1 & 2.
The code review could be done in several parts: e.g. patches 1 & 2 separately to validate the utility functions.
The VirtualBox API provides only high level operations to manipulate snapshots,
so it not possible to support flags like VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE and
VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY with only API calls.
Following an IRC talk with Eric Blake, the decision was taken to emulate these
behaviours by manipulating directly the .vbox XML files.
The first two patches are some util methods for handling uuid and strings that
will be used after.
The third patch brings more details in the snapshot XML returned by libvirt.
We will need those modifications in order to redefine the snapshots.
The fourth patch brings the support of the VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE
and VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT flags in virDomainSnapshotCreateXML.
The fifth and last patch brings the support of the VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY
flag in virDomainSnapshotDelete.
The patches are only for Virtualbox 4.2
Regards,
Manuel VIVES
V3:
* Use of STREQ_NULLABLE instead of STREQ in one case
* Fix the method for finding uuids according to Ján Tomko review
V2:
* Fix a licence problem with the method for string replacement
Manuel VIVES (5):
viruuid.h/c: Util method for finding uuid patterns in some strings
virstring.h/c: Util method for making some find and replace in
strings
vbox_tmpl.c: Better XML description for snapshots
vbox_tmpl.c: Patch for redefining snapshots
vbox_tmpl.c: Add methods for undefining snapshots
po/POTFILES.in | 1 +
src/conf/domain_conf.c | 2 +-
src/libvirt_private.syms | 2 +
src/util/virstring.c | 48 ++
src/util/virstring.h | 2 +
src/util/viruuid.c | 81 ++
src/util/viruuid.h | 1 +
src/vbox/vbox_tmpl.c | 1846 +++++++++++++++++++++++++++++++++++++++++++---
8 files changed, 1871 insertions(+), 112 deletions(-)
--
1.7.10.4
11 years, 2 months
[libvirt] One question about ACS for pci passthrough
by Li Zhang
Hi all,
In libvirt, it doesn't allow non-ACS switch to assign devices to guests.
Is this required for X86 to support PCI passthrough?
On my power machine, ACS capability can't be found. I think HW doesn't
support it.
I don't know whether this is a special situation, and I have to set
relaxed_acs_check = 1.
Thanks.
--Li
11 years, 2 months
[libvirt] [PATCH 0/3] Clean up usage of access(PATH, F_OK)
by Peter Krempa
Peter Krempa (3):
util: Declare that virFileExists shall honor errno
cgroup: Move [qemu|lxc]GetCpuBWStatus to vicgroup.c and refactor it
cleanup: Kill usage of access(PATH, F_OK) in favor of virFileExists()
src/libvirt_private.syms | 1 +
src/lxc/lxc_driver.c | 52 ++++-------------------------------
src/openvz/openvz_conf.c | 2 +-
src/parallels/parallels_storage.c | 2 +-
src/qemu/qemu_capabilities.c | 4 +--
src/qemu/qemu_cgroup.c | 6 ++--
src/qemu/qemu_driver.c | 51 ++++------------------------------
src/qemu/qemu_process.c | 2 +-
src/storage/storage_backend_fs.c | 2 +-
src/storage/storage_backend_logical.c | 2 +-
src/storage/storage_backend_mpath.c | 8 +-----
src/storage/storage_backend_scsi.c | 3 +-
src/util/vircgroup.c | 31 ++++++++++++++++++++-
src/util/vircgroup.h | 2 ++
src/util/virfile.c | 8 +++++-
src/util/virpci.c | 2 +-
src/util/virscsi.c | 2 +-
src/util/virutil.c | 6 ++--
18 files changed, 67 insertions(+), 119 deletions(-)
--
1.8.3.2
11 years, 2 months
Re: [libvirt] [Users] Live Migration failed oVirt 3.3 Nightly
by Dan Kenigsberg
On Sun, Sep 15, 2013 at 09:57:47PM +1000, Andrew Lau wrote:
> On Sun, Sep 15, 2013 at 9:34 PM, Dan Kenigsberg <danken(a)redhat.com> wrote:
>
> > On Sun, Sep 15, 2013 at 08:44:18PM +1000, Andrew Lau wrote:
> > > On Sun, Sep 15, 2013 at 8:00 PM, Dan Kenigsberg <danken(a)redhat.com>
> > wrote:
> > >
> > > > On Sun, Sep 15, 2013 at 06:48:41PM +1000, Andrew Lau wrote:
> > > > > Hi Dan,
> > > > >
> > > > > Certainly, I've uploaded them to fedora's paste bin and tried to snip
> > > > just
> > > > > the relevant details.
> > > > >
> > > > > Sender (hv01.melb.domain.net):
> > > > > http://paste.fedoraproject.org/39660/92339651/
> > > >
> > > > This one has
> > > >
> > > > libvirtError: operation failed: Failed to connect to remote libvirt
> > > > URI qemu+tls://hv02.melb.domain.net/system
> > > >
> > > > which is most often related to firewall issues, and some time to key
> > > > mismatch.
> > > >
> > > > Does
> > > > virsh -c qemu+tls://hv02.melb.domain.net/system capabilities
> > > > work when run from the command line of hv01?
> > > >
> > > > Dan.
> > > > > Receiver (hv02.melb.domain.net): `
> > > > > http://paste.fedoraproject.org/39661/23406913/
> > > > >
> > > > > VM being transfered is ovirt_guest_vm
> > > > >
> > > > > Thanks,
> > > > > Andrew
> > > >
> > >
> > > virsh -c qemu+tls://hv02.melb.domain.net/system
> > > 2013-09-15 10:41:10.620+0000: 23994: info : libvirt version: 0.10.2,
> > > package: 18.el6_4.9 (CentOS BuildSystem <http://bugs.centos.org>,
> > > 2013-07-02-11:19:29, c6b8.bsys.dev.centos.org)
> > > 2013-09-15 10:41:10.620+0000: 23994: warning :
> > > virNetTLSContextCheckCertificate:1102 : Certificate check failed
> > > Certificate failed validation: The certificate hasn't got a known issuer.
> >
> > Would you share your
> >
> >
> > openssl x509 -in
> > /etc/pki/vdsm/certs/cacert.pem -text
> >
> > openssl x509 -in /etc/pki/vdsm/certs/vdsmcert.pem -text
> >
> > on both hosts? This content may be sensitive, and may not
> > provide an answer why libvirt on src cannot contact libvirtd on the
> > other host. So before you do that, would you test if
> >
> >
> > vdsClient -s hv02.melb.domain.net getVdsCapabilities
> >
> > works when run on hv01? It may be that the certificates are fine, but
> > libvirt is not configured to use the correct ones.
> >
> > Dan.
> >
> >
> vdsClient -s hv02.melb.domain.net getVdsCapabilities runs fine
>
> I did a quick comparison between the files on both hosts, they seem to have
> the right details (host names, authority etc.)
> cacert.pem matches
>
> /etc/libvirt/libvirtd.conf
>
> ca_file="/etc/pki/vdsm/certs/cacert.pem"
> cert_file="/etc/pki/vdsm/certs/vdsmcert.pem"
> key_file="/etc/pki/vdsm/keys/vdsmkey.pem"
Maybe someone on libvir-list could guess why this could be happening?
11 years, 2 months
[libvirt] [PATCH] virsh: move command maxvcpus from domain group to host group.
by yangdongsheng
Since the maxvcpus command query the maximum number of virtual
CPUs supported for a guest VM on this connection, it should be
in virsh-host.c but not virsh-domain.c.
Signed-off-by: yangdongsheng <yangds.fnst(a)cn.fujitsu.com>
---
tools/virsh-domain.c | 44 --------------------------------------------
tools/virsh-host.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 4f85f5f..50a57ee 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -5172,44 +5172,6 @@ cmdDomjobabort(vshControl *ctl, const vshCmd *cmd)
}
/*
- * "maxvcpus" command
- */
-static const vshCmdInfo info_maxvcpus[] = {
- {.name = "help",
- .data = N_("connection vcpu maximum")
- },
- {.name = "desc",
- .data = N_("Show maximum number of virtual CPUs for guests on this connection.")
- },
- {.name = NULL}
-};
-
-static const vshCmdOptDef opts_maxvcpus[] = {
- {.name = "type",
- .type = VSH_OT_STRING,
- .help = N_("domain type")
- },
- {.name = NULL}
-};
-
-static bool
-cmdMaxvcpus(vshControl *ctl, const vshCmd *cmd)
-{
- const char *type = NULL;
- int vcpus;
-
- if (vshCommandOptStringReq(ctl, cmd, "type", &type) < 0)
- return false;
-
- if ((vcpus = virConnectGetMaxVcpus(ctl->conn, type)) < 0)
- return false;
-
- vshPrint(ctl, "%d\n", vcpus);
-
- return true;
-}
-
-/*
* "vcpucount" command
*/
static const vshCmdInfo info_vcpucount[] = {
@@ -10637,12 +10599,6 @@ const vshCmdDef domManagementCmds[] = {
.info = info_managedsaveremove,
.flags = 0
},
- {.name = "maxvcpus",
- .handler = cmdMaxvcpus,
- .opts = opts_maxvcpus,
- .info = info_maxvcpus,
- .flags = 0
- },
{.name = "memtune",
.handler = cmdMemtune,
.opts = opts_memtune,
diff --git a/tools/virsh-host.c b/tools/virsh-host.c
index 880ae4b..f69ab79 100644
--- a/tools/virsh-host.c
+++ b/tools/virsh-host.c
@@ -193,6 +193,44 @@ cleanup:
}
/*
+ * "maxvcpus" command
+ */
+static const vshCmdInfo info_maxvcpus[] = {
+ {.name = "help",
+ .data = N_("connection vcpu maximum")
+ },
+ {.name = "desc",
+ .data = N_("Show maximum number of virtual CPUs for guests on this connection.")
+ },
+ {.name = NULL}
+};
+
+static const vshCmdOptDef opts_maxvcpus[] = {
+ {.name = "type",
+ .type = VSH_OT_STRING,
+ .help = N_("domain type")
+ },
+ {.name = NULL}
+};
+
+static bool
+cmdMaxvcpus(vshControl *ctl, const vshCmd *cmd)
+{
+ const char *type = NULL;
+ int vcpus;
+
+ if (vshCommandOptStringReq(ctl, cmd, "type", &type) < 0)
+ return false;
+
+ if ((vcpus = virConnectGetMaxVcpus(ctl->conn, type)) < 0)
+ return false;
+
+ vshPrint(ctl, "%d\n", vcpus);
+
+ return true;
+}
+
+/*
* "nodeinfo" command
*/
static const vshCmdInfo info_nodeinfo[] = {
@@ -863,6 +901,12 @@ const vshCmdDef hostAndHypervisorCmds[] = {
.info = info_hostname,
.flags = 0
},
+ {.name = "maxvcpus",
+ .handler = cmdMaxvcpus,
+ .opts = opts_maxvcpus,
+ .info = info_maxvcpus,
+ .flags = 0
+ },
{.name = "node-memory-tune",
.handler = cmdNodeMemoryTune,
.opts = opts_node_memory_tune,
--
1.7.10.1
11 years, 2 months
[libvirt] [PATCH RESEND 0/4] Pre-create storage on live migration
by Michal Privoznik
[Resending due to some list difficulties]
Currently users are required to pre-create storage on their own upon migration.
This patch set implements the feature for RAW, QCOW and QCOW2 images. While for
the RAW fallocate() is used (so we are guaranteed subsequent write() won't fail
with ENOSPC, for the latter two we have no other option than using qemu-img,
which uses ftruncate(). On the other hand, this is not such big deal. If the
spare runs out as a domain is migrating, the migration is aborted, and
pre-created storage unlink()-ed. There's no difference to what will happen if
user will pre-create storage by hand.
https://bugzilla.redhat.com/show_bug.cgi?id=927252
Michal Privoznik (4):
qemu: Expose file opening functions
qemu_domain: Introduce qemuDomainGetDiskBlockInfo
qemu_migration: Check size prerequisites
qemu_migration: Unlink pre-created storage on error
src/qemu/qemu_domain.c | 299 ++++++++++++++++++++++++++++++++++++++++++++-
src/qemu/qemu_domain.h | 16 +++
src/qemu/qemu_driver.c | 276 ++---------------------------------------
src/qemu/qemu_migration.c | 304 +++++++++++++++++++++++++++++++++++++++++++++-
src/qemu/qemu_process.c | 8 ++
5 files changed, 627 insertions(+), 276 deletions(-)
--
1.8.1.5
11 years, 2 months
[libvirt] [PATCH] Explicitly link libvirt_net_rpc against SELINUX_LIBS
by Guido Günther
Since virnetsocket conditionally uses selinux we need to link against it
otherwise the build fails with:
CCLD libvirtd
/usr/bin/ld: ../src/.libs/libvirt-lxc.so: undefined reference to symbol 'freecon'
/lib/i386-linux-gnu/libselinux.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [libvirtd] Error 1
---
src/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Makefile.am b/src/Makefile.am
index 711da32..1a74435 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2226,6 +2226,7 @@ libvirt_net_rpc_la_LDFLAGS = \
$(GNUTLS_LIBS) \
$(SASL_LIBS) \
$(SSH2_LIBS)\
+ $(SELINUX_LIBS) \
$(AM_LDFLAGS) \
$(CYGWIN_EXTRA_LDFLAGS) \
$(MINGW_EXTRA_LDFLAGS)
--
1.8.4.rc3
11 years, 2 months
[libvirt] [PATCH] tools: fix a judgment of equalling zero about an array's length
by lawrancejing
There is no need to go on executing code when the array's length is zero.
---
tools/virsh-snapshot.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c
index e37a5b3..d7a4c7b 100644
--- a/tools/virsh-snapshot.c
+++ b/tools/virsh-snapshot.c
@@ -239,7 +239,7 @@ vshParseSnapshotMemspec(vshControl *ctl, virBufferPtr buf, const char *str)
return 0;
narray = vshStringToArray(str, &array);
- if (narray < 0)
+ if (narray <= 0)
goto cleanup;
for (i = 0; i < narray; i++) {
--
1.7.1
11 years, 2 months