Re: [libvirt] Attempting to pivot disk with incomplete mirror results in hang

2015-01-13 Thread Eric Blake
On 01/13/2015 12:43 PM, Scott Sullivan wrote: I have what appears to be a bug when pivoting a disk during a block copy that is not yet 100% finished, resulting in the pivot command hanging. I have verified this problem on libvirt 1.2.10. I couldn't reproduce with the latest libvirt. After

Re: [libvirt] [PATCH V4 1/3] Introduce support for parsing/formatting Xen xl config format

2015-01-13 Thread Eric Blake
On 01/13/2015 04:47 PM, Jim Fehlig wrote: +++ b/src/Makefile.am @@ -1005,6 +1005,10 @@ XENCONFIG_SOURCES = \ xenconfig/xen_common.c xenconfig/xen_common.h \ xenconfig/xen_sxpr.c xenconfig/xen_sxpr.h \

Re: [libvirt] [PATCH V4 2/3] tests: Tests for the xen-xl parser

2015-01-13 Thread Jim Fehlig
Eric Blake wrote: On 01/13/2015 08:53 AM, Jim Fehlig wrote: From: Kiarie Kahurani davidkiar...@gmail.com add tests for the xen_xl config parser Signed-off-by: Kiarie Kahurani davidkiar...@gmail.com Signed-off-by: Jim Fehlig jfeh...@suse.com --- V4: Only build xlconfigtest when libxl

[libvirt] [PATCH v2 2/4] conf: Allow UEFI and NVRAM format selection

2015-01-13 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1180955 Up till now, there was only one format for UEFI and NVRAM store file. However, it's possible to convert the files to qcow2 (which supports interesting features, like snapshotting, for instance). Therefore, we want to allow format selection

[libvirt] [PATCH v2 4/4] domaincaps: Expose UEFI and NVRAM store file format capabilities

2015-01-13 Thread Michal Privoznik
It would be nice if we expose the capability of choosing the UEFI and NVRAM store file format among with all the possibilities. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- docs/formatdomaincaps.html.in | 26 ++ docs/schemas/domaincaps.rng

Re: [libvirt] [PATCH 2/2] qemu, lxc: Fail explicitly if setting QoS on unsupported vNIC types

2015-01-13 Thread Michal Privoznik
On 13.01.2015 17:57, Eric Blake wrote: On 01/13/2015 09:26 AM, Laine Stump wrote: I do understand Michal's concern. In particular, the network hook script support was put in specifically to allow management apps to support bandwidth management on interface types that libvirt couldn't/didn't

[libvirt] [PATCH v2] qemu, lxc: Warn if setting QoS on unsupported vNIC types

2015-01-13 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1165993 So, there are still plenty of vNIC types that we don't know how to set bandwidth on. Let's warn explicitly in case user has requested it instead of pretending everything was set. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- Diff to

[libvirt] [PATCH v3 2/3] Add support for schema validation when passing in XML

2015-01-13 Thread Daniel P. Berrange
The virDomainDefineXMLFlags and virDomainCreateXML APIs both gain new flags allowing them to be told to validate XML. This updates all the drivers to turn on validation in the XML parser when the flags are set --- include/libvirt/libvirt-domain.h | 5 + src/bhyve/bhyve_driver.c | 16

[libvirt] [PATCH v3 3/3] virsh: add support for domain XML validation

2015-01-13 Thread Daniel P. Berrange
The 'virsh edit' command gets XML validation enabled by default, with a --skip-validate option to disable it. The 'virsh define' and 'virsh create' commands get a --validate option to enable it, to avoid regressions for existing scripts. The quality of error reporting from libxml2 varies

[libvirt] [PATCH v2 0/4] UEFI and NVRAM store file format

2015-01-13 Thread Michal Privoznik
diff to v1: -Laszlo's review worked in (notably, even UEFI can have a different format than raw) Michal Privoznik (4): conf: Make virDomainLoaderDefParseXML parse nvram/ too conf: Allow UEFI and NVRAM format selection qemu: Adapt to UEFI and NVRAM store file format change domaincaps:

[libvirt] [PATCH v2 3/4] qemu: Adapt to UEFI and NVRAM store file format change

2015-01-13 Thread Michal Privoznik
This basically implements the availability of choosing UEFI and NVRAM store file format in the qemu driver. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_command.c| 12 --- .../qemuxml2argv-bios-nvram-qcow2.args | 10 ++

[libvirt] [PATCH v2 1/4] conf: Make virDomainLoaderDefParseXML parse nvram/ too

2015-01-13 Thread Michal Privoznik
This is pure code movement without any functional change. The code simply reads better this way, that's all. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/conf/domain_conf.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git

[libvirt] [PATCH v3 1/3] Add virXMLValidateAgainstSchema helper method

2015-01-13 Thread Daniel P. Berrange
Add a helper method that can validate an XML document against an RNG schema --- include/libvirt/virterror.h | 1 + src/internal.h | 4 +++ src/libvirt_private.syms| 1 + src/util/virerror.c | 6 src/util/virxml.c | 79

[libvirt] [PATCH v3 0/3] Add schema validation for domain XML

2015-01-13 Thread Daniel P. Berrange
A followup to https://www.redhat.com/archives/libvir-list/2015-January/msg00203.html In this posting, the 3 remaining patches only are posted: - Catch errors parsing RNG schema - Use virFileFindResource for findning RNG - Don't enable validation by default in virsh define/create -

Re: [libvirt] [PATCH v2 2/4] conf: Allow UEFI and NVRAM format selection

2015-01-13 Thread Laszlo Ersek
On 01/13/15 18:20, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1180955 Up till now, there was only one format for UEFI and NVRAM store file. However, it's possible to convert the files to qcow2 (which supports interesting features, like snapshotting, for instance).

Re: [libvirt] [PATCH v2 3/4] qemu: Adapt to UEFI and NVRAM store file format change

2015-01-13 Thread Laszlo Ersek
On 01/13/15 18:20, Michal Privoznik wrote: This basically implements the availability of choosing UEFI and NVRAM store file format in the qemu driver. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_command.c| 12 ---

Re: [libvirt] [PATCH v2 1/4] conf: Make virDomainLoaderDefParseXML parse nvram/ too

2015-01-13 Thread Laszlo Ersek
On 01/13/15 19:47, Laszlo Ersek wrote: On 01/13/15 18:20, Michal Privoznik wrote: This is pure code movement without any functional change. The code simply reads better this way, that's all. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/conf/domain_conf.c | 23

Re: [libvirt] [PATCH v2] qemu, lxc: Warn if setting QoS on unsupported vNIC types

2015-01-13 Thread Eric Blake
On 01/13/2015 11:01 AM, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1165993 So, there are still plenty of vNIC types that we don't know how to set bandwidth on. Let's warn explicitly in case user has requested it instead of pretending everything was set.

Re: [libvirt] Attempting to pivot disk with incomplete mirror results in hang

2015-01-13 Thread Scott Sullivan
On 01/13/2015 02:43 PM, Scott Sullivan wrote: I have what appears to be a bug when pivoting a disk during a block copy that is not yet 100% finished, resulting in the pivot command hanging. I have verified this problem on libvirt 1.2.10. Here's what Im seeing (transient guest): 1.) Start

Re: [libvirt] Attempting to pivot disk with incomplete mirror results in hang

2015-01-13 Thread Eric Blake
On 01/13/2015 12:43 PM, Scott Sullivan wrote: I have what appears to be a bug when pivoting a disk during a block copy that is not yet 100% finished, resulting in the pivot command hanging. I have verified this problem on libvirt 1.2.10. Known issue:

[libvirt] [PATCH 1/3] util: Add virProcessSetScheduler() function for scheduler settings

2015-01-13 Thread Martin Kletzander
This function uses sched_setscheduler() function so it works with processes and threads as well (even threads not created by us, which is what we'll need in the future). Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/libvirt_private.syms | 1 + src/util/virprocess.c| 46

[libvirt] [PATCH 0/3] Support for per-thread scheduling settings

2015-01-13 Thread Martin Kletzander
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1178986 Martin Kletzander (3): util: Add virProcessSetScheduler() function for scheduler settings docs, schema, conf: Add support for setting scheduler parameters of guest threads qemu: Add support for setting vCPU and I/O thread

Re: [libvirt] [PATCH] qemu: forbid second blockcommit during active commit

2015-01-13 Thread Peter Krempa
On Mon, Jan 12, 2015 at 04:20:34PM -0700, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1135339 documents some confusing behavior when a user tries to start an inactive block commit in a second connection while there is already an on-going active commit from a first connection.

Re: [libvirt] [PATCH 1/5] add ploop fs driver type

2015-01-13 Thread Michal Privoznik
On 13.01.2015 09:43, Dmitry Guryanov wrote: On 01/12/2015 06:39 PM, Michal Privoznik wrote: On 26.12.2014 15:43, Dmitry Guryanov wrote: Ploop is a pseudo device which makes possible to access to an image in a file via block device, like loop devices, but with additional features: snapshots,

[libvirt] [PATCH 1/2] Introduce btrfsCloneFile for btrfs COW copy

2015-01-13 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- src/storage/storage_backend.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c index b990a82..5ce3566 100644 --- a/src/storage/storage_backend.c

[libvirt] [PATCH] conf: fix crash when hotplug a channel chr device with no target

2015-01-13 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1181408 when we try to hotplug a channel chr device with no target, we will get success(which should fail) in virDomainChrDefParseXML, because we use goto cleanup this place and return def.then cause a big problem in virDomainChrEquals(touch a shouldn't

Re: [libvirt] [PATCH 1/5] add ploop fs driver type

2015-01-13 Thread Dmitry Guryanov
On 01/12/2015 06:39 PM, Michal Privoznik wrote: On 26.12.2014 15:43, Dmitry Guryanov wrote: Ploop is a pseudo device which makes possible to access to an image in a file via block device, like loop devices, but with additional features: snapshots, write tracker and without double-caching. It

[libvirt] [PATCH 2/3] docs, schema, conf: Add support for setting scheduler parameters of guest threads

2015-01-13 Thread Martin Kletzander
In order for QEMU vCPU (and other) threads to run with RT scheduler, libvirt needs to take care of that so QEMU doesn't have to run privileged. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1178986 Signed-off-by: Martin Kletzander mklet...@redhat.com --- docs/formatdomain.html.in

[libvirt] [PATCH 2/2] storage: try to perform btrfs COW copy if possible

2015-01-13 Thread Chen Hanxiao
We don't take advantage of clone of btrfs. So a)try to do a btrfs lightweight copy b)fall back to a standard copy if COW copy not supported. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- include/libvirt/libvirt-storage.h | 1 + src/storage/storage_backend.c | 39

[libvirt] [PATCH 0/2] try to use btrfs COW copy

2015-01-13 Thread Chen Hanxiao
If VIR_STORAGE_VOL_CREATE_REFLINK is specified, try to use btrfs COW copy; If btrfs COW copy is not supported, fall back to normal copy. Chen Hanxiao (2): introduce btrfsCloneFile for COW copy storage: try to perform btrfs clone if possible include/libvirt/libvirt-storage.h | 1 +

Re: [libvirt] should active block commit ever be allowed to show 0 total progress?

2015-01-13 Thread Michal Privoznik
On 12.01.2015 23:31, Eric Blake wrote: I was trying to work on a libvirt bug, when I discovered the following: $ qemu-img create -f qcow2 a.qcow2 10M Formatting 'a.qcow2', fmt=qcow2 size=10485760 encryption=off cluster_size=65536 lazy_refcounts=off $ qemu-img create -f qcow2 \

Re: [libvirt] [PATCHv2 12/14] Exit early after domain crash in monitor in qemu_driver

2015-01-13 Thread John Ferlan
no commit message? On 01/07/2015 10:42 AM, Ján Tomko wrote: --- src/qemu/qemu_driver.c| 131 +- src/qemu/qemu_migration.c | 98 +++--- 2 files changed, 125 insertions(+), 104 deletions(-) Should qemu_migration

Re: [libvirt] [PATCH v2 10/11] Add support for schema validation when passing in XML

2015-01-13 Thread Jiri Denemark
On Thu, Jan 08, 2015 at 15:48:21 +, Daniel Berrange wrote: The virDomainDefineXMLFlags and virDomainCreateXML APIs both gain new flags allowing them to be told to validate XML. This updates all the drivers to turn on validation in the XML parser when the flags are set ... diff --git

Re: [libvirt] [PATCH v2 09/11] Give virDomainDef parser formatter their own flags

2015-01-13 Thread Daniel P. Berrange
On Tue, Jan 13, 2015 at 03:35:12PM +0100, Jiri Denemark wrote: On Tue, Jan 13, 2015 at 14:13:19 +, Daniel Berrange wrote: On Tue, Jan 13, 2015 at 03:05:48PM +0100, Jiri Denemark wrote: On Thu, Jan 08, 2015 at 15:48:20 +, Daniel Berrange wrote: The virDomainDefParse* and

Re: [libvirt] [PATCHv2 13/14] Exit early after domain crash in monitor on snapshots

2015-01-13 Thread John Ferlan
no commit message On 01/07/2015 10:42 AM, Ján Tomko wrote: --- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_driver.c | 18 ++ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 82d0c91..3d56eb8 100644 ---

Re: [libvirt] [PATCH 5/9] virstoragefile: Treat backingStore as a pointer or an array

2015-01-13 Thread Michal Privoznik
On 08.12.2014 19:31, Matthias Gatto wrote: As explain in the former patchs, backingStore can be treat an array or a pointer. If we have only one backingStore we have to use it as a normal ptr but if there is more backing store, we use it as a pointer's array. Because it would be complicated to

Re: [libvirt] [PATCHv7 1/4] domifaddr: Implement the public APIs

2015-01-13 Thread Daniel P. Berrange
On Wed, Dec 17, 2014 at 05:46:20AM +0530, Nehal J Wani wrote: Define helper function virDomainInterfaceFree, which allows the upper layer application to free the domain interface object conveniently. The API is going to provide multiple methods by flags, e.g. * Query guest agent *

Re: [libvirt] [PATCH v2 11/11] virsh: enable domain XML validation by default

2015-01-13 Thread Jiri Denemark
On Thu, Jan 08, 2015 at 15:48:22 +, Daniel Berrange wrote: The 'virsh define', 'virsh create' and 'virsh edit' commands get XML validation enabled by default, with a --skip-validate option to disable it. Hmm, I definitely agree with enabling validation for 'virsh edit', which is something

Re: [libvirt] [PATCH v2 09/11] Give virDomainDef parser formatter their own flags

2015-01-13 Thread Daniel P. Berrange
On Tue, Jan 13, 2015 at 03:05:48PM +0100, Jiri Denemark wrote: On Thu, Jan 08, 2015 at 15:48:20 +, Daniel Berrange wrote: The virDomainDefParse* and virDomainDefFormat* methods both accept the VIR_DOMAIN_XML_* flags defined in the public API, along with a set of other

Re: [libvirt] [PATCH 1/4] formatdomaincaps: Correctly format API reference

2015-01-13 Thread Laszlo Ersek
On 01/13/15 14:41, Michal Privoznik wrote: Well, since the link to the virConnectGetDomainCapabilities API is in pre/ section we must take special care about the spaces around the link. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- docs/formatdomaincaps.html.in | 4 +--- 1 file

Re: [libvirt] [PATCH 2/9] virstoragefile: Always use virStorageSourceGetBackingStore to get backing store

2015-01-13 Thread Michal Privoznik
On 08.12.2014 19:31, Matthias Gatto wrote: Uniformize backing store usage by calling virStorageSourceGetBackingStore instead of setting backing store manually. Signed-off-by: Matthias Gatto matthias.ga...@outscale.com --- src/conf/domain_conf.c| 7 ---

Re: [libvirt] [PATCH 6/9] virstoragefile: Add quorum in virstoragefile

2015-01-13 Thread Michal Privoznik
On 08.12.2014 19:31, Matthias Gatto wrote: Add VIR_STORAGE_TYPE_QUORUM in virStorageType. Add VIR_STORAGE_FILE_QUORUM in virStorageFileFormat. Add threshold value in _virStorageSource Signed-off-by: Matthias Gatto matthias.ga...@outscale.com --- src/conf/domain_conf.c| 2 ++

Re: [libvirt] [PATCH 7/9] domain_conf: Read and Write quorum config

2015-01-13 Thread Michal Privoznik
On 08.12.2014 19:31, Matthias Gatto wrote: Add the capabiltty to libvirt to parse and format the quorum syntax as described here: http://www.redhat.com/archives/libvir-list/2014-May/msg00533.html Signed-off-by: Matthias Gatto matthias.ga...@outscale.com --- src/conf/domain_conf.c | 165

Re: [libvirt] [PATCH 0/9] qemu: Add quorum support to libvirt

2015-01-13 Thread Michal Privoznik
On 08.12.2014 19:31, Matthias Gatto wrote: The purpose of these patches is to introduce quorum for libvirt I've try to follow this proposal: http://www.redhat.com/archives/libvir-list/2014-May/msg00533.html This feature ask for 6 task: 1) Allow a _virStorageSource to contain more than one

Re: [libvirt] [PATCH 2/4] conf: Allow UEFI NVRAM format selection

2015-01-13 Thread Laszlo Ersek
comments below On 01/13/15 14:41, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1180955 Up till now, there was only one format for NVRAM store file. However, it's possible to convert the file to qcow2 (which supports interesting features, like snapshotting, for

Re: [libvirt] [PATCHv7 3/4] domifaddr: Implement the API for qemu

2015-01-13 Thread Daniel P. Berrange
On Mon, Jan 05, 2015 at 10:54:35PM +0530, Nehal J Wani wrote: By querying the qemu guest agent with the QMP command guest-network-get-interfaces and converting the received JSON output to structured objects. Although ifconfig is deprecated, IP aliases created by ifconfig are supported by

Re: [libvirt] [PATCH v2 09/11] Give virDomainDef parser formatter their own flags

2015-01-13 Thread Jiri Denemark
On Thu, Jan 08, 2015 at 15:48:20 +, Daniel Berrange wrote: The virDomainDefParse* and virDomainDefFormat* methods both accept the VIR_DOMAIN_XML_* flags defined in the public API, along with a set of other VIR_DOMAIN_XML_INTERNAL_* flags defined in domain_conf.c. This is seriously

Re: [libvirt] [PATCH 3/3] qemu: Add support for setting vCPU and I/O thread scheduler setting

2015-01-13 Thread Martin Kletzander
On Tue, Jan 13, 2015 at 08:57:04AM +0100, Martin Kletzander wrote: Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1178986 Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/qemu/qemu_driver.c | 7 - src/qemu/qemu_process.c | 76

Re: [libvirt] [PATCHv2 14/14] Add ATTRIBUTE_RETURN_CHECK to qemuDomainObjExitMonitor

2015-01-13 Thread John Ferlan
On 01/07/2015 10:42 AM, Ján Tomko wrote: --- src/qemu/qemu_domain.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ACK John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 09/11] Give virDomainDef parser formatter their own flags

2015-01-13 Thread Jiri Denemark
On Tue, Jan 13, 2015 at 14:13:19 +, Daniel Berrange wrote: On Tue, Jan 13, 2015 at 03:05:48PM +0100, Jiri Denemark wrote: On Thu, Jan 08, 2015 at 15:48:20 +, Daniel Berrange wrote: The virDomainDefParse* and virDomainDefFormat* methods both accept the VIR_DOMAIN_XML_* flags

Re: [libvirt] [PATCH 4/9] virstoragefile: Always use virStorageSourceSetBackingStore to set backing store

2015-01-13 Thread Michal Privoznik
On 08.12.2014 19:31, Matthias Gatto wrote: Replace the parts of the code where a backing store is set manually with virStorageSourceSetBackingStore Signed-off-by: Matthias Gatto matthias.ga...@outscale.com --- src/conf/domain_conf.c | 2 +- src/qemu/qemu_domain.c | 1 -

Re: [libvirt] [PATCHv7 2/4] domifaddr: Implement the remote protocol

2015-01-13 Thread Daniel P. Berrange
On Wed, Dec 17, 2014 at 05:46:21AM +0530, Nehal J Wani wrote: daemon/remote.c * Define remoteSerializeDomainInterface, remoteDispatchDomainInterfaceAddresses src/remote/remote_driver.c * Define remoteDomainInterfaceAddresses src/remote/remote_protocol.x * New RPC procedure:

Re: [libvirt] [PATCH] conf: fix crash when hotplug a channel chr device with no target

2015-01-13 Thread Ján Tomko
On 01/13/2015 09:41 AM, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1181408 when we try to hotplug a channel chr device with no target, we will get success(which should fail) in virDomainChrDefParseXML, because we use goto cleanup this place and return def.then cause a

Re: [libvirt] [PATCH] conf: fix crash when hotplug a channel chr device with no target

2015-01-13 Thread lhuang
On 01/13/2015 05:34 PM, Ján Tomko wrote: On 01/13/2015 09:41 AM, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1181408 when we try to hotplug a channel chr device with no target, we will get success(which should fail) in virDomainChrDefParseXML, because we use goto cleanup

Re: [libvirt] [PATCH v2 04/11] Don't use VIR_DOMAIN_XML_SECURE when parsing XML

2015-01-13 Thread Jiri Denemark
On Thu, Jan 08, 2015 at 15:48:15 +, Daniel Berrange wrote: The VIR_DOMAIN_XML_SECURE flag only has effect on the formatting of XML so should not be passed to virDomainDefParseNode --- src/conf/snapshot_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [libvirt] [PATCH v2 07/11] parallels: don't override error message when XML parsing fails

2015-01-13 Thread Jiri Denemark
On Thu, Jan 08, 2015 at 15:48:18 +, Daniel Berrange wrote: The virDomainDefParseString method will report a suitable error on parsing fail, so don't replace that. --- src/parallels/parallels_driver.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[libvirt] [PATCH v2 3/5] parallels: commit with PVCF_DETACH_HDD_BUNDLE flag

2015-01-13 Thread Dmitry Guryanov
PCS removes disk image from filesystem, if you remove it from config. There is a special flag PVCF_DETACH_HDD_BUNDLE which allow to remove disk only from VM/CT config. If you call virDomainDefine and remove some disk from config it should be preserved, so call PrlVm_CommitEx always with flag

Re: [libvirt] [PATCH v2 05/11] Don't pass VIR_DOMAIN_XML_SECURE to virDomainDefParseString in phyp

2015-01-13 Thread Jiri Denemark
On Thu, Jan 08, 2015 at 15:48:16 +, Daniel Berrange wrote: The phyp driver is passing the VIR_DOMAIN_XML_SECURE flag to virDomainDefParseString which is wrong, because that flag only has effect when formatting XML. --- src/phyp/phyp_driver.c | 2 +- 1 file changed, 1 insertion(+), 1

[libvirt] [PATCH v2 5/5] parallels: create container from existing image

2015-01-13 Thread Dmitry Guryanov
It's possible to create a container with existing disk image as root filesystem. You need to remove existing disks from PCS VM config and then add a new one, pointing to your image. And then call PrlVm_RegEx with PRNVM_PRESERVE_DISK flag. With this patch you can create such container with

[libvirt] [PATCH v2 1/5] add ploop fs driver type

2015-01-13 Thread Dmitry Guryanov
Ploop is a pseudo device which makeit possible to access to an image in a file as a block device. Like loop devices, but with additional features, like snapshots, write tracker and without double-caching. It used in PCS for containers and in OpenVZ. You can manage ploop devices and images with

[libvirt] [PATCH v2 0/5] parallels: manage container's filesystems

2015-01-13 Thread Dmitry Guryanov
This patch series adds ability to manage container's filesystems: you can add or remove fs from existing container or create new one, based on existing disk image. Dmitry Guryanov (5): add ploop fs driver type parallels: dump info about container filesystems parallels: commit with

Re: [libvirt] [PATCH v2 08/11] Decouple CPU XML formatting from domain XML public API flags

2015-01-13 Thread Jiri Denemark
On Thu, Jan 08, 2015 at 15:48:19 +, Daniel Berrange wrote: The virCPUDefFormat* methods were relying on the VIR_DOMAIN_XML_* flag definitions. It is not desirable for low level internal functions to be coupled to flags for the public API, since they may need to be called from several

[libvirt] [PATCH v2 2/5] parallels: dump info about container filesystems

2015-01-13 Thread Dmitry Guryanov
Obtain information about container's filesystems and store it in virDomainDef structure. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- Changes in v2: * fix cleanup in prlsdkAddDomainHardDisksInfo src/parallels/parallels_sdk.c | 65 +-- 1

[libvirt] [PATCH v2 4/5] parallels: allow to add filesystems to container

2015-01-13 Thread Dmitry Guryanov
Handle information about filesystems in domain config and add corresponding devices to container via parallels sdk. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- Changes in v2: * fix formatting src/parallels/parallels_sdk.c | 109 +- 1

Re: [libvirt] [PATCH v2 06/11] Fix flags passed to virDomainDefParseString by XenAPI driver

2015-01-13 Thread Jiri Denemark
On Thu, Jan 08, 2015 at 15:48:17 +, Daniel Berrange wrote: The XenAPI driver was passing the flags for virDomainCreateXML straight into the virDomainDefParseString method, even though they expect totally different sets of flags. It should have been using VIR_DOMAIN_XML_INACTIVE ---

[libvirt] [PATCH] qemu_driver: fix setting vcpus for offline domain

2015-01-13 Thread Pavel Hrdina
Commit e3435caf fixed hot-plugging of vcpus with strict memory pinning on NUMA hosts, but unfortunately it also broke updating number of vcpus for offline guests using our API. The issue is that we try to create a cpu cgroup for non-running guest which fails as there are no cgroups for that

Re: [libvirt] [PATCHv2 01/14] Check for domain liveness in qemuDomainObjExitMonitor

2015-01-13 Thread Ján Tomko
On 01/12/2015 08:02 PM, John Ferlan wrote: On 01/07/2015 10:42 AM, Ján Tomko wrote: The domain might disappear during the time in monitor when the virDomainObjPtr is unlocked, so the caller needs to check if it's still alive. Since most of the callers are going to need it, put the check

Re: [libvirt] [PATCHv2 03/14] Fix vmdef usage after domain crash in monitor on device removal

2015-01-13 Thread Ján Tomko
On 01/12/2015 10:44 PM, John Ferlan wrote: On 01/07/2015 10:42 AM, Ján Tomko wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1161024 In the device type-specific functions, exit early if the domain has disappeared, because the cleanup should have been done by qemuProcessStop. Check

Re: [libvirt] [PATCHv2 09/14] Exit early after domain crash in monitor on device hotplug

2015-01-13 Thread Ján Tomko
On 01/13/2015 12:54 AM, John Ferlan wrote: On 01/07/2015 10:42 AM, Ján Tomko wrote: Error out if the domain has disappeared in the meantime. This prevents writing the persistent definition as the domain status and calling qemuDomainRemoveDevice on devices that already have been dealt

Re: [libvirt] [PATCHv2 04/14] Fix vmdef usage after domain crash in monitor on device detach

2015-01-13 Thread Ján Tomko
On 01/12/2015 10:58 PM, John Ferlan wrote: On 01/07/2015 10:42 AM, Ján Tomko wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1161024 Skip audit and removing the device from live def because it has already been cleaned up. --- src/qemu/qemu_hotplug.c | 59

Re: [libvirt] [PATCHv7 0/4] Introduce API to query IP addresses for given domain

2015-01-13 Thread Nehal J Wani
On Wed, Dec 17, 2014 at 5:46 AM, Nehal J Wani nehaljw.k...@gmail.com wrote: This feature has been requested for a very long time. Since qemu guest agent gives us reliable results, now the wait is over. The RFC was first proposed by Michal Privoznik:

[libvirt] [PATCH 2/4] conf: Allow UEFI NVRAM format selection

2015-01-13 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1180955 Up till now, there was only one format for NVRAM store file. However, it's possible to convert the file to qcow2 (which supports interesting features, like snapshotting, for instance). Therefore, we want to allow format selection over the NVRAM

[libvirt] [PATCH 0/4] NVRAM store file format

2015-01-13 Thread Michal Privoznik
The first patch is in fact unrelated, but trivial. The interesting work is done in the rest of the patches. Michal Privoznik (4): formatdomaincaps: Correctly format API reference conf: Allow UEFI NVRAM format selection qemu: Adapt to NVRAM store file format change domaincaps: Expose NVRAM

[libvirt] [PATCH 1/4] formatdomaincaps: Correctly format API reference

2015-01-13 Thread Michal Privoznik
Well, since the link to the virConnectGetDomainCapabilities API is in pre/ section we must take special care about the spaces around the link. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- docs/formatdomaincaps.html.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[libvirt] [PATCH 3/4] qemu: Adapt to NVRAM store file format change

2015-01-13 Thread Michal Privoznik
This basically implements the availability of choosing NVRAM store file format in the qemu driver. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_command.c| 6 ++-- .../qemuxml2argv-bios-nvram-qcow2.args | 10 ++

[libvirt] [PATCH 4/4] domaincaps: Expose NVRAM store file format capabilities

2015-01-13 Thread Michal Privoznik
It would be nice if we expose the capability of choosing the NVRAM store file format among with all the possibilities. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- docs/formatdomaincaps.html.in | 16 docs/schemas/domaincaps.rng

Re: [libvirt] [PATCHv2 07/14] Fix vmdef usage while in monitor in BlockStat* APIs

2015-01-13 Thread Ján Tomko
On 01/12/2015 11:30 PM, John Ferlan wrote: No commit message? Seems we're fixing two issues here #1. The ExitMonitor issue #2. Somehow the disk-info.alias becomes NULL and thus we're making a local copy to avoid that. On 01/07/2015 10:42 AM, Ján Tomko wrote: ---

Re: [libvirt] [PATCHv7 3/4] domifaddr: Implement the API for qemu

2015-01-13 Thread Daniel P. Berrange
On Mon, Jan 05, 2015 at 10:54:35PM +0530, Nehal J Wani wrote: By querying the qemu guest agent with the QMP command guest-network-get-interfaces and converting the received JSON output to structured objects. Although ifconfig is deprecated, IP aliases created by ifconfig are supported by

Re: [libvirt] [PATCH v2 11/11] virsh: enable domain XML validation by default

2015-01-13 Thread Daniel P. Berrange
On Tue, Jan 13, 2015 at 03:51:47PM +0100, Jiri Denemark wrote: On Thu, Jan 08, 2015 at 15:48:22 +, Daniel Berrange wrote: The 'virsh define', 'virsh create' and 'virsh edit' commands get XML validation enabled by default, with a --skip-validate option to disable it. Hmm, I definitely

Re: [libvirt] [PATCHv7 3/4] domifaddr: Implement the API for qemu

2015-01-13 Thread Daniel P. Berrange
On Tue, Jan 13, 2015 at 02:54:24PM +, Daniel P. Berrange wrote: On Mon, Jan 05, 2015 at 10:54:35PM +0530, Nehal J Wani wrote: By querying the qemu guest agent with the QMP command guest-network-get-interfaces and converting the received JSON output to structured objects. Although

Re: [libvirt] [PATCH] qemu: forbid second blockcommit during active commit

2015-01-13 Thread Eric Blake
On 01/13/2015 01:59 AM, Peter Krempa wrote: On Mon, Jan 12, 2015 at 04:20:34PM -0700, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1135339 documents some confusing behavior when a user tries to start an inactive block commit in a second connection while there is already an

Re: [libvirt] [PATCH v3 1/2] qemu_monitor: introduce new function to get QOM path

2015-01-13 Thread Jiri Denemark
On Fri, Jan 09, 2015 at 14:26:25 +0100, Pavel Hrdina wrote: The search is done recursively only through QOM object that has a type prefixed with child as this indicate that the QOM is a parent for other QOM objects. The usage is that you give known device name with starting path where to

Re: [libvirt] [PATCH 3/4] qemu: Adapt to NVRAM store file format change

2015-01-13 Thread Laszlo Ersek
comments below On 01/13/15 14:41, Michal Privoznik wrote: This basically implements the availability of choosing NVRAM store file format in the qemu driver. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_command.c| 6 ++--

Re: [libvirt] [PATCH 1/2] conf: Increase virNetDevBandwidthParse intelligence

2015-01-13 Thread John Ferlan
On 01/07/2015 12:31 PM, Michal Privoznik wrote: There's this function virNetDevBandwidthParse which parses the bandwidth XML snippet. But it's not clever much. For the following XML it allocates the virNetDevBandwidth structure even though it's completely empty: bandwidth

Re: [libvirt] [PATCH 4/4] domaincaps: Expose NVRAM store file format capabilities

2015-01-13 Thread Laszlo Ersek
comments below On 01/13/15 14:41, Michal Privoznik wrote: It would be nice if we expose the capability of choosing the NVRAM store file format among with all the possibilities. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- docs/formatdomaincaps.html.in

[libvirt] [PATCH V4 3/3] libxl: Add support for parsing/formating Xen XL config

2015-01-13 Thread Jim Fehlig
From: Kiarie Kahurani davidkiar...@gmail.com Now that xenconfig supports parsing and formatting Xen's XL config format, integrate it into the libxl driver's connectDomainXML{From,To}Native functions. Signed-off-by: Kiarie Kahurani davidkiar...@gmail.com Signed-off-by: Jim Fehlig jfeh...@suse.com

[libvirt] [PATCH V4 0/3] Parser for xen-xl config format

2015-01-13 Thread Jim Fehlig
It's been a long, twisting road to V4 of the Xen xl parser. V3 [1] was based on a flex-based parser that was copied from the Xen project and proved to be a bit challenging to integrate properly with autotools. But as it turns out, Xen provides an interface to the parser via libxlutil. I hadn't

Re: [libvirt] [PATCH 2/2] qemu, lxc: Fail explicitly if setting QoS on unsupported vNIC types

2015-01-13 Thread John Ferlan
On 01/07/2015 12:31 PM, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1165993 So, there are still plenty of vNIC types that we don't know how to set bandwidth on. Let's fail explicitly in case user has requested it instead of pretending everything Signed-off-by:

Re: [libvirt] [PATCH] qemu: snapshot: inactive external snapshot can't work after libvirtd restart

2015-01-13 Thread John Ferlan
On 12/06/2014 11:32 AM, Shanzhi Yu wrote: When create inactive external snapshot, after update disk definitions, virDomainSaveConfig is needed, if not after restart libvirtd the new snapshot file definitions in xml will be lost. Reproduce steps: 1. prepare a shut off guest $ virsh

[libvirt] [PATCH V4 1/3] Introduce support for parsing/formatting Xen xl config format

2015-01-13 Thread Jim Fehlig
Introduce a parser/formatter for the xl config format. Since the deprecation of xm/xend, the VM config file format has diverged as new features are added to libxl. This patch adds support for parsing and formating the xl config format. It supports the existing xm config format, plus adds

[libvirt] [PATCH V4 2/3] tests: Tests for the xen-xl parser

2015-01-13 Thread Jim Fehlig
From: Kiarie Kahurani davidkiar...@gmail.com add tests for the xen_xl config parser Signed-off-by: Kiarie Kahurani davidkiar...@gmail.com Signed-off-by: Jim Fehlig jfeh...@suse.com --- V4: Only build xlconfigtest when libxl is available. tests/Makefile.am| 11 ++

Re: [libvirt] [PATCH] Share the code and schemas for domain and network route definitions

2015-01-13 Thread Laine Stump
On 01/09/2015 11:47 AM, Cédric Bosdonnat wrote: Made the network configuration schemas and codes for the route element reusable. Created networkcommon_conf.[ch] files containing pieces to be used in both domain and network configurations. Replaced the brand new domain route configuration

Re: [libvirt] [PATCH] Share the code and schemas for domain and network route definitions

2015-01-13 Thread Laine Stump
On 01/13/2015 11:11 AM, Laine Stump wrote: On 01/09/2015 11:47 AM, Cédric Bosdonnat wrote: @@ -4359,11 +4359,7 @@ qemu-kvm -net nic,model=? /dev/null p span class=sinceSince 1.2.12/span route elements can also be added to define the network routes to use for the network device.

Re: [libvirt] [PATCH 2/2] qemu, lxc: Fail explicitly if setting QoS on unsupported vNIC types

2015-01-13 Thread Laine Stump
On 01/13/2015 10:58 AM, John Ferlan wrote: On 01/07/2015 12:31 PM, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1165993 So, there are still plenty of vNIC types that we don't know how to set bandwidth on. Let's fail explicitly in case user has requested it instead of

Re: [libvirt] It does not support hot-plugging VHOST-USER networkcard in libvirt?

2015-01-13 Thread Laine Stump
On 01/12/2015 11:10 PM, zhang bo wrote: It works well if we use qmp command to directly interact with qemu 2.1 to hot-add vhost-user network card. However, libvirt seems not support hotplugging well. Steps to use qmp commands to directly(without libvirtd) interact with qemu 2.1 : 1

Re: [libvirt] [PATCH 2/2] qemu, lxc: Fail explicitly if setting QoS on unsupported vNIC types

2015-01-13 Thread Eric Blake
On 01/13/2015 09:26 AM, Laine Stump wrote: I do understand Michal's concern. In particular, the network hook script support was put in specifically to allow management apps to support bandwidth management on interface types that libvirt couldn't/didn't directly support. If I recall

Re: [libvirt] [PATCH v2 1/4] conf: Make virDomainLoaderDefParseXML parse nvram/ too

2015-01-13 Thread Laszlo Ersek
On 01/13/15 18:20, Michal Privoznik wrote: This is pure code movement without any functional change. The code simply reads better this way, that's all. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/conf/domain_conf.c | 23 ++- 1 file changed, 14

[libvirt] Attempting to pivot disk with incomplete mirror results in hang

2015-01-13 Thread Scott Sullivan
I have what appears to be a bug when pivoting a disk during a block copy that is not yet 100% finished, resulting in the pivot command hanging. I have verified this problem on libvirt 1.2.10. Here's what Im seeing (transient guest): 1.) Start the block copy: [root@host ~]# virsh blockcopy

Re: [libvirt] Attempting to pivot disk with incomplete mirror results in hang

2015-01-13 Thread Scott Sullivan
On 01/13/2015 03:05 PM, Eric Blake wrote: On 01/13/2015 12:43 PM, Scott Sullivan wrote: I have what appears to be a bug when pivoting a disk during a block copy that is not yet 100% finished, resulting in the pivot command hanging. I have verified this problem on libvirt 1.2.10. Known

Re: [libvirt] [PATCH V4 2/3] tests: Tests for the xen-xl parser

2015-01-13 Thread Eric Blake
On 01/13/2015 08:53 AM, Jim Fehlig wrote: From: Kiarie Kahurani davidkiar...@gmail.com add tests for the xen_xl config parser Signed-off-by: Kiarie Kahurani davidkiar...@gmail.com Signed-off-by: Jim Fehlig jfeh...@suse.com --- V4: Only build xlconfigtest when libxl is available.

  1   2   >