[libvirt] [PATCH] wireshark dissector compile fix
by Benedikt Spranger
Compiling libvirt wireshark dissector on a debian based system failed:
CC wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo
In file included from ../../libvirt/tools/wireshark/src/packet-libvirt.c:27:0:
/usr/include/wireshark/epan/proto.h:40:18: fatal error: glib.h: No such file or directory
compilation terminated.
Makefile:2595: recipe for target 'wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo' failed
Add an explicit dependency to glib.
Benedikt Spranger (1):
wireshark: glib compile fix
m4/virt-wireshark.m4 | 2 ++
tools/Makefile.am | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
--
2.8.1
8 years, 3 months
[libvirt] [PATCH v2] qemu: remove panic dev models s390 and pseries when migrating
by Boris Fiuczynski
The panic devices with models s390 and pseries are autogenerated.
For backwards compatibility reasons the devices are to be removed
when migrating.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
---
src/qemu/qemu_domain.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ceac22f..82fa817 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3310,6 +3310,15 @@ qemuDomainDefFormatBuf(virQEMUDriverPtr driver,
virDomainControllerDefFree(usb);
}
+ /* Remove the panic device for selected models if present */
+ for (i = 0; i < def->npanics; i++) {
+ if (def->panics[i]->model == VIR_DOMAIN_PANIC_MODEL_S390 ||
+ def->panics[i]->model == VIR_DOMAIN_PANIC_MODEL_PSERIES) {
+ VIR_DELETE_ELEMENT(def->panics, i, def->npanics);
+ i--;
+ }
+ }
+
for (i = 0; i < def->nchannels; i++)
qemuDomainChrDefDropDefaultPath(def->channels[i], driver);
}
--
2.9.0
8 years, 3 months
[libvirt] [PATCH 0/2] a couple of schema fixes
by Nikolay Shirokovskiy
Nikolay Shirokovskiy (2):
schema: add missed alias element to memory device
schema: fix resolved interfaces of network type
docs/schemas/domaincommon.rng | 43 +++++++++++++++++++++++++++++++++---------
docs/schemas/network.rng | 5 +----
docs/schemas/networkcommon.rng | 6 ++++++
3 files changed, 41 insertions(+), 13 deletions(-)
--
1.8.3.1
8 years, 3 months
[libvirt] [PATCH v2] qemu: fix domain id after domainCreateWithFlags()
by Sascha Silbe
Ever since virDomainCreateWithFlags() was introduced by de3aadaa
[drivers: add virDomainCreateWithFlags if virDomainCreate exists], the
domain ID retrieved with virDomainGetID() was incorrect for several
drivers after virDomainCreateWithFlags() was called. The API consumer
had to look up the domain anew to retrieve the correct ID.
For the ESX driver, this was fixed in 6139b274 [esx: Update ID after
starting a domain]. For the openvz driver, it was fixed in fd81a097
[openvzDomainCreateWithFlags: set domain id to the correct value]. The
test driver, the OpenNebula driver (removed in the meantime) and the
vbox driver were already updating the domain ID correctly in
domainCreate().
Copy over the ID in qemuDomainCreateWithFlags() to fix this for the qemu
driver, too.
Fixes: de3aadaa ("drivers: add virDomainCreateWithFlags if virDomainCreate exists")
Reported-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
Signed-off-by: Sascha Silbe <silbe(a)linux.vnet.ibm.com>
Tested-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
---
v1→v2:
- Adjusted commit message. remoteDomainCreate() is actually fine since
it explicitly queries the ID in a second RPC, only
remoteDomainCreateWithFlags() is broken. Found and mentioned several
other commits that fixed this for several of the other hypervisor
drivers.
src/qemu/qemu_driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 1820f85..43242e0 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7100,6 +7100,7 @@ qemuDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
QEMU_ASYNC_JOB_START) < 0)
goto endjob;
+ dom->id = vm->def->id;
ret = 0;
endjob:
--
1.9.1
8 years, 3 months
[libvirt] [PATCH] spec: Require perl-XML-XPath during build
by Martin Kletzander
Some time ago I went through the trouble to make support for perl module
requirements in our bootstrap. Even though we require it in the
bootstrap, it was not listed as a build requirement in the specfile.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
libvirt.spec.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index cc5d72209873..b182f4521453 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -269,6 +269,7 @@ BuildRequires: /usr/bin/pod2man
%endif
BuildRequires: git
BuildRequires: perl
+BuildRequires: perl-XML-XPath
BuildRequires: python
%if %{with_systemd}
BuildRequires: systemd-units
--
2.9.2
8 years, 3 months
[libvirt] [PATCH 0/2] qemu: caps: Sanitize storage of machine type related data
by Peter Krempa
Peter Krempa (2):
qemu: capabilities: Drop unused function virQEMUCapsGetMachineTypes
qemu: caps: Sanitize storage of machine type related data
src/qemu/qemu_capabilities.c | 125 ++++++++++++++++---------------------------
src/qemu/qemu_capabilities.h | 2 -
2 files changed, 46 insertions(+), 81 deletions(-)
--
2.9.2
8 years, 3 months
[libvirt] [PATCH] virsh: Report error when explicit connection fails
by Martin Kletzander
Commit 0c56d9431839 forgot to return false in the cmdConnect command
after the clean up made there.
Before (assuming you don't have uri alias for 'asdf'):
$ virsh connect asdf
error: failed to connect to the hypervisor
$ echo $?
0
After (with the same assumption):
$ virsh connect asdf
error: failed to connect to the hypervisor
error: no connection driver available for asdf
$ echo $?
1
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1356461
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
tools/virsh.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index f74698fa5f9a..d3fe06f19032 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -210,7 +210,7 @@ virshConnect(vshControl *ctl, const char *uri, bool readonly)
* Reconnect after a disconnect from libvirtd
*
*/
-static void
+static int
virshReconnect(vshControl *ctl, const char *name, bool readonly, bool force)
{
bool connected = false;
@@ -237,6 +237,7 @@ virshReconnect(vshControl *ctl, const char *name, bool readonly, bool force)
vshError(ctl, "%s", _("Failed to reconnect to the hypervisor"));
else
vshError(ctl, "%s", _("failed to connect to the hypervisor"));
+ return -1;
} else {
if (name) {
VIR_FREE(ctl->connname);
@@ -253,6 +254,7 @@ virshReconnect(vshControl *ctl, const char *name, bool readonly, bool force)
priv->useGetInfo = false;
priv->useSnapshotOld = false;
priv->blockJobNoBytes = false;
+ return 0;
}
int virshStreamSink(virStreamPtr st ATTRIBUTE_UNUSED,
@@ -301,7 +303,8 @@ cmdConnect(vshControl *ctl, const vshCmd *cmd)
if (vshCommandOptStringReq(ctl, cmd, "name", &name) < 0)
return false;
- virshReconnect(ctl, name, ro, true);
+ if (virshReconnect(ctl, name, ro, true) < 0)
+ return false;
return true;
}
@@ -333,11 +336,13 @@ virshConnectionHandler(vshControl *ctl)
{
virshControlPtr priv = ctl->privData;
- if (!priv->conn || disconnected)
- virshReconnect(ctl, NULL, false, false);
+ if ((!priv->conn || disconnected) &&
+ virshReconnect(ctl, NULL, false, false) < 0)
+ return NULL;
if (virshConnectionUsability(ctl, priv->conn))
return priv->conn;
+
return NULL;
}
@@ -444,14 +449,13 @@ virshInit(vshControl *ctl)
return false;
if (ctl->connname) {
- virshReconnect(ctl, NULL, false, false);
/* Connecting to a named connection must succeed, but we delay
* connecting to the default connection until we need it
* (since the first command might be 'connect' which allows a
* non-default connection, or might be 'help' which needs no
* connection).
*/
- if (!priv->conn) {
+ if (virshReconnect(ctl, NULL, false, false) < 0) {
vshReportError(ctl);
return false;
}
--
2.9.2
8 years, 3 months
[libvirt] [PATCH] qemuDomainDetermineDiskChain: initialize ret as -1
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)gmail.com>
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
src/qemu/qemu_domain.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 9b439df..35d4365 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4394,7 +4394,7 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
bool report_broken)
{
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
- int ret = 0;
+ int ret = -1;
uid_t uid;
gid_t gid;
@@ -4416,6 +4416,8 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
report_broken) < 0)
ret = -1;
+ ret = 0;
+
cleanup:
virObjectUnref(cfg);
return ret;
--
1.8.3.1
8 years, 3 months
[libvirt] [PATCH] qemu: Fix domain state after reset
by Martin Kletzander
When reset was called from a domain that crashed we didn't change the
crashed state into a paused one which could confuse users.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1269575
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_driver.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index cda85f65fc98..866580705493 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2139,6 +2139,7 @@ qemuDomainReset(virDomainPtr dom, unsigned int flags)
virDomainObjPtr vm;
int ret = -1;
qemuDomainObjPrivatePtr priv;
+ virDomainState state;
virCheckFlags(0, -1);
@@ -2165,6 +2166,10 @@ qemuDomainReset(virDomainPtr dom, unsigned int flags)
priv->fakeReboot = false;
+ state = virDomainObjGetState(vm, NULL);
+ if (state == VIR_DOMAIN_CRASHED)
+ virDomainObjSetState(vm, VIR_DOMAIN_PAUSED, VIR_DOMAIN_PAUSED_CRASHED);
+
endjob:
qemuDomainObjEndJob(driver, vm);
--
2.9.0
8 years, 3 months