Yohan BELLEGUIC | 18 Apr 11:51 2014
Picon

[libvirt] [PATCH v7 0/4] Handling of undefine and re define snapshots with VirtualBox 4.2 or higher

Hello,

This is a new series of patches in order to support undefining and redefining 
snapshots with VirtualBox 4.2 or higher.
These patches are based on Manuel Vives' patches, taking into account Daniel 
P. Berrange's remarks.

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 made to emulate these
behaviours by manipulating directly the .vbox XML files.

The first patch adds extra details in the snapshot XML returned by libvirt. We 
will need those details in order to redefine the snapshots.

The second patch adds a new API to manipulate the VirtualBox XML file. It 
provides several structs describing the VirtualBox XML file nodes and 
functions which can manipulate these structs.

The third patch adds support of the VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE 
and VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT flags in virDomainSnapshotCreateXML.
The idea is to unregister the machine, add the snapshot in the Virtualbox XML 
file and re-register the machine.
However, VirtualBox forbids a machine to have snapshots but no current 
snapshot. So, if the real current snapshot has not been redefined yet, we 
create fake disks, allowing us to have an intermediate state in order to not 
corrupt the snapshot's read-write disks. These fake disks will be deleted during the 
next redefine.

(Continue reading)

Li Yang | 18 Apr 10:27 2014

[libvirt] [PATCH] virsh: Separate 'create'/'modify' message for secret-define

The current message of secret-define always be:
Secret 09a9736f-eedb-449c-9983-80d0ab67393f created

even you just modify the secret, perhaps this may puzzle
uses. Now this patch make the modify action output message
like this:
Secret f2d1bafc-ac58-4a47-93e4-47723686fef5 modified

Signed-off-by: Li Yang <liyang.fnst <at> cn.fujitsu.com>
---
 tools/virsh-secret.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c
index 10d5db3..d1cbe04 100644
--- a/tools/virsh-secret.c
+++ b/tools/virsh-secret.c
 <at>  <at>  -39,6 +39,7  <at>  <at> 
 #include "virutil.h"
 #include "virxml.h"
 #include "conf/secret_conf.h"
+#include "viruuid.h"

 static virSecretPtr
 vshCommandOptSecret(vshControl *ctl, const vshCmd *cmd, const char **name)
 <at>  <at>  -96,6 +97,7  <at>  <at>  cmdSecretDefine(vshControl *ctl, const vshCmd *cmd)
     char *buffer;
     virSecretPtr res;
     char uuid[VIR_UUID_STRING_BUFLEN];
+    virSecretDefPtr new_attrs;
(Continue reading)

Nehal J Wani | 18 Apr 01:15 2014
Picon

[libvirt] [PATCH] Fix Memory Leak in virStorageFileGetMetadataRecurse()

While running virstoragetest, valgrind pointed out the following
memory leak:

==8142== 2 bytes in 1 blocks are definitely lost in loss record 1 of 92
==8142==    at 0x4A069EE: malloc (vg_replace_malloc.c:270)
==8142==    by 0x4E7B53E: mdir_name (dirname-lgpl.c:78)
==8142==    by 0x4CBE2B0: virStorageFileGetMetadataInternal (virstoragefile.c:595)
==8142==    by 0x4CBE651: virStorageFileGetMetadataFromFDInternal (virstoragefile.c:1086)
==8142==    by 0x4CBEEB4: virStorageFileGetMetadataRecurse (virstoragefile.c:1175)
==8142==    by 0x4CBF1DE: virStorageFileGetMetadata (virstoragefile.c:1270)
==8142==    by 0x4028AD: testStorageChain (virstoragetest.c:275)
==8142==    by 0x407B91: virtTestRun (testutils.c:201)
==8142==    by 0x4039D7: mymain (virstoragetest.c:534)
==8142==    by 0x40830D: virtTestMain (testutils.c:789)
==8142==    by 0x3E6CE1ED1C: (below main) (libc-start.c:226)

...62 times

---
 src/util/virstoragefile.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index ea80c1d..73cfef0 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
 <at>  <at>  -1213,6 +1213,7  <at>  <at>  virStorageFileGetMetadataRecurse(const char *path, const char *canonPath,
             meta->backingMeta = backing;
         }
     }
(Continue reading)

Ján Tomko | 17 Apr 16:57 2014
Picon

[libvirt] [PATCH] Only set QEMU_CAPS_NO_HPET on x86

QEMU only supports it on x86, but we've been assuming it for
all QEMUs when doing QMP capability detection.

https://bugzilla.redhat.com/show_bug.cgi?id=1066145
---
 src/qemu/qemu_capabilities.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 381b3ec..60b56fc 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
 <at>  <at>  -2888,7 +2888,6  <at>  <at>  virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps)
     virQEMUCapsSet(qemuCaps, QEMU_CAPS_NETDEV);
     virQEMUCapsSet(qemuCaps, QEMU_CAPS_RTC);
     virQEMUCapsSet(qemuCaps, QEMU_CAPS_VHOST_NET);
-    virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_HPET);
     virQEMUCapsSet(qemuCaps, QEMU_CAPS_NODEFCONFIG);
     virQEMUCapsSet(qemuCaps, QEMU_CAPS_BOOT_MENU);
     virQEMUCapsSet(qemuCaps, QEMU_CAPS_FSDEV);
 <at>  <at>  -2947,6 +2946,7  <at>  <at>  virQEMUCapsInitArchQMPBasic(virQEMUCapsPtr qemuCaps,
         qemuCaps->arch == VIR_ARCH_I686) {
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_ACPI);
+        virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_HPET);
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_KVM_PIT);
     }

--

-- 
1.8.3.2
(Continue reading)

Ján Tomko | 17 Apr 16:56 2014
Picon

[libvirt] [PATCH] Remove QEMU_CAPS_MACHINE_USB_OPT from ComputeCmdFlags

The version check is for >1.3.0, but ComputeCmdFlags
is only called for QEMU older than 1.2.0.
---
 src/qemu/qemu_capabilities.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 381b3ec..5814c7c 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
 <at>  <at>  -1143,10 +1143,6  <at>  <at>  virQEMUCapsComputeCmdFlags(const char *help,
     if (strstr(help, "-machine"))
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_OPT);

-     /* USB option is supported v1.3.0 onwards */
-    if (qemuCaps->version >= 1003000)
-        virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_USB_OPT);
-
     /*
      * Handling of -incoming arg with varying features
      *  -incoming tcp    (kvm >= 79, qemu >= 0.10.0)
--

-- 
1.8.3.2

Laine Stump | 17 Apr 15:53 2014

[libvirt] [PATCH] docs: document that vfio is default for hostdev networks too

When the default was changed from kvm to vfio, the documentation for
hostdev and interface was changed, but the documentation in <network>
was forgotten.
---
 docs/formatnetwork.html.in | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in
index fc56b42..aeafbd9 100644
--- a/docs/formatnetwork.html.in
+++ b/docs/formatnetwork.html.in
 <at>  <at>  -282,16 +282,19  <at>  <at> 
             definition. <span class="since"> Since 0.10.0</span>

             <p>
-              To use VFIO device assignment rather than
-              traditional/legacy KVM device assignment (VFIO is a new
-              method of device assignment that is compatible with UEFI
-              Secure Boot), a &lt;forward type='hostdev'&gt; interface
-              can have an optional <code>driver</code> sub-element
-              with a <code>name</code> attribute set to "vfio". To use
-              legacy KVM device assignment you can
-              set <code>name</code> to "kvm" (or simply omit the
-              &lt;driver&gt; element, since "kvm" is currently the
-              default).
+              To force use of a particular type of device assignment,
+              a &lt;forward type='hostdev'&gt; interface can have an
+              optional <code>driver</code> sub-element with
+              a <code>name</code> attribute set to either "vfio" (VFIO
+              is a new method of device assignment that is compatible
(Continue reading)

Laine Stump | 17 Apr 13:43 2014

[libvirt] [PATCHv2 0/4] network: fix active status & usage of inactive networks

The original patch series is here:

  https://www.redhat.com/archives/libvir-list/2014-April/msg00454.html

This repost addresses problems pointed out by John Ferlan in his
review (and other things that I thought better of during the
revisions).

All 4 patches are required to address

  https://bugzilla.redhat.com/show_bug.cgi?id=880483

The reported problem is that an interface using a currently-inactive
macvtap/hostdev network can be attached to a domain (addressed by
4/4). In order to make fixing that problem less, well, problematic,
the automatic inactivation of all macvtap/hostdev networks any time
libvirtd is restart must be addressed, and that is done in 1/4-3/4.

Part of fixing the latter problem is changing the network driver to
use /var/run for its status XML rather than /var/lib (2/4), which
could cause problems during upgrade (also addressed in 2/4) and in a
more limited sense downgrade (see the comments in 2/4 for why I
decided to not address those problems).

Laine Stump (4):
  network: create statedir during driver initialization
  network: change location of network state xml files
  network: set macvtap/hostdev networks active if their state file
    exists
  network: centralize check for active network during interface attach
(Continue reading)

Martin Kletzander | 17 Apr 12:20 2014
Picon

[libvirt] [PATCH] qemu: don't check for backing chains for formats w/o snapshot support

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1019926
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=868673

Signed-off-by: Martin Kletzander <mkletzan <at> redhat.com>
---
 src/libvirt_private.syms  |  2 +-
 src/qemu/qemu_domain.c    |  3 +++
 src/util/virstoragefile.c | 15 +++++++++++++++
 src/util/virstoragefile.h |  2 ++
 4 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 0e81f2f..42c0185 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
 <at>  <at>  -1834,6 +1834,7  <at>  <at>  virStorageFileIsClusterFS;
 virStorageFileProbeFormat;
 virStorageFileProbeFormatFromBuf;
 virStorageFileResize;
+virStorageFormatMaySupportSnapshots;
 virStorageIsFile;
 virStorageNetHostDefClear;
 virStorageNetHostDefCopy;
 <at>  <at>  -1850,7 +1851,6  <at>  <at>  virStorageSourcePoolModeTypeToString;
 virStorageTypeFromString;
 virStorageTypeToString;

-
 # util/virstring.h
 virArgvToString;
(Continue reading)

Tian, Shuangtai | 17 Apr 11:51 2014
Picon

[libvirt] libvirt-libxl driver defaulting to tap disk and not working (ubuntu 12.10 + xen 4.5 + libvirt 1.2.3 + openstack)

HI

I am an openstacker, when I used the latest libvirt and xen code to run the openstack. Can not create the vm.

there is an error in libxl log, you can see the log:

Os : Ubuntu 12.10

 

Compiled against library: libvirt 1.2.3

Using library: libvirt 1.2.3

Using API: Xen 1.2.3

Running hypervisor: Xen 4.5.0

 

libxl: debug: libxl_create.c:1356:do_domain_create: ao 0x7f7894002810: create: how=(nil) callback=(nil) poller=0x7f7894001bb0

libxl: debug: libxl_device.c:251:libxl__device_disk_set_backend: Disk vdev=xvda spec.backend=tap

libxl: debug: libxl_device.c:210:disk_try_backend: Disk vdev=xvda, backend tap unsuitable because blktap not available

libxl: error: libxl_device.c:289:libxl__device_disk_set_backend: no suitable backend for disk xvda

libxl: debug: libxl_event.c:1739:libxl__ao_complete: ao 0x7f7894002810: complete, rc=-3

libxl: debug: libxl_create.c:1370:do_domain_create: ao 0x7f7894002810: inprogress: poller=0x7f7894001bb0, flags=ic

libxl: debug: libxl_event.c:1711:libxl__ao__destroy: ao 0x7f7894002810: destroy

 

The blktap does work, and I also find the same error someone has posted, (http://www.redhat.com/archives/libvir-list/2013-February/msg01124.html)

When I change the type to “phy”, it also doesnot work. And try to change the type to other options, also does not work.

Can someone give me some suggestions?

Thanks !

 

The XML from the openstack is :

<domain type="xen">

  <uuid>9e9ed86c-8892-40da-acd1-31ec6303abfe</uuid>

  <name>instance-00000001</name>

  <memory>524288</memory>

  <vcpu>1</vcpu>

  <os>

    <type>xen</type>

    <kernel>/opt/stack/data/nova/instances/9e9ed86c-8892-40da-acd1-31ec6303abfe/kernel</kernel>

    <initrd>/opt/stack/data/nova/instances/9e9ed86c-8892-40da-acd1-31ec6303abfe/ramdisk</initrd>

    <cmdline>ro root=/dev/xvda</cmdline>

  </os>

  <features>

   <acpi/>

    <apic/>

  </features>

  <clock offset="utc"/>

  <devices>

    <disk type="file" device="disk">

      <driver name="tap2" type="raw" cache="none"/>

      <source file="/opt/stack/data/nova/instances/9e9ed86c-8892-40da-acd1-31ec6303abfe/disk"/>

      <target bus="xen" dev="xvda"/>

    </disk>

    <disk type="file" device="cdrom">

      <driver name="tap2" type="raw" cache="none"/>

      <source file="/opt/stack/data/nova/instances/9e9ed86c-8892-40da-acd1-31ec6303abfe/disk.config"/>

      <target bus="ide" dev="xvdd"/>

    </disk>

    <interface type="bridge">

      <mac address="fa:16:3e:d8:c3:c0"/>

      <source bridge="br100"/>

      <filterref filter="nova-instance-instance-00000001-fa163ed8c3c0"/>

    </interface>

    <console type="pty"/>

    <graphics type="vnc" autoport="yes" keymap="en-us" listen="127.0.0.1"/>

    <video>

      <model type="xen"/>

    </video>

  </devices>

</domain>

 

 

 

Best regards,

Tian, Shuangtai

 

<div>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">HI<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">I am an openstacker, when I used the latest libvirt and xen code to run the openstack. Can not create the vm.
<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">there is an error in libxl log, you can see the log:<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">Os : Ubuntu 12.10 <p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">Compiled against library: libvirt 1.2.3<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">Using library: libvirt 1.2.3<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">Using API: Xen 1.2.3<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">Running hypervisor: Xen 4.5.0<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">libxl: debug: libxl_create.c:1356:do_domain_create: ao 0x7f7894002810: create: how=(nil) callback=(nil) poller=0x7f7894001bb0<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">libxl: debug: libxl_device.c:251:libxl__device_disk_set_backend: Disk vdev=xvda spec.backend=tap<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">libxl: debug: libxl_device.c:210:disk_try_backend: Disk vdev=xvda, backend tap unsuitable because blktap not available<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">libxl: error: libxl_device.c:289:libxl__device_disk_set_backend: no suitable backend for disk xvda<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">libxl: debug: libxl_event.c:1739:libxl__ao_complete: ao 0x7f7894002810: complete, rc=-3<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">libxl: debug: libxl_create.c:1370:do_domain_create: ao 0x7f7894002810: inprogress: poller=0x7f7894001bb0, flags=ic<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">libxl: debug: libxl_event.c:1711:libxl__ao__destroy: ao 0x7f7894002810: destroy<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">The blktap does work, and I also find the same error someone has posted, (<a href="http://www.redhat.com/archives/libvir-list/2013-February/msg01124.html">http://www.redhat.com/archives/libvir-list/2013-February/msg01124.html</a>)
<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">When I change the type to &ldquo;phy&rdquo;, it also doesnot work. And try to change the type to other options, also does not work.<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">Can someone give me some suggestions?<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks !<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">The XML from the openstack is :<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&lt;domain type="xen"&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp; &lt;uuid&gt;9e9ed86c-8892-40da-acd1-31ec6303abfe&lt;/uuid&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp; &lt;name&gt;instance-00000001&lt;/name&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp; &lt;memory&gt;524288&lt;/memory&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp; &lt;vcpu&gt;1&lt;/vcpu&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp; &lt;os&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;type&gt;xen&lt;/type&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;kernel&gt;/opt/stack/data/nova/instances/9e9ed86c-8892-40da-acd1-31ec6303abfe/kernel&lt;/kernel&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;initrd&gt;/opt/stack/data/nova/instances/9e9ed86c-8892-40da-acd1-31ec6303abfe/ramdisk&lt;/initrd&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;cmdline&gt;ro root=/dev/xvda&lt;/cmdline&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp; &lt;/os&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp; &lt;features&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&lt;acpi/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;apic/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp; &lt;/features&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp; &lt;clock offset="utc"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp; &lt;devices&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;disk type="file" device="disk"&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;driver name="tap2" type="raw" cache="none"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;source file="/opt/stack/data/nova/instances/9e9ed86c-8892-40da-acd1-31ec6303abfe/disk"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;target bus="xen" dev="xvda"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;/disk&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;disk type="file" device="cdrom"&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;driver name="tap2" type="raw" cache="none"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;source file="/opt/stack/data/nova/instances/9e9ed86c-8892-40da-acd1-31ec6303abfe/disk.config"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;target bus="ide" dev="xvdd"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;/disk&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;interface type="bridge"&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mac address="fa:16:3e:d8:c3:c0"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;source bridge="br100"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;filterref filter="nova-instance-instance-00000001-fa163ed8c3c0"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;/interface&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;console type="pty"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;graphics type="vnc" autoport="yes" keymap="en-us" listen="127.0.0.1"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;video&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;model type="xen"/&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; &lt;/video&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp; &lt;/devices&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&lt;/domain&gt;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal" align="left"><span lang="EN-US">Best regards,<p></p></span></p>
<p class="MsoNormal" align="left"><span lang="EN-US">Tian, Shuangtai
</span><span lang="EN-US"><p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
</div>
</div>
vikhyath reddy | 17 Apr 01:51 2014
Picon

Re: [libvirt] libvirt Hyper-v 2012 r2 fix

Bringing the discussion back online...

Okay so figured out what was going on (to see what the actual error was, please read the latest email in the conversation). Classes in hyperv/hyperv_wmi_generator.input

a) Msvm_MemorySettingData
b) Msvm_ProcessorSettingData
c) Msvm_VirtualSystemSettingData

Have been upgraded to the definitions found at the new v2 doc http://msdn.microsoft.com/en-us/library/hh850176(v=vs.85).aspx

I put in this note at the beginning of the hyperv/hyperv_wmi_generator.input file.

With these changes and a few other minor ones, I can confirm that the functionality mimics the hyperv 2008 version. That is, we get the same functionality (supported vs non-supported drivers). 

However, this might also mean the end of support of Hyper-V 2008 if it is just a replace of the existing classes. What do you guys think? Should we continue to support 2008 (~6 years old) OR is it OK to assume that Hyperv-V 2012 will be the default standard moving forward.

Thanks,
Vik.


On Wed, Apr 16, 2014 at 10:23 AM, vikhyath reddy <reddy.vikhyath <at> gmail.com> wrote:
Taking this offline...

Hi Matthias,

Well... from more testing what I found is that openwsman breaks during serialization.

When I run against hyper-v 2012 r2

---------------------------------------------

virsh # list --all

1984  testing-1                      running

---------------------------------------------

virsh # dumpxml testing-1

2014-04-16 16:53:54.049+0000: 10693: info : libvirt version: 1.2.3

2014-04-16 16:53:54.049+0000: 10693: error : hypervDebugHandler:1403 : openwsman error: not enough (0 < 1) instances of element SystemName

2014-04-16 16:53:54.049+0000: 10693: error : hypervDebugHandler:1403 : openwsman error: handling of element "SystemName" failed = -3

2014-04-16 16:53:54.049+0000: 10693: error : hypervDebugHandler:1403 : openwsman error: size of 1 structures "Msvm_VirtualSystemSettingData" exceeds stopper (0x7fb86a4c5d18 > (nil))

2014-04-16 16:53:54.049+0000: 10693: error : hypervDebugHandler:1403 : openwsman error: Error during serialization

error: internal error: Could not deserialize pull response item

-------------------------------------------------

I was also looking at http://www.redhat.com/archives/libvir-list/2011-July/msg00768.html and found that you submitted a patch. It looks like from class


class Msvm_VirtualSystemSettingData
property SystemName
is being returned NULL or is is non existent in the pull response. Any pointers as to how can I check what is being returned in the pull response (if any)?
Thanks!Vik.


On Wed, Apr 16, 2014 at 1:35 AM, Matthias Bolte <matthias.bolte <at> googlemail.com> wrote:
2014-04-16 3:26 GMT+02:00 vikhyath reddy <reddy.vikhyath <at> gmail.com>:
> Update,
>
> I tried adding root\virtualization\v2 to the namespace in libvirt source
> code for hyperv. I ran some tests and it seems to work. I get the same
> functionality (supported vs non-supported drivers) as hyper-v 2008.
>
> Do you guys want me to submit the patch? If yes, what all do I need to
> update to get the patch in?
>
> Thanks,
> Vik.
>
>
> On Tue, Apr 15, 2014 at 5:26 PM, vikhyath reddy <reddy.vikhyath <at> gmail.com>
> wrote:
>>
>> Hello everyone,
>>
>> Thanks for libvirt. I did see on the libvirt page that hyper-v 2008 is
>> supported (which it does). So I tried running it on Hyper-v 2012 r2 but
>> virsh fails to connect by an error that says
>>
>> "error: internal error: SOAP fault during enumeration: code 's:Sender',
>> subcode 'n:CannotProcessFilter', reason 'The data source could not process
>> the filter. The filter might be missing or it might be invalid. Change the
>> filter and try the request again.  ', detail '500The specified class does
>> not exist in the given namespace. HRESULT 0x8033801a0052150858778HRESULTThe
>> specified class does not exist in the given namespace. ' "
>>
>> Upon looking into the Hyper-v 2012 r2 server event logs, I found that this
>> is going on
>>
>> [ Source: WMI-Activity
>> Event ID: 5898
>> Microsoft-Windows-WMI-Activity/Operational ]
>>
>>
>> Id = {62D480B2-58EF-0000-E580-D462EF58CF01}; ClientMachine =
>> VIKHYPERV; User = VIKHYPERV\Administrator; ClientProcessId = 884;
>> Component = Unknown; Operation = Start IWbemServices::ExecQuery -
>> root\virtualization : select * from Msvm_ComputerSystem where
>> Description = "Microsoft Hosting Computer System" ; ResultCode =
>> 0x80041010; PossibleCause = Unknown
>>
>> Note that Msvm_ComputerSystem is missing in the namespace
>> root\virtualization. Upon further investigation, I found that the new
>> namespace where Msvm_ComputerSystem is located is at root\virtualization\v2
>>
>> Is (it possible?) there some way I can know where in the source code,
>> libvirt is specifying the namespace so that I can try patching it up and see
>> if it fixes things?
>>
>> Thanks for all your help,
>> Vik.

Yes, send a patch for this.

To get your patch in, you need to send it to this list for review.
After a successful review it'll be pushed to the git repo by someone
with commit access.

See http://libvirt.org/hacking.html for more details about working on
the source and submitting patches.

--
Matthias Bolte
http://photron.blogspot.com


<div><div dir="ltr">Bringing the discussion back online...<div><br></div>
<div>
<div class="gmail_extra">Okay so figured out what was going on (to see what the actual error was, please read the latest email in the conversation). Classes in hyperv/hyperv_wmi_generator.input</div>

<div class="gmail_extra"><br></div>
<div class="gmail_extra">a) Msvm_MemorySettingData</div>
<div class="gmail_extra">b) Msvm_ProcessorSettingData</div>
<div class="gmail_extra">c) Msvm_VirtualSystemSettingData</div>
<div class="gmail_extra">

<br>
</div>
<div class="gmail_extra">Have been upgraded to the definitions found at the new v2 doc&nbsp;<a href="http://msdn.microsoft.com/en-us/library/hh850176(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/hh850176(v=vs.85).aspx</a>,&nbsp;</div>

<div class="gmail_extra"><br></div>
<div class="gmail_extra">I put in this note at the beginning of the hyperv/hyperv_wmi_generator.input file.</div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra">With these changes and a few other minor ones, I can confirm that the functionality mimics the hyperv 2008 version. That is, we get the same functionality (supported vs non-supported drivers).&nbsp;</div>

<div class="gmail_extra"><br></div>
<div class="gmail_extra">However, this might also mean the end of support of Hyper-V 2008 if it is just a replace of the existing classes. What do you guys think? Should we continue to support 2008 (~6 years old) OR is it OK to assume that Hyperv-V 2012 will be the default standard moving forward.</div>

</div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra">Thanks,</div>
<div class="gmail_extra">Vik.</div>
<div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Apr 16, 2014 at 10:23 AM, vikhyath reddy <span dir="ltr">&lt;<a href="mailto:reddy.vikhyath <at> gmail.com" target="_blank">reddy.vikhyath <at> gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
<div dir="ltr">Taking this offline...<div><br></div>
<div>Hi Matthias,</div>
<div><br></div>
<div>Well... from more testing what I found is that openwsman breaks during serialization.</div>

<div><br></div>
<div>When I run against hyper-v 2012 r2</div>

<div>

<p>---------------------------------------------</p>
<p>virsh # list --all</p>
<p>1984&nbsp;&nbsp;testing-1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;running<br></p>
</div>
<div>---------------------------------------------</div>
<div><br></div>
<div>

virsh # dumpxml testing-1</div>
<div>

<p>2014-04-16 16:53:54.049+0000: 10693: info : libvirt version: 1.2.3</p>
<p>2014-04-16 16:53:54.049+0000: 10693: error : hypervDebugHandler:1403 : openwsman error: not enough (0 &lt; 1) instances of element SystemName</p>
<p>2014-04-16 16:53:54.049+0000: 10693: error : hypervDebugHandler:1403 : openwsman error: handling of element "SystemName" failed = -3</p>
<p>2014-04-16 16:53:54.049+0000: 10693: error : hypervDebugHandler:1403 : openwsman error: size of 1 structures "Msvm_VirtualSystemSettingData" exceeds stopper (0x7fb86a4c5d18 &gt; (nil))</p>
<p>2014-04-16 16:53:54.049+0000: 10693: error : hypervDebugHandler:1403 : openwsman error: Error during serialization</p>
<p>error: internal error: Could not deserialize pull response item</p>
<p>-------------------------------------------------</p>
<p>I was also looking at&nbsp;<a href="http://www.redhat.com/archives/libvir-list/2011-July/msg00768.html" target="_blank">http://www.redhat.com/archives/libvir-list/2011-July/msg00768.html</a> and found that you submitted a patch. It looks like from class</p>

<p><br></p>class Msvm_VirtualSystemSettingData <br><span>property&nbsp;</span><span>SystemName</span>

<span><br></span><span>is being returned NULL or is is non existent in the pull response. Any pointers as to how can I check what is being returned in the pull response (if any)?</span>

<span><br></span><span>Thanks!</span><span>Vik.</span>
</div>
<div><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Apr 16, 2014 at 1:35 AM, Matthias Bolte <span dir="ltr">&lt;<a href="mailto:matthias.bolte <at> googlemail.com" target="_blank">matthias.bolte <at> googlemail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">2014-04-16 3:26 GMT+02:00 vikhyath reddy &lt;<a href="mailto:reddy.vikhyath <at> gmail.com" target="_blank">reddy.vikhyath <at> gmail.com</a>&gt;:<br><div><div>&gt; Update,<br>
&gt;<br>
&gt; I tried adding root\virtualization\v2 to the namespace in libvirt source<br>
&gt; code for hyperv. I ran some tests and it seems to work. I get the same<br>
&gt; functionality (supported vs non-supported drivers) as hyper-v 2008.<br>
&gt;<br>
&gt; Do you guys want me to submit the patch? If yes, what all do I need to<br>
&gt; update to get the patch in?<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Vik.<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Apr 15, 2014 at 5:26 PM, vikhyath reddy &lt;<a href="mailto:reddy.vikhyath <at> gmail.com" target="_blank">reddy.vikhyath <at> gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hello everyone,<br>
&gt;&gt;<br>
&gt;&gt; Thanks for libvirt. I did see on the libvirt page that hyper-v 2008 is<br>
&gt;&gt; supported (which it does). So I tried running it on Hyper-v 2012 r2 but<br>
&gt;&gt; virsh fails to connect by an error that says<br>
&gt;&gt;<br>
&gt;&gt; "error: internal error: SOAP fault during enumeration: code 's:Sender',<br>
&gt;&gt; subcode 'n:CannotProcessFilter', reason 'The data source could not process<br>
&gt;&gt; the filter. The filter might be missing or it might be invalid. Change the<br>
&gt;&gt; filter and try the request again. &nbsp;', detail '500The specified class does<br>
&gt;&gt; not exist in the given namespace. HRESULT 0x8033801a0052150858778HRESULTThe<br>
&gt;&gt; specified class does not exist in the given namespace. ' "<br>
&gt;&gt;<br>
&gt;&gt; Upon looking into the Hyper-v 2012 r2 server event logs, I found that this<br>
&gt;&gt; is going on<br>
&gt;&gt;<br>
&gt;&gt; [ Source: WMI-Activity<br>
&gt;&gt; Event ID: 5898<br>
&gt;&gt; Microsoft-Windows-WMI-Activity/Operational ]<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Id = {62D480B2-58EF-0000-E580-D462EF58CF01}; ClientMachine =<br>
&gt;&gt; VIKHYPERV; User = VIKHYPERV\Administrator; ClientProcessId = 884;<br>
&gt;&gt; Component = Unknown; Operation = Start IWbemServices::ExecQuery -<br>
&gt;&gt; root\virtualization : select * from Msvm_ComputerSystem where<br>
&gt;&gt; Description = "Microsoft Hosting Computer System" ; ResultCode =<br>
&gt;&gt; 0x80041010; PossibleCause = Unknown<br>
&gt;&gt;<br>
&gt;&gt; Note that Msvm_ComputerSystem is missing in the namespace<br>
&gt;&gt; root\virtualization. Upon further investigation, I found that the new<br>
&gt;&gt; namespace where Msvm_ComputerSystem is located is at root\virtualization\v2<br>
&gt;&gt;<br>
&gt;&gt; Is (it possible?) there some way I can know where in the source code,<br>
&gt;&gt; libvirt is specifying the namespace so that I can try patching it up and see<br>
&gt;&gt; if it fixes things?<br>
&gt;&gt;<br>
&gt;&gt; Thanks for all your help,<br>
&gt;&gt; Vik.<br><br>
</div></div>Yes, send a patch for this.<br><br>
To get your patch in, you need to send it to this list for review.<br>
After a successful review it'll be pushed to the git repo by someone<br>
with commit access.<br><br>
See <a href="http://libvirt.org/hacking.html" target="_blank">http://libvirt.org/hacking.html</a> for more details about working on<br>
the source and submitting patches.<br><span><br>
--<br>
Matthias Bolte<br><a href="http://photron.blogspot.com" target="_blank">http://photron.blogspot.com</a><br></span>
</blockquote>
</div>
<br>
</div></div></div>
</div>
</blockquote>
</div>
<br>
</div>
</div></div>
Stefan Berger | 16 Apr 23:54 2014
Picon

[libvirt] qemu: Unlock the NWFilter update lock by leaving via the cleanup label

Fix a locking problem by leaving the function via the cleanup label.

Signed-off-by: Stefan Berger <stefanb <at> linux.vnet.ibm.com>

---
  src/qemu/qemu_driver.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Index: libvirt-acl/src/qemu/qemu_driver.c
===================================================================
--- libvirt-acl.orig/src/qemu/qemu_driver.c
+++ libvirt-acl/src/qemu/qemu_driver.c
 <at>  <at>  -6140,7 +6140,7  <at>  <at>  qemuDomainCreateWithFlags(virDomainPtr d
      virNWFilterReadLockFilterUpdates();

      if (!(vm = qemuDomObjFromDomain(dom)))
-        return -1;
+        goto cleanup;

      if (virDomainCreateWithFlagsEnsureACL(dom->conn, vm->def) < 0)
          goto cleanup;


Gmane