Pavel Hrdina | 31 Oct 19:13 2014

[libvirt] [PATCH] mingw: fix build failure

This macro seems to be defined only on linux/unix and it fails during
mingw build. Its value is '16' (taken from net/if.h) so define it if
it's not defined.

Signed-off-by: Pavel Hrdina <phrdina <at>>

For now just define it for mingw but we should review all daemon related
code and not build it for mingw at all to save is those kind of failures.

 src/util/virnetdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index 6da3371..3831009 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
 <at>  <at>  -52,6 +52,10  <at>  <at> 
 # include <net/if_dl.h>

+#offender's IFNAMSIZ
+# define IFNAMSIZ 16


(Continue reading)

Gene Czarcinski | 31 Oct 19:02 2014

[libvirt] [sandbox PATCH 0/2] v1.1 bugfix: support dhcp network interfaces

Resubmitted to add "sandbox PATCH" to Subject

v1.1 adds some documentation changes.

Support for a network such as -N dhcp,source=default was not working
in that dhclient was not being started.  Although I am not sure what
the real problem is, the solution is to use g_spawn_sync() instead of
g_spawn_async() to start /sbin/dhclient.

The second patch addes "-v" to the dhclient arguments to improve debugging
info.  The dhclient into will be in /var/log/messages the Secure Contrainer
host system and not in the container itself.

Gene Czarcinski (2):
  v1.1 for dhclient use g_spawn_sync()
  v1.1 add -v to dhclient parameter arguments

 libvirt-sandbox/libvirt-sandbox-init-common.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)



Pavel Hrdina | 31 Oct 17:45 2014

[libvirt] [PATCH 0/2] Fix two coverity issues

Both are false positive but its nice to make coverity happy.

Pavel Hrdina (2):
  vbox_storage: fix coverity issue with overwriting value
  hotplug: fix char device detach

 src/qemu/qemu_hotplug.c | 12 ++++++++----
 src/vbox/vbox_storage.c | 36 ++++++++++++++++--------------------
 2 files changed, 24 insertions(+), 24 deletions(-)



Ján Tomko | 31 Oct 17:01 2014

[libvirt] [PATCH][1.2.10] Relax duplicate SCSI host pool checking

Since commit 3f99d64 no new scsi_host pools can be defined
if one of the already defined scsi_host pools does not refer
to an accessible scsi_host adapter.

Relax the check by skipping over these inaccessible pools
when checking for duplicates. If both of them are defined by
their parent, only compare their address and unique_id with
the re-introduced matchSCSIAdapterParent function.
This would be nice to get into 1.2.10, as the commit mentioned
above has not yet been released.

 src/conf/storage_conf.c | 35 ++++++++++++++++++++++++++++++-----
 1 file changed, 30 insertions(+), 5 deletions(-)

diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 19c452b..afd6cd4 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
 <at>  <at>  -2094,6 +2094,28  <at>  <at>  getSCSIHostNumber(virStoragePoolSourceAdapter adapter,
     return ret;
+static bool
+matchSCSIAdapterParent(virStoragePoolObjPtr pool,
+                       virStoragePoolDefPtr def)
+    virDevicePCIAddressPtr pooladdr =
+        &pool->def->;
+    virDevicePCIAddressPtr defaddr =
(Continue reading)

Ján Tomko | 31 Oct 16:29 2014

[libvirt] [PATCH] Use UPDATE_CPU when saving domain status

We only format cpu model for MODE_CUSTOM in domain status XML,
but we always format features if they are present.

This is a problem if we have a domain using MODE_HOST_PASSTHROUGH
that has been managedsaved, then restored, since it now has
a feature list but no model in /var/run/libvirt/qemu.

Use UPDATE_CPU even for the status XML to prevent libvirt
from losing track of the domain.

Also accept a list of features for HOST_PASSTHROUGH even without
a model specified, to catch domains started with older libvirtd.
(We already accept the list of features with a model specified,
 even though they have no effect for HOST_PASSTHROUGH)
 src/conf/cpu_conf.c    | 2 +-
 src/conf/domain_conf.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index 9b7fbb0..96e1c38 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
 <at>  <at>  -625,7 +625,7  <at>  <at>  virCPUDefFormatBuf(virBufferPtr buf,
                        (def->mode == VIR_CPU_MODE_CUSTOM && def->model)));

     if (!def->model &&
(Continue reading)

Martin Kletzander | 31 Oct 15:47 2014

[libvirt] [PATCH v2 0/2] qemu: avoid rare race when undefining domain

This is a v2 of:

This time it's going to be fixed in QEMU only, using a job and hack
around virDomainObjListRemove().  Also, in this version, the error
message will use UUID instead of the domain name, because it gets
reported in different API, but it still makes sense, fortunately.

Martin Kletzander (2):
  DO NOT APPLY UPSTREAM: Reproducer helper
  qemu: avoid rare race when undefining domain

 src/conf/domain_conf.c | 3 +++
 src/qemu/qemu_domain.c | 9 +++++++++
 2 files changed, 12 insertions(+)


Ján Tomko | 31 Oct 10:22 2014

[libvirt] [PATCH] Do not probe for power mgmt capabilities in lxc emulator

It fails after 30 seconds with this error:
error : virDBusCall:1429 : error from service: CanSuspend:
Did not receive a reply. Possible causes include: the remote
application did not send a reply, the message bus security
policy blocked the reply, the reply timeout expired, or the
network connection was broken.

Only probe for the power mgmt capabilities when driver is non-NULL.
This speeds up domain startup by 30 seconds.
 src/lxc/lxc_conf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
index 17df7a8..e713ff8 100644
--- a/src/lxc/lxc_conf.c
+++ b/src/lxc/lxc_conf.c
 <at>  <at>  -82,7 +82,9  <at>  <at>  virCapsPtr virLXCDriverCapsInit(virLXCDriverPtr driver)
         VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");

-    if (virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
+    /* Only probe for power management capabilities in the driver,
+     * not in the emulator */
+    if (driver && virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
         VIR_WARN("Failed to get host power management capabilities");

     if (virGetHostUUID(caps->host.host_uuid)) {
(Continue reading)

Ján Tomko | 31 Oct 10:22 2014

[libvirt] [PATCH] Require at least one console for LXC domain

A domain without a console quietly dies soon after start,
because we try to set /dev/null as a controlling TTY
2014-10-30 15:10:59.705+0000: 1: error : lxcContainerSetupFDs:283 :
ioctl(TIOCSTTY) failed: Inappropriate ioctl for device

Report an error early instead of trying to start it.
 src/lxc/lxc_container.c | 6 ++++--
 src/lxc/lxc_process.c   | 6 ++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index f02b959..8aba3ba 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
 <at>  <at>  -2093,8 +2093,10  <at>  <at>  static int lxcContainerChild(void *data)
         if (virAsprintf(&ttyPath, "%s/%s.devpts/%s",
                         LXC_STATE_DIR, vmDef->name, tty) < 0)
             goto cleanup;
-    } else if (VIR_STRDUP(ttyPath, "/dev/null") < 0) {
-            goto cleanup;
+    } else {
+        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+                       _("At least one tty is required"));
+        goto cleanup;

     VIR_DEBUG("Container TTY path: %s", ttyPath);
(Continue reading)

Prerna Saxena | 31 Oct 10:15 2014

[libvirt] [v5][Patch 0/4] Libvirt CPU enhancements for Power KVM

This patch series is a collection of enhancements for PowerPC CPUs on PowerKVM.
In this iteration, I have followed Dan's suggestion on using existing cpu mode 
format to describe powerPC compatibility mode.
Hope this can finally make it for 1.2.10 !

 Series Summary:
Patch 1/4 : Introduce a new architecture 'ppc64le' for libvirt.
Patch 2/4 : Add libvirt support for VMs running in 'compat' mode on Power KVM.
Patch 3/4 : Improve PVR handling to fall back to cpu generation.
Patch 4/4 : Add documentation describing compat mode usage for PowerPC guests.

* PowerPC has traditionally been a Big-endian architecture. However, with PowerPC ISA version 2.07, it
can run in Little-endian mode as well. IBM Power8 processors, compliant with ISA 2.07 allow launching VMs
in little-endian mode. This is signified by 'ppc64le' architecture. Patch 1 adds this support to
libvirt, to allow running VMs based on ppc64le architecture.

* Patch 2,3 tweak libvirt to correctly model PowerPC CPUs based on recent PowerKVM implementation.

PowerKVM permits VMs with vcpus in the following allowed modes :
    i) Host native mode:
      where the vcpu seen in the VM belongs to the same processor generation as the host.
      Example: A POWER7 host, conforming to PowerISA version 2.06, will run VMs with "power7" vcpus.
    ii) Binary Compatibility ("compat") mode:
      PowerISA allows processors to run VMs in binary compatibility ("compat") mode supporting an older
version of ISA.
      As an example: In compatibility mode, a POWER7 host can run a "power6" VM, conforming to power ISA v2.05.
      Similarly, a POWER8 host can run a "power7" VM conforming to PowerISA v2.06.
(Continue reading)

weiwei li | 31 Oct 09:17 2014

[libvirt] [PATCH 2/2] qemu: migration: Ignore null ptr in qemuMigrationStopNBDServer

qemuMigrationCookiePtr mig->nbd may be null when MigrationCookie
do not have nbd information ,but nbd port did allocated before and
must be released here, so ignore mig->nbd null ptr and just warn.

Signed-off-by: Weiwei Li <nuonuoli <at>>
 src/qemu/qemu_migration.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 0ad8054..134b041 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
<at> <at> -1584,7 +1584,7 <at> <at> qemuMigrationStopNBDServer(virQEMUDriverPtr driver,
     qemuDomainObjPrivatePtr priv = vm->privateData;
     if (!mig->nbd)
-        return;
+        VIR_WARN("mig->nbd is null");
     if (qemuDomainObjEnterMonitorAsync(driver, vm,
                                        QEMU_ASYNC_JOB_MIGRATION_IN) < 0)
<div><div dir="ltr">
<div>qemuMigrationCookiePtr mig-&gt;nbd may be null when MigrationCookie</div>
<div>do not have nbd information ,but nbd port did allocated before and</div>
<div>must be released here, so ignore mig-&gt;nbd null ptr and just warn.</div>
<div>Signed-off-by: Weiwei Li &lt;<a href="mailto:nuonuoli <at>">nuonuoli <at></a>&gt;</div>
<div>&nbsp;src/qemu/qemu_migration.c | &nbsp; &nbsp;2 +-</div>
<div>&nbsp;1 files changed, 1 insertions(+), 1 deletions(-)</div>
<div>diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c</div>
<div>index 0ad8054..134b041 100644</div>
<div>--- a/src/qemu/qemu_migration.c</div>
<div>+++ b/src/qemu/qemu_migration.c</div>
<div> <at>  <at>  -1584,7 +1584,7  <at>  <at>  qemuMigrationStopNBDServer(virQEMUDriverPtr driver,</div>
<div>&nbsp; &nbsp; &nbsp;qemuDomainObjPrivatePtr priv = vm-&gt;privateData;</div>
<div>&nbsp; &nbsp; &nbsp;if (!mig-&gt;nbd)</div>
<div>- &nbsp; &nbsp; &nbsp; &nbsp;return;</div>
<div>+ &nbsp; &nbsp; &nbsp; &nbsp;VIR_WARN("mig-&gt;nbd is null");</div>
<div>&nbsp; &nbsp; &nbsp;if (qemuDomainObjEnterMonitorAsync(driver, vm,</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QEMU_ASYNC_JOB_MIGRATION_IN) &lt; 0)</div>
Chateigner Nicolas | 30 Oct 23:08 2014

[libvirt] virsh migrate


I would like to use this command to backup my virtual machine on my secondary server

virsh migrate --live --suspend --copy-storage-inc virtual_machine qemu+ssh://root <at> secondary_server/system

But we don't have option to disable shut off the virtual machine on the source server.
Would you add an option to offer this functionality ?

Best regards
Nicolas Chateigner

    I would like to use this command to backup my virtual machine on my
    secondary server<br><br>
    virsh migrate --live --suspend --copy-storage-inc virtual_machine
    qemu+ssh://root <at> secondary_server/system<br><br><br>
    But we don't have option to disable shut off the virtual machine on
    the source server.<br>
    Would you add an option to offer this functionality ?<br><br>
    Best regards<br>
    Nicolas Chateigner<br>
    &nbsp;<br><br><div class="moz-signature">
      <div class="Section1">
        <table class="MsoTableGrid" width="1000" border="0" cellpadding="0" cellspacing="0"><tr>
<td valign="top" width="650"><br></td>
              <td valign="top" width="300">
<a href=""></a><br>