[libvirt] libvirt issue
by Zvi Dubitzky
Hi
I am looking for libvirt user mailing list (Red Hat ) but could not find
one .
So I am using this list (or maybe someone can direct me to such a list).
The problem: using libvirt under openstack I encounter a problem when
launching a VM with multiple partitions (2 G image)
While a single partition can be launched successfully .
We are using in libvirtd.conf log_level=1 and
log_outputs="1:file:/var/log/libvirt/libvirtd.log"
we can see that in /var/log/libvirt/libvirtd.log appear the following
error message :
2014-06-11 14:47:26.166+0000: 12971: error : qemuMonitorIO:614 : internal
error End of file from monitor
( file attached below)
>From the internet we could not figure out a solution to the problem
The host has enough resources and the XML of the VM is :
The libvirt version is: 0.10.2
The qemu-kvm version: 0.12.1.2
Any idea what is causing this error and how to overcome ?
Thx
Zvi Dubitzky
Email:dubi@il.ibm.com
10 years, 11 months
[libvirt] [PATCH v3 0/5] Active commit
by Eric Blake
I still don't have qemu capability detection working reliably,
but want to post this series right now so that it can be built
into a scratch build containing Peter's and my changes. (Or
put another way, I was testing what conflict resolutions are
required - patch 2/5 (virsh) and 5/5 (qemu_driver) has some
conflicts with Peter's addition of relative backing name; and
I think the resolutions were fairly simple).
These patches are tested on top of:
https://www.redhat.com/archives/libvir-list/2014-June/msg00492.html
I may still end up posting a v4 and/or pushing my series before
Peter's, once I get capability detection working the way I want.
Eric Blake (5):
virsh: improve blockcopy UI
virsh: expose new active commit controls
blockcommit: update error messages related to block jobs
blockcommit: track job type in xml
blockcommit: turn on active commit
docs/formatdomain.html.in | 20 +++---
docs/schemas/domaincommon.rng | 6 ++
src/conf/domain_conf.c | 26 ++++++-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_driver.c | 56 ++++++++++++---
src/qemu/qemu_hotplug.c | 2 +-
src/qemu/qemu_process.c | 18 +++--
.../qemuxml2argv-disk-active-commit.xml | 37 ++++++++++
.../qemuxml2argvdata/qemuxml2argv-disk-mirror.xml | 4 +-
.../qemuxml2xmlout-disk-mirror-old.xml | 4 +-
tests/qemuxml2xmltest.c | 1 +
tools/virsh-domain.c | 83 +++++++++++++++++-----
tools/virsh.pod | 53 +++++++++-----
13 files changed, 242 insertions(+), 69 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-active-commit.xml
--
1.9.3
10 years, 11 months
Re: [libvirt] [PATCH] libxl: fix domxml-to-native wrong output for qcow2 format
by Jim Fehlig
Bamvor Jian Zhang<bjzhang(a)suse.com> wrote:
> e.g. for these following disk configuration in libvirt.
> <disk type='file' device='disk'>
For Xen, using <driver name='qemu' .../> (which means qdisk) is only
supported by the libxl driver. The old xm/xend stack does not support qdisk.
> <driver name='qemu' type='qcow2'/>
> <source file='/var/lib/xen/images/001/disk0.qcow2'/>
> <target dev='hdc'/>
>
> without this patch, it will be
> "qemu:/var/lib/xen/images/001/disk0.qcow2,hdc,w"
Yeah, that won't work with xend or libxl :) .
> but it should be(if with this patch)
> "qcow2:/var/lib/xen/images/001/disk0.qcow2,hdc,w"
>
> Signed-off-by: Bamvor Jian Zhang <bjzhang(a)suse.com>
> ---
> src/xenxs/xen_xm.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/xenxs/xen_xm.c b/src/xenxs/xen_xm.c
> index b2db97d..29835b4 100644
> --- a/src/xenxs/xen_xm.c
> +++ b/src/xenxs/xen_xm.c
> @@ -1209,7 +1209,10 @@ xenFormatXMDisk(virConfValuePtr list,
> type = "aio";
> else
> type = virStorageFileFormatTypeToString(format);
> - virBufferAsprintf(&buf, "%s:", driver);
> + if (!STREQ(type, "qcow2"))
> + virBufferAsprintf(&buf, "%s:", driver);
> + else
> + virBufferAsprintf(&buf, "%s:", type);
But this only handles the specific case of <driver name='qemu' type='qcow2'/>.
With <driver name='qemu' type='raw'/>, I get
"qemu:/path/to/disk,hdc,w"
Unfortunately, this is a case where we are trying to use the xm config
parser to parse something that is xl-specific. With <driver name='qemu'.../>,
the corresponding xl disk config would look something like
disk = ['backendtype=qdisk,/var/lib/xen/images/001/disk0.qcow2,hdc,w']
With the type also specified, e.g. <driver name='qemu' type='qcow2'/>, the xl
disk config would be
disk = ['backendtype=qdisk,format=qcow2,/var/lib/xen/images/001/disk0.qcow2,hdc,w']
As I see it, the options are
1. start working on a xen-xl parser
2. map 'qemu' to 'tap'
We'll eventually need 1 anyhow. I haven't looked to see how much work that
would be. Certainly a lot of the xm parsing code could be used since xm
config is a subset of xl config.
Option 2 is really a no-op in the libxl stack, where qdisk is used in place
of tap anyhow. One could argue that mapping qemu to tap isn't too insane in
the xm/xend stack either, since much of the blktap userspace code was
originally based on qemu.
The below patch works for me. Can you give it a try? I'd like to hear wha
others think about taking the easy way out with option 2.
Regards,
Jim
>From 92c476cbe47009c43ebb4a3076a17347c8eea238 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig(a)suse.com>
Date: Thu, 12 Jun 2014 15:28:48 -0600
Subject: [PATCH] libxl: fix domxml-to-native with qemu disk driver
Disk config containing <driver name='qemu'.../> is converted to
the native config containg "qemu:/path/to/disk", which is not
understood by xm or xl.
This patch maps 'qemu' to 'tap'. In xl, tap is mapped to the qemu
backend (aka qdisk), making this change essentially a no-op. In
the xm stack, one could argue that mapping qemu to tap isn't too
insane, since much of the blktap userspace code was originally
based on qemu.
While at it, noticed that 'driver' wasn't being honored in
xenFormatXMDisk, so change the logic a bit to honor a
user-specified driver.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/xenxs/xen_xm.c | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/src/xenxs/xen_xm.c b/src/xenxs/xen_xm.c
index b2db97d..ebd525b 100644
--- a/src/xenxs/xen_xm.c
+++ b/src/xenxs/xen_xm.c
@@ -1201,17 +1201,28 @@ xenFormatXMDisk(virConfValuePtr list,
int format = virDomainDiskGetFormat(disk);
const char *driver = virDomainDiskGetDriver(disk);
- if (src) {
- if (format) {
- const char *type;
+ /*
+ * In pre-libxl Xen, 'tap' provided the qemu driver functionality.
+ * In libxl Xen, qemu (aka qdisk) is in fact used. For backwards
+ * compatibility, tap == qdisk in libxl Xen, so it is safe to use
+ * 'tap' in libxl tool.
+ */
+ if (STREQ(driver, "qemu"))
+ driver = "tap";
- if (format == VIR_STORAGE_FILE_RAW)
- type = "aio";
- else
- type = virStorageFileFormatTypeToString(format);
+ if (src) {
+ if (driver) {
virBufferAsprintf(&buf, "%s:", driver);
- if (STREQ(driver, "tap"))
- virBufferAsprintf(&buf, "%s:", type);
+ if (format) {
+ const char *type;
+
+ if (format == VIR_STORAGE_FILE_RAW)
+ type = "aio";
+ else
+ type = virStorageFileFormatTypeToString(format);
+ if (STREQ(driver, "tap"))
+ virBufferAsprintf(&buf, "%s:", type);
+ }
} else {
switch (virDomainDiskGetType(disk)) {
case VIR_STORAGE_TYPE_FILE:
-- 1.8.4.5
10 years, 11 months
[libvirt] Qemu guest agent to install RPMs in guest VM from host machine
by Puneet Bakshi
Hi,
I want to be able to install RPM packages (available in host system at some
path) to the guest VM and want this facility to be available as a tool.
I am thinking of having a gemu guest agent (qemu-ga) running inside guest
VM. I did not find any available command ("virsh qemu-agent-command
<guest_vm> ...") which can do the same.
I am planning to implement a command in qemu guest agent, which I can
invoke from virsh like below.
"virsh qemu-agent-command vm_01 \
'{"execute":"guest-rpm-install", \
"arguments":{"path":"/usr/local/bin/ABC.rpm"}}
I am able to pass arguments from host to guest VM but how am I supposed to
pass the whole RPM image from host to guest (which the guest agent can
receive and install)?
Regards,
~Puneet
10 years, 11 months
[libvirt] [PATCH 0/2] Expose PCI Express capabilities
by Michal Privoznik
*** BLURB HERE ***
Michal Privoznik (2):
virpci: Introduce virPCIDeviceIsPCIExpress and friends
nodedev: Introduce <pci-express/> to PCI devices
docs/formatnode.html.in | 19 ++++
docs/schemas/nodedev.rng | 26 +++++
src/conf/node_device_conf.c | 123 ++++++++++++++++++++-
src/conf/node_device_conf.h | 31 +++++-
src/libvirt_private.syms | 3 +
src/node_device/node_device_udev.c | 31 ++++++
src/util/virpci.c | 81 +++++++++++++-
src/util/virpci.h | 8 ++
.../pci_8086_4238_pcie_wireless.xml | 26 +++++
tests/nodedevxml2xmltest.c | 1 +
10 files changed, 345 insertions(+), 4 deletions(-)
create mode 100644 tests/nodedevschemadata/pci_8086_4238_pcie_wireless.xml
--
2.0.0
10 years, 11 months
[libvirt] [PATCH] blockcommit: fix regression with explicit top argument
by Eric Blake
Commit f586965 accidentally changed the semantics of the
virDomainBlockCommit command; where it previously looked for
an explicit top argument from the top of the chain, it now
starts from the backing file of the top. Of course, until
we allow active commits, the only difference it makes is in
the quality of the error message, but with code for active
commit coming soon, we need to support an explicit mention
of the active layer.
* src/qemu/qemu_driver.c (qemuDomainBlockCommit): Start looking
from top of chain.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
src/qemu/qemu_driver.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index ec72d9d..bf55f67 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -15528,8 +15528,7 @@ qemuDomainBlockCommit(virDomainPtr dom,
if (!top)
topSource = disk->src;
else if (virStorageFileParseChainIndex(disk->dst, top, &topIndex) < 0 ||
- !(topSource = virStorageFileChainLookup(disk->src,
- disk->src->backingStore,
+ !(topSource = virStorageFileChainLookup(disk->src, NULL,
top, topIndex,
&top_parent)))
goto endjob;
--
1.9.3
10 years, 11 months
[libvirt] [PATCH] virNodeDevCapPCIDevParseXML: Initialize numa_node variable
by Michal Privoznik
With one of my recent patches (1c70277) libvirt's capable of
reporting NUMA node locality for PCI devices. The node ID is
stored in pci_dev.numa_node variable. However, since zero is
valid NUMA node ID, the default is -1 as it is in kernel too.
So, if the PCI device is not tied to any specific NUMA node, the
default is then NOT printed into XML. Therefore, when parsing
node device XML, the <node/> element is optional. But currently,
if it's not there, we must set sane default, otherwise after
parsing the in memory representation doesn't match the XML. We
are already doing this in other place: udevProcessPCI().
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/node_device_conf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index 6153aa1..12e40e6 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -1145,6 +1145,8 @@ virNodeDevCapPCIDevParseXML(xmlXPathContextPtr ctxt,
}
}
+ /* The default value is -1 since zero is valid NUMA node number */
+ data->pci_dev.numa_node = -1;
if (virNodeDevCapsDefParseIntOptional("number(./numa[1]/@node)", ctxt,
&data->pci_dev.numa_node, def,
_("invalid NUMA node ID supplied for '%s'")) < 0)
--
1.8.5.5
10 years, 11 months
[libvirt] [PATCHv4 0/4] virsh: Clean unsigned value parsing
by Peter Krempa
Jincheng Miao (1):
virsh: forbid negative vcpu argument to vcpupin
Peter Krempa (3):
virsh: Reject negative numbers in vshCommandOptUInt
virsh: Reject negative numbers in vshCommandOptUL
virsh: Reject negative numbers in vshCommandOptULongLong
tests/vcpupin | 29 ++++++++++-
tools/virsh-domain.c | 39 ++++++++-------
tools/virsh-volume.c | 8 +--
tools/virsh.c | 137 +++++++++++++++++++++++++++++++++++++++++----------
tools/virsh.h | 9 ++++
5 files changed, 172 insertions(+), 50 deletions(-)
--
1.9.3
10 years, 11 months
[libvirt] [PATCH 0/3] Resolve Coverity warnings
by John Ferlan
Resolve the "lower hanging fruit" Coverity issues from recent commits.
Still left outstanding is rework of virVBoxSnapshotConfAllChildren()
code and callers.
John Ferlan (3):
vbox_temp: Resolve Coverity warnings
vbox_snapshot_conf: Resolve Coverity warnings
libxl: Resolve Coverity warnings
src/libxl/libxl_migration.c | 6 ++----
src/vbox/vbox_snapshot_conf.c | 27 ++++++++++++++++++---------
src/vbox/vbox_tmpl.c | 10 +++++++++-
3 files changed, 29 insertions(+), 14 deletions(-)
--
1.9.3
10 years, 11 months
[libvirt] [PATCH] Fix crash when saving a domain with type none dac label
by Ján Tomko
qemuDomainGetImageIds did not check if there was a label
in the seclabel, thus crashing on
<seclabel type='none' model='dac'/>
---
src/qemu/qemu_domain.c | 3 ++-
src/qemu/qemu_driver.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 962698b..e40c5ec 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2409,7 +2409,8 @@ qemuDomainGetImageIds(virQEMUDriverConfigPtr cfg,
*gid = cfg->group;
}
- if (vm && (vmlabel = virDomainDefGetSecurityLabelDef(vm->def, "dac")))
+ if (vm && (vmlabel = virDomainDefGetSecurityLabelDef(vm->def, "dac")) &&
+ vmlabel->label)
virParseOwnershipIds(vmlabel->label, uid, gid);
if ((disklabel = virDomainDiskDefGetSecurityLabelDef(disk, "dac")) &&
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index ec72d9d..e147d28 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2771,6 +2771,7 @@ qemuOpenFile(virQEMUDriverPtr driver,
/* TODO: Take imagelabel into account? */
if (vm &&
(seclabel = virDomainDefGetSecurityLabelDef(vm->def, "dac")) != NULL &&
+ seclabel->label != NULL &&
(virParseOwnershipIds(seclabel->label, &user, &group) < 0))
goto cleanup;
--
1.8.5.5
10 years, 11 months