Cole Robinson | 17 Sep 01:52 2014
Picon

[libvirt] [PATCH] domaincaps: Expose UEFI binary path, if it exists

Check to see if the UEFI binary mentioned in qemu.conf actually
exists, and if so expose it in domcapabilities like

<loader ...>
  <value>/path/to/ovmf</value>
</loader>

We introduce some generic domcaps infrastructure for handling
a dynamic list of string values, it may be of use for future bits.
---
 docs/formatdomaincaps.html.in                  |  6 ++++
 docs/schemas/domaincaps.rng                    | 17 ++++++---
 src/conf/domain_capabilities.c                 | 23 ++++++++++++
 src/conf/domain_capabilities.h                 |  8 +++++
 src/qemu/qemu_driver.c                         | 24 +++++++++++++
 tests/domaincapsschemadata/domaincaps-full.xml |  1 +
 tests/domaincapstest.c                         | 49 +++++++++++++++++++++-----
 7 files changed, 115 insertions(+), 13 deletions(-)

diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in
index 34d746d..6959dfe 100644
--- a/docs/formatdomaincaps.html.in
+++ b/docs/formatdomaincaps.html.in
 <at>  <at>  -105,6 +105,7  <at>  <at> 
   ...
   &lt;os supported='yes'&gt;
     &lt;loader supported='yes'&gt;
+      &lt;value&gt;/usr/share/OVMF/OVMF_CODE.fd&lt;/value&gt;
       &lt;enum name='type'&gt;
         &lt;value&gt;rom&lt;/value&gt;
(Continue reading)

Matthew Rosato | 16 Sep 22:50 2014
Picon

[libvirt] [PATCH v3] network: Bring netdevs online later

Currently, MAC registration occurs during device creation, which is
early enough that, during live migration, you end up with duplicate
MAC addresses on still-running source and target devices, even though
the target device isn't actually being used yet.
This patch proposes to defer MAC registration until right before
the guest can actually use the device -- In other words, right
before starting guest CPUs.

Signed-off-by: Matthew Rosato <mjrosato <at> linux.vnet.ibm.com>
---

Associated BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1081461

Changes for v3:
 * Some minor formatting fixes.
 * in qemuNetworkIfaceConnect, set VIR_NETDEV_TAP_CREATE_IFUP 
   unconditionally.
 * in qemuDomainAttachNetDevice, call qemuInterfaceStartDevice only for 
   VIR_DOMAIN_NET_TYPE_DIRECT, _BRIDGE and _NETWORK. 
 * in qemuProcessStartCPUs, use 'reason' to determine whether or not 
   qemuInterfaceStartDevices needs to be called.  Basically, it needs 
   to be called for any reason that the system would be initializing 
   (or re-initializing).

 src/Makefile.am             |    3 +-
 src/conf/domain_conf.h      |    2 ++
 src/lxc/lxc_process.c       |    4 ++-
 src/qemu/qemu_command.c     |    3 ++
 src/qemu/qemu_hotplug.c     |    8 +++++
 src/qemu/qemu_interface.c   |   78 +++++++++++++++++++++++++++++++++++++++++++
(Continue reading)

Michal Privoznik | 16 Sep 15:44 2014
Picon

[libvirt] [PATCH] domaincaps: Expose UEFI capability

As of 542899168c38 we learned libvirt to use UEFI for domains.
However, management applications may firstly query if libvirt
supports it. And this is where virConnectGetDomainCapabilities()
API comes handy.

Signed-off-by: Michal Privoznik <mprivozn <at> redhat.com>
---
 docs/formatdomaincaps.html.in                      | 40 ++++++++++++++++++++++
 docs/schemas/domaincaps.rng                        | 21 ++++++++++++
 src/conf/domain_capabilities.c                     | 28 +++++++++++++++
 src/conf/domain_capabilities.h                     | 16 +++++++++
 src/qemu/qemu_capabilities.c                       | 38 ++++++++++++++++++++
 tests/domaincapsschemadata/domaincaps-basic.xml    |  1 +
 tests/domaincapsschemadata/domaincaps-full.xml     | 13 +++++++
 .../domaincaps-qemu_1.6.50-1.xml                   | 12 +++++++
 tests/domaincapstest.c                             |  8 +++++
 9 files changed, 177 insertions(+)

diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in
index 66b6017..34d746d 100644
--- a/docs/formatdomaincaps.html.in
+++ b/docs/formatdomaincaps.html.in
 <at>  <at>  -93,6 +93,46  <at>  <at> 
       <dd>The maximum number of supported virtual CPUs</dd>
     </dl>

+    <h3><a name="elementsOSBIOS">BIOS bootloader</a></h3>
+
+    <p>Sometimes users might want to tweak some BIOS knobs or use
+    UEFI. For cases like that, <a
(Continue reading)

Peter Krempa | 16 Sep 15:42 2014
Picon

[libvirt] [PATCH] qemu: time: Report errors if agent command fails

Commit b606bbb4 broke reporting of errors when setting of guest time
fails via the guest agent as the return value is not checked and later
overwritten by the return value qemuMonitorRTCResetReinjection();

Fix this by checking the return value before resetting the RTC
reinjection.
---
 src/qemu/qemu_driver.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 6008aeb..15ad64d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
 <at>  <at>  -17134,6 +17134,9  <at>  <at>  qemuDomainSetTime(virDomainPtr dom,
     rv = qemuAgentSetTime(priv->agent, seconds, nseconds, rtcSync);
     qemuDomainObjExitAgent(vm);

+    if (rv < 0)
+        goto endjob;
+
     if (!virDomainObjIsActive(vm)) {
         virReportError(VIR_ERR_OPERATION_INVALID,
                        "%s", _("domain is not running"));
--

-- 
2.1.0

James | 16 Sep 15:19 2014

[libvirt] [PATCH 0/3] maint: clean up of struct XXX

I find some struct XXX can be converted to typedefs. And I
clean them up.

James (3):
  maint: clean up _virDomainInterfaceStats
  maint: clean up _virDomainBlockStats
  maint: clean up _virDomainMemoryStat

 daemon/remote.c              | 2 +-
 src/driver.h                 | 6 +++---
 src/libvirt.c                | 6 +++---
 src/lxc/lxc_driver.c         | 8 ++++----
 src/openvz/openvz_driver.c   | 2 +-
 src/qemu/qemu_driver.c       | 6 +++---
 src/qemu/qemu_monitor_text.c | 2 +-
 src/remote/remote_driver.c   | 2 +-
 src/test/test_driver.c       | 4 ++--
 src/util/virstats.c          | 6 +++---
 src/util/virstats.h          | 2 +-
 src/xen/block_stats.c        | 4 ++--
 src/xen/block_stats.h        | 2 +-
 src/xen/xen_driver.c         | 4 ++--
 src/xen/xen_hypervisor.c     | 4 ++--
 src/xen/xen_hypervisor.h     | 4 ++--
 tools/virsh-domain-monitor.c | 6 +++---
 17 files changed, 35 insertions(+), 35 deletions(-)

--

-- 
1.7.12.4

(Continue reading)

Peter Krempa | 16 Sep 13:35 2014
Picon

[libvirt] [PATCH] util: storage: Copy driver type when initializing chain element

virStorageSourceInitChainElement initializes a new storage chain element
for use as a new disk source. If the new element doesn't contain the
driver name, copy it from the old source.

This fixes issue where a disk would forget the driver after a snapshot.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140984
---
 src/util/virstoragefile.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 13056a7..960aa23 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
 <at>  <at>  -1927,6 +1927,10  <at>  <at>  virStorageSourceInitChainElement(virStorageSourcePtr newelem,
         virStorageSourceSeclabelsCopy(newelem, old) < 0)
         goto cleanup;

+    if (!newelem->driverName &&
+        VIR_STRDUP(newelem->driverName, old->driverName) < 0)
+        goto cleanup;
+
     newelem->shared = old->shared;
     newelem->readonly = old->readonly;

--

-- 
2.1.0

(Continue reading)

Martin Kletzander | 16 Sep 11:16 2014
Picon

[libvirt] [PATCH v2] rpc: make daemon spawning a bit more intelligent

This way it behaves more like the daemon itself does (acquiring a
pidfile, deleting the socket before binding, etc.).

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=927369
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1138604

Signed-off-by: Martin Kletzander <mkletzan <at> redhat.com>
---
 src/rpc/virnetsocket.c | 65 +++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 57 insertions(+), 8 deletions(-)

diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index 80aeddf..7be1492 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
 <at>  <at>  -51,9 +51,11  <at>  <at> 
 #include "virlog.h"
 #include "virfile.h"
 #include "virthread.h"
+#include "virpidfile.h"
 #include "virprobe.h"
 #include "virprocess.h"
 #include "virstring.h"
+#include "dirname.h"
 #include "passfd.h"

 #if WITH_SSH2
 <at>  <at>  -541,7 +543,10  <at>  <at>  int virNetSocketNewConnectUNIX(const char *path,
                                const char *binary,
                                virNetSocketPtr *retsock)
(Continue reading)

Erik Skultety | 16 Sep 10:06 2014
Picon

[libvirt] [PATCHv2] network: check negative values in bridge queues

We already are checking for negative value, reporting an error, but
using wrong function and the check only succeeds when a value that
cannot be converted to number successfully is encountered. This patch
provides just a minor change in call of the right version
of function virStrToLong.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1138539
---
 src/conf/domain_conf.c                             |  2 +-
 .../qemuxml2argv-vhost_queues-invalid.xml          | 32 ++++++++++++++++++++++
 tests/qemuxml2argvtest.c                           |  1 +
 3 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-vhost_queues-invalid.xml

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 9cb3ebd..694c6cb 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
 <at>  <at>  -7377,7 +7377,7  <at>  <at>  virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
         }
         if (queues) {
             unsigned int q;
-            if (virStrToLong_ui(queues, NULL, 10, &q) < 0) {
+            if (virStrToLong_uip(queues, NULL, 10, &q) < 0) {
                 virReportError(VIR_ERR_XML_DETAIL,
                                _("'queues' attribute must be positive number: %s"),
                                queues);
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-vhost_queues-invalid.xml b/tests/qemuxml2argvdata/qemuxml2argv-vhost_queues-invalid.xml
new file mode 100644
index 0000000..300695a
(Continue reading)

Chunyan Liu | 16 Sep 09:38 2014

[libvirt] [PATCH V2] libxl: support hvm direct kernel boot

Xen libxl can support Xen HVM direct kernel boot now. To support
Xen HVM direct kernel boot in libvirt, it still needs some changes
to libvirt code: accept HVM direct kernel boot related configuration
in xml, parse those info into virDomainDefPtr, and fill in related
parts of libxl_domain_build_info, so that libxl can handle. This
patch is just to do this.

Signed-off-by: Chunyan Liu <cyliu <at> suse.com>
---
Changes:
  - fix Jim's comments

 src/libxl/libxl_conf.c     | 18 +++++++++++++++
 src/xenconfig/xen_common.c | 57 ++++++++++++++++++++++++++++++++++------------
 2 files changed, 60 insertions(+), 15 deletions(-)

diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index acba69c..a5bda64 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
 <at>  <at>  -704,6 +704,15  <at>  <at>  libxlMakeDomBuildInfo(virDomainDefPtr def,
         if (VIR_STRDUP(b_info->u.hvm.boot, bootorder) < 0)
             goto error;

+#ifdef LIBXL_HAVE_BUILDINFO_KERNEL
+        if (VIR_STRDUP(b_info->cmdline, def->os.cmdline) < 0)
+            goto error;
+        if (VIR_STRDUP(b_info->kernel, def->os.kernel) < 0)
+            goto error;
+        if (VIR_STRDUP(b_info->ramdisk, def->os.initrd) < 0)
(Continue reading)

Shanzhi Yu | 16 Sep 07:06 2014
Picon

[libvirt] [PATCH] qemu: add capability probing for block-stream

Since block-stream is not supported on qemu-kvm, so libvirt should
post more accurate error info when do blockpull with qemu-kvm but
not "Command 'block-stream' is not found"

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140981
Signed-off-by: Shanzhi Yu <shyu <at> redhat.com>
---
 src/qemu/qemu_capabilities.c |  2 ++
 src/qemu/qemu_capabilities.h |  1 +
 src/qemu/qemu_driver.c       | 13 +++++--------
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 81ada48..5674f4f 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
 <at>  <at>  -269,6 +269,7  <at>  <at>  VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,

               "splash-timeout", /* 175 */
               "iothread",
+              "block-stream",
     );

 
 <at>  <at>  -1426,6 +1427,7  <at>  <at>  struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
     { "query-spice", QEMU_CAPS_SPICE },
     { "query-kvm", QEMU_CAPS_KVM },
     { "block-commit", QEMU_CAPS_BLOCK_COMMIT },
+    { "block-stream", QEMU_CAPS_BLOCK_STREAM },
     { "query-vnc", QEMU_CAPS_VNC },
(Continue reading)

Hongbin Lu | 16 Sep 04:22 2014
Picon

[libvirt] [PATCH] openvz: fixed two memory leaks on migration code

---
 src/openvz/openvz_driver.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 57b3c22..3147311 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
 <at>  <at>  -2364,7 +2364,10  <at>  <at>  openvzDomainMigratePrepare3Params(virConnectPtr dconn,
     }

  done:
-    virURIFree(uri);
+    if (!uri_in)
+        VIR_FREE(hostname);
+    else
+        virURIFree(uri);
     if (vm)
         virObjectUnlock(vm);
     return ret;
 <at>  <at>  -2385,7 +2388,7  <at>  <at>  openvzDomainMigratePerform3Params(virDomainPtr domain,
     virDomainObjPtr vm = NULL;
     const char *uri_str = NULL;
     virURIPtr uri = NULL;
-    virCommandPtr cmd = virCommandNew(VZMIGRATE);
+    virCommandPtr cmd = NULL;
     int ret = -1;

     virCheckFlags(OPENVZ_MIGRATION_FLAGS, -1);
 <at>  <at>  -2412,6 +2415,7  <at>  <at>  openvzDomainMigratePerform3Params(virDomainPtr domain,
(Continue reading)


Gmane