Re: [libvirt] [PATCHv3 10/12] qemu: conf: Add support for memory device cold(un)plug

2015-03-17 Thread Zhu Guihua
On 03/17/2015 10:19 PM, Peter Krempa wrote: Add a few helpers that allow to operate with memory device definitions on the domain config and use them to implement memory device coldplug in the qemu driver. --- Notes: Version 2: - no changes src/conf/domain_conf.c | 100 +++

Re: [libvirt] Enhancing block/disk migration in libvirt

2015-03-17 Thread Tony Breeds
On Thu, Mar 12, 2015 at 01:05:21PM +0100, Kashyap Chamarthy wrote: > On Tue, Feb 17, 2015 at 07:05:13PM +1100, Tony Breeds wrote: > > On Tue, Feb 17, 2015 at 09:02:57AM +0100, Michal Privoznik wrote: > > > > > Oh, I forgot to paste the API name: virDomainMigrate3 > > > > That'll narrow the search

Re: [libvirt] [PATCH python v10] Expose virDomainInterfacesAddresses to python binding

2015-03-17 Thread Nehal J Wani
On Wed, Mar 18, 2015 at 2:50 AM, Nehal J Wani wrote: > On Mon, Mar 16, 2015 at 8:25 PM, Daniel P. Berrange > wrote: >> From: Nehal J Wani >> >> examples/Makefile.am: >> * Add new file domipaddrs.py >> >> examples/README: >> * Add documentation for the python example >> >> libvirt-override-a

Re: [libvirt] [PATCH python v10] Expose virDomainInterfacesAddresses to python binding

2015-03-17 Thread Nehal J Wani
On Mon, Mar 16, 2015 at 8:25 PM, Daniel P. Berrange wrote: > From: Nehal J Wani > > examples/Makefile.am: > * Add new file domipaddrs.py > > examples/README: > * Add documentation for the python example > > libvirt-override-api.xml: > * Add new symbol for virDomainInterfacesAddresses > > li

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

2015-03-17 Thread Nehal J Wani
On Wed, Mar 11, 2015 at 4:39 PM, Daniel P. Berrange wrote: > In v10 > > - Remove 'if' tests before access of hwaddr as it is always present > - Switch remote protocol to use remote_nonnull_string for hwaddr >as it can never be NUL > - Misc typos Eric pointed out > > Nehal J Wani (4): > d

Re: [libvirt] [PATCH] libvirt: move default nwfilters to datadir.

2015-03-17 Thread Daniel P. Berrange
On Tue, Mar 17, 2015 at 06:52:31PM +, Dimitri John Ledkov wrote: > libvirt runs correctly without any configuration files, as sensible > defaults are used throughout. This commit introduces a layer for > nwfilter configuration. This means that default filters are shipped in > /usr/share/libvirt

Re: [libvirt] [PATCH] util: clean up #includes of virnetdevopenvswitch.h

2015-03-17 Thread Eric Blake
On 03/17/2015 12:59 PM, Laine Stump wrote: > On 03/17/2015 01:54 PM, Eric Blake wrote: >> On 03/17/2015 11:50 AM, Laine Stump wrote: >>> virnetdevopenvswitch.h declares a few functions that can be called to >>> add ports to and remove them from OVS bridges, and retrieve the >>> migration data for a

Re: [libvirt] [PATCH] util: clean up #includes of virnetdevopenvswitch.h

2015-03-17 Thread Laine Stump
On 03/17/2015 01:54 PM, Eric Blake wrote: > On 03/17/2015 11:50 AM, Laine Stump wrote: >> virnetdevopenvswitch.h declares a few functions that can be called to >> add ports to and remove them from OVS bridges, and retrieve the >> migration data for a port. It does not contain any data definitions >

[libvirt] [PATCH] libvirt: move default nwfilters to datadir.

2015-03-17 Thread Dimitri John Ledkov
libvirt runs correctly without any configuration files, as sensible defaults are used throughout. This commit introduces a layer for nwfilter configuration. This means that default filters are shipped in /usr/share/libvirt/nwfilter/ directory, which can be overridden by things in /etc/libvirt/nwfil

Re: [libvirt] [PATCH v3] qemu: read backing chain names from qemu

2015-03-17 Thread Eric Blake
On 03/17/2015 03:29 AM, Peter Krempa wrote: > On Mon, Mar 16, 2015 at 12:17:58 -0600, Eric Blake wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1199182 documents that >> after a series of disk snapshots into existing destination images, >> followed by active commits of the top image, it is p

Re: [libvirt] [PATCH] tests: Add tests for virCgroupDetectMounts

2015-03-17 Thread Eric Blake
On 03/17/2015 06:39 AM, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/libvirt_private.syms | 1 + > src/util/vircgroup.c | 19 ++-- > src/util/vircgrouppriv.h | 4 + > tests/vircgrouptest.c | 71 ++

Re: [libvirt] [PATCH] util: clean up #includes of virnetdevopenvswitch.h

2015-03-17 Thread Eric Blake
On 03/17/2015 11:50 AM, Laine Stump wrote: > virnetdevopenvswitch.h declares a few functions that can be called to > add ports to and remove them from OVS bridges, and retrieve the > migration data for a port. It does not contain any data definitions > that are used by domain_conf.h. But for some r

[libvirt] [PATCH] util: clean up #includes of virnetdevopenvswitch.h

2015-03-17 Thread Laine Stump
virnetdevopenvswitch.h declares a few functions that can be called to add ports to and remove them from OVS bridges, and retrieve the migration data for a port. It does not contain any data definitions that are used by domain_conf.h. But for some reason, domain_conf.h virnetdevopenvswitch.h should

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

2015-03-17 Thread Matthias Gatto
Uniformize backing store usage by calling virStorageSourceGetBackingStore instead of setting backing store manually. Signed-off-by: Matthias Gatto --- src/conf/domain_conf.c| 7 --- src/conf/storage_conf.c | 6 +++--- src/qemu/qemu_cgroup.c| 4

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

2015-03-17 Thread Matthias Gatto
Replace the parts of the code where a backing store is set manually with virStorageSourceSetBackingStore Signed-off-by: Matthias Gatto --- src/conf/domain_conf.c| 3 ++- src/conf/storage_conf.c | 16 +--- src/qemu/qemu_driver.c| 8 -

[libvirt] [PATCH v4 1/9] virstoragefile: Add virStorageSourceGetBackingStore

2015-03-17 Thread Matthias Gatto
Create virStorageSourceGetBackingStore function in preparation for quorum: Actually, if we want to get a backing store inside a virStorageSource we have to do it manually(src->backingStore = backingStore). The problem is that with a quorum, a virStorageSource can contain multiple backing stores, an

[libvirt] [PATCH v4 5/9] virstoragefile: change backingStore to backingStores.

2015-03-17 Thread Matthias Gatto
The backingStore field was a virStorageSourcePtr. because a quorum can contain more that one backingStore at the same level it's now a 'virStorageSourcePtr *'. This patch rename src->backingStore to src->backingStores, add a static function virStorageSourceExpandBackingStore (virStorageSourcePush

[libvirt] [PATCH v4 8/9] qemu: Add quorum support in qemuBuildDriveDevStr

2015-03-17 Thread Matthias Gatto
Allow to libvirt to build the quorum string used by quemu. Add 2 static functions: qemuBuildQuorumStr and qemuBuildAndAppendDriveStrToVirBuffer. qemuBuildQuorumStr is made because a quorum can have another quorum as a child, so we may need to call qemuBuildQuorumStr recursively. qemuBuildQuorumFi

[libvirt] [PATCH v4 3/9] virstoragefile: Add virStorageSourceSetBackingStore

2015-03-17 Thread Matthias Gatto
As explained for virStorageSourceGetBackingStore, quorum allows multiple backing store, this make the operation to set bs complex because we have to check if the backingStore is used as an array or a pointer, and set it differently in both case. In order to help the manipulation of backing store,

[libvirt] [PATCH v4 9/9] virstoragefile: Add node-name

2015-03-17 Thread Matthias Gatto
Add nodename inside virstoragefile During xml backingStore parsing, look for a nodename attribute in the disk declaration if this one is a quorum, if a nodename is found, add it to the virStorageSource otherwise create a new one with a random name. Take inspiration from this patch to create the nod

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

2015-03-17 Thread Matthias Gatto
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 --- src/conf/domain_conf.c | 164 +++-- 1 file changed, 119 insertion

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

2015-03-17 Thread Matthias Gatto
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 backing store. Because all the actual libvirt cod

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

2015-03-17 Thread Matthias Gatto
Add VIR_STORAGE_TYPE_QUORUM in virStorageType. Add VIR_STORAGE_FILE_QUORUM in virStorageFileFormat. Add threshold value in _virStorageSource Signed-off-by: Matthias Gatto --- docs/formatdomain.html.in | 20 +- docs/schemas/domaincommon.rng | 90 +++-

Re: [libvirt] [PATCH 5/5] qemuGetDHCPInterfaces: Don't leak @network

2015-03-17 Thread Daniel P. Berrange
On Tue, Mar 17, 2015 at 05:52:57PM +0100, Michal Privoznik wrote: > The function needs a pointer to the network to get list of DHCP > leases. The pointer is obtained via virNetworkLookupByName() which > requires callers to free the returned network once no longer needed. > Otherwise it's leaked. >

Re: [libvirt] [PATCH 4/5] cmdDomIfAddr: Free @ip_addr_str

2015-03-17 Thread Daniel P. Berrange
On Tue, Mar 17, 2015 at 05:52:56PM +0100, Michal Privoznik wrote: > The variable holds formatted suffix to each line printed out > (address type, address and prefix). However, the variable is > never freed. At the same time, honour fact, that data held in > the variable is not constant. > > Signed

Re: [libvirt] [PATCH 2/5] virsh: Adapt to new HW address scenario

2015-03-17 Thread Daniel P. Berrange
On Tue, Mar 17, 2015 at 05:52:54PM +0100, Michal Privoznik wrote: > Make sure we don't print (null) (which in fact is printf()'s > cleverness anyway, not ours). If no HW address is present, print > "N/A" string just like we do for other fields. > > Signed-off-by: Michal Privoznik > --- > tools/v

Re: [libvirt] [PATCH 3/5] qemuAgentGetInterfaces: Don't error out on missing HW address

2015-03-17 Thread Daniel P. Berrange
On Tue, Mar 17, 2015 at 05:52:55PM +0100, Michal Privoznik wrote: > Now that we allow HW address to be not present on our RPC layer, > don't error out if qemu-ga hasn't provided any. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_agent.c | 7 --- > 1 file changed, 7 deletions(-) >

Re: [libvirt] [PATCH 1/5] RPC: Allow HW address in remote_domain_interface struct to be NULL

2015-03-17 Thread Daniel P. Berrange
On Tue, Mar 17, 2015 at 05:52:53PM +0100, Michal Privoznik wrote: > Not all NICs (esp. the virtual ones like TUN) must have a hardware > address. Learn our RPC that it's possible. s/Learn/Teach/ > Signed-off-by: Michal Privoznik > --- > daemon/remote.c | 5 - > include/libv

Re: [libvirt] [PATCH 3/5] qemuAgentGetInterfaces: Don't error out on missing HW address

2015-03-17 Thread Daniel P. Berrange
On Tue, Mar 17, 2015 at 06:09:17PM +0100, Michal Privoznik wrote: > On 17.03.2015 18:00, Michal Privoznik wrote: > > On 17.03.2015 17:58, Daniel P. Berrange wrote: > >> On Tue, Mar 17, 2015 at 05:52:55PM +0100, Michal Privoznik wrote: > >>> Now that we allow HW address to be not present on our RPC

Re: [libvirt] [PATCH 7/7] parallels: don't prevent domain define if VIR_DOMAIN_NET_TYPE_BRIDGE

2015-03-17 Thread Maxim Nestratov
17.03.2015 17:14, Michal Privoznik пишет: On 13.03.2015 16:52, Maxim Nestratov wrote: network adapter is used --- src/parallels/parallels_sdk.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index a0a2ba

Re: [libvirt] [PATCH 3/5] qemuAgentGetInterfaces: Don't error out on missing HW address

2015-03-17 Thread Michal Privoznik
On 17.03.2015 18:00, Michal Privoznik wrote: > On 17.03.2015 17:58, Daniel P. Berrange wrote: >> On Tue, Mar 17, 2015 at 05:52:55PM +0100, Michal Privoznik wrote: >>> Now that we allow HW address to be not present on our RPC layer, >>> don't error out if qemu-ga hasn't provided any. >>> >>> Signed-

[libvirt] [PATCH 1/5] RPC: Allow HW address in remote_domain_interface struct to be NULL

2015-03-17 Thread Michal Privoznik
Not all NICs (esp. the virtual ones like TUN) must have a hardware address. Learn our RPC that it's possible. Signed-off-by: Michal Privoznik --- daemon/remote.c | 5 - include/libvirt/libvirt-domain.h | 2 +- src/libvirt-domain.c | 3 ++- src/remote/remote_drive

Re: [libvirt] [PATCH 3/5] qemuAgentGetInterfaces: Don't error out on missing HW address

2015-03-17 Thread Michal Privoznik
On 17.03.2015 17:58, Daniel P. Berrange wrote: > On Tue, Mar 17, 2015 at 05:52:55PM +0100, Michal Privoznik wrote: >> Now that we allow HW address to be not present on our RPC layer, >> don't error out if qemu-ga hasn't provided any. >> >> Signed-off-by: Michal Privoznik >> --- >> src/qemu/qemu_a

Re: [libvirt] [PATCH 3/5] qemuAgentGetInterfaces: Don't error out on missing HW address

2015-03-17 Thread Daniel P. Berrange
On Tue, Mar 17, 2015 at 05:52:55PM +0100, Michal Privoznik wrote: > Now that we allow HW address to be not present on our RPC layer, > don't error out if qemu-ga hasn't provided any. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_agent.c | 7 --- > 1 file changed, 7 deletions(-) >

[libvirt] [PATCH 0/5] Couple of virDomainInterfaceAddresses fixes

2015-03-17 Thread Michal Privoznik
While testing the new API I've noticed some leaks and other errors. The very first patch changes the RPC protocol, but hey - on an unreleased procedure yet! Michal Privoznik (5): RPC: Allow HW address in remote_domain_interface struct to be NULL virsh: Adapt to new HW address scenario qemuA

Re: [libvirt] [PATCH 3/3 v3] Add midonet virtual port type support to qemu

2015-03-17 Thread Laine Stump
On 02/23/2015 03:54 PM, Antoni Segura Puimedon wrote: > Use the utilities introduced in the previous patches so the qemu > driver is able to create tap devices that are bound (and unbound > on domain destroyal) to Midonet virtual ports. > > Signed-off-by: Antoni Segura Puimedon > --- > src/conf/d

[libvirt] [PATCH 5/5] qemuGetDHCPInterfaces: Don't leak @network

2015-03-17 Thread Michal Privoznik
The function needs a pointer to the network to get list of DHCP leases. The pointer is obtained via virNetworkLookupByName() which requires callers to free the returned network once no longer needed. Otherwise it's leaked. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 6 +- 1

[libvirt] [PATCH 4/5] cmdDomIfAddr: Free @ip_addr_str

2015-03-17 Thread Michal Privoznik
The variable holds formatted suffix to each line printed out (address type, address and prefix). However, the variable is never freed. At the same time, honour fact, that data held in the variable is not constant. Signed-off-by: Michal Privoznik --- tools/virsh-domain-monitor.c | 5 +++-- 1 file

[libvirt] [PATCH 3/5] qemuAgentGetInterfaces: Don't error out on missing HW address

2015-03-17 Thread Michal Privoznik
Now that we allow HW address to be not present on our RPC layer, don't error out if qemu-ga hasn't provided any. Signed-off-by: Michal Privoznik --- src/qemu/qemu_agent.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index 5f90b15..a7b327

[libvirt] [PATCH 2/5] virsh: Adapt to new HW address scenario

2015-03-17 Thread Michal Privoznik
Make sure we don't print (null) (which in fact is printf()'s cleverness anyway, not ours). If no HW address is present, print "N/A" string just like we do for other fields. Signed-off-by: Michal Privoznik --- tools/virsh-domain-monitor.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-

Re: [libvirt] [PATCH 2/3 v3] Schema and docs for the midonet virtualport type

2015-03-17 Thread Laine Stump
On 02/23/2015 03:54 PM, Antoni Segura Puimedon wrote: > Midonet is an opensource virtual networking that over lays the IP > network between hypervisors. Currently, such networks can be made > with the openvswitch virtualport type. > > This patch, defines the schema and documentation that will serve

Re: [libvirt] [PATCH 1/3 v3] utilities for supporting midonet virtualports

2015-03-17 Thread Antoni Segura Puimedon
On Tue, Mar 17, 2015 at 4:26 PM, Laine Stump wrote: > On 02/24/2015 04:17 AM, Antoni Segura Puimedon wrote: > > > > On Tue, Feb 24, 2015 at 3:30 AM, Laine Stump wrote: > >> On 02/23/2015 08:48 PM, YAMAMOTO Takashi wrote: >> >> On Tue, Feb 24, 2015 at 2:20 AM, YAMAMOTO Takashi < >> yamam...@val

Re: [libvirt] [PATCH 0/7] Fix ejecting of network backed cdroms via virsh

2015-03-17 Thread Peter Krempa
On Tue, Mar 17, 2015 at 16:45:43 +0100, Michal Privoznik wrote: > On 12.03.2015 18:09, Peter Krempa wrote: > > It turned out that not only virsh was broken ... > > > > Peter Krempa (7): > > virsh: domain: Don't use vshPrepareDiskXML for creating XML to detach > > disk > > virsh: domain: Ad

Re: [libvirt] [PATCH v2] parallels: minor cleanup

2015-03-17 Thread Maxim Nestratov
17.03.2015 18:56, Michal Privoznik пишет: I've updated the commit message, ACKed and pushed. Michal Thank you Michal. Next time I'll use your commit message as an example for such cleanups. I really thought mine was enough. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat

Re: [libvirt] [PATCH v2] parallels: minor cleanup

2015-03-17 Thread Michal Privoznik
On 17.03.2015 16:21, Maxim Nestratov wrote: > v2 change: > rebased to the current master We usually put the diff to previous versions in between commit message and diff stat. That way git ignores the diff and it's not part of the commit message. > > indentation is fixed, unnecessary error me

Re: [libvirt] [PATCH 1/3 v3] utilities for supporting midonet virtualports

2015-03-17 Thread Laine Stump
On 02/23/2015 03:54 PM, Antoni Segura Puimedon wrote: > Adds the port type definitions and methods that will be used to bind > interfaces to the Midonet virtual ports. > > virtnetdevmidonet.c adds the way to bind and unbind the ports by > calling into the Midonet Host Agent control command line (in

Re: [libvirt] [PATCH 2/7] virsh: domain: Add --print-xml flag for command change-media

2015-03-17 Thread Michal Privoznik
On 12.03.2015 18:09, Peter Krempa wrote: > Allow printing the XML that would be used mostly for debugging purposes. > --- > tools/virsh-domain.c | 17 + > tools/virsh.pod | 3 +++ > 2 files changed, 16 insertions(+), 4 deletions(-) > > diff --git a/tools/virsh-domain.c b/too

Re: [libvirt] [PATCH 0/7] Fix ejecting of network backed cdroms via virsh

2015-03-17 Thread Michal Privoznik
On 12.03.2015 18:09, Peter Krempa wrote: > It turned out that not only virsh was broken ... > > Peter Krempa (7): > virsh: domain: Don't use vshPrepareDiskXML for creating XML to detach > disk > virsh: domain: Add --print-xml flag for command change-media > virsh: domain: Fix the change-

[libvirt] [PATCH v2] parallels: minor cleanup

2015-03-17 Thread Maxim Nestratov
v2 change: rebased to the current master indentation is fixed, unnecessary error message removed, unnecessary job freeing removed Signed-off-by: Maxim Nestratov --- src/parallels/parallels_sdk.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/parallels/paral

[libvirt] [PULL 13/13] migration: Expose 'cancelling' status to user

2015-03-17 Thread Juan Quintela
From: zhanghailiang 'cancelling' status was introduced by commit 51cf4c1a, mainly to avoid a possible start of a new migration process while the previous one still exists. But we didn't expose this status to user, instead we returned the 'active' state. Here, we expose it to the user (such as l

Re: [libvirt] [PATCH 1/3 v3] utilities for supporting midonet virtualports

2015-03-17 Thread Laine Stump
On 02/24/2015 04:17 AM, Antoni Segura Puimedon wrote: > > > On Tue, Feb 24, 2015 at 3:30 AM, Laine Stump > wrote: > > On 02/23/2015 08:48 PM, YAMAMOTO Takashi wrote: > >> On Tue, Feb 24, 2015 at 2:20 AM, YAMAMOTO Takashi > mailto:yamam...@valinux.co.jp>> >

Re: [libvirt] [PATCH 4/4] parallels: minor cleanup

2015-03-17 Thread Maxim Nestratov
17.03.2015 17:51, Michal Privoznik пишет: On 13.03.2015 16:40, Maxim Nestratov wrote: indentation is fixed, unnecessary error message removed, unnecessary job freeing removed Signed-off-by: Maxim Nestratov --- src/parallels/parallels_sdk.c |5 + 1 files changed, 1 insertions(+), 4 d

Re: [libvirt] [PATCH 1/7] parallels: introduce and use string constants for network types and names

2015-03-17 Thread Michal Privoznik
On 17.03.2015 15:25, Maxim Nestratov wrote: > 17.03.2015 17:15, Michal Privoznik пишет: >> On 13.03.2015 16:52, Maxim Nestratov wrote: >>> Signed-off-by: Maxim Nestratov >>> --- >>> src/parallels/parallels_network.c |6 +++--- >>> src/parallels/parallels_sdk.c |6 +++--- >>> src/pa

Re: [libvirt] [PATCH v2 0/4] parallels: fixes and cleanups

2015-03-17 Thread Michal Privoznik
On 13.03.2015 16:40, Maxim Nestratov wrote: > From: Maxim Nestratov > > v2 change: > - rebased > > Maxim Nestratov (3): > parallels: don't forget to unlock domain if unregister fails > parallels: fix home directory for VMs > parallels: minor cleanup > > Mikhail Feoktistov (1): > parall

Re: [libvirt] [PATCH 3/4] parallels: fix home directory for VMs

2015-03-17 Thread Michal Privoznik
On 13.03.2015 16:40, Maxim Nestratov wrote: > Failures of parallelsStorageOpen occured because we incorrectly treated > path to VM' configuration file as a directory. Now initialization of > parallels VM domains home directory is fixed. > > Signed-off-by: Maxim Nestratov > --- > src/parallels/pa

Re: [libvirt] [PATCH 4/4] parallels: minor cleanup

2015-03-17 Thread Michal Privoznik
On 13.03.2015 16:40, Maxim Nestratov wrote: > indentation is fixed, unnecessary error message removed, > unnecessary job freeing removed > > Signed-off-by: Maxim Nestratov > --- > src/parallels/parallels_sdk.c |5 + > 1 files changed, 1 insertions(+), 4 deletions(-) > > diff --git a/src

Re: [libvirt] [PATCH 1/4] parallels: set cpu mode when applying xml configuration

2015-03-17 Thread Michal Privoznik
On 13.03.2015 16:40, Maxim Nestratov wrote: > From: Mikhail Feoktistov > > Otherwise exporting existing domain config and defining a new one like this: > virsh -c parallels:///system dumpxml instance01 > my.xml > virsh -c parallels:///system define my.xml > leads to an error because PCS default x

Re: [libvirt] [PATCH 2/4] parallels: don't forget to unlock domain if unregister fails

2015-03-17 Thread Michal Privoznik
On 13.03.2015 16:40, Maxim Nestratov wrote: > Signed-off-by: Maxim Nestratov > --- > src/parallels/parallels_driver.c |7 ++- > 1 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/src/parallels/parallels_driver.c > b/src/parallels/parallels_driver.c > index d2907cf..aeb43a

[libvirt] [PATCHv3 02/12] libxl: Refactor logic in domain post parse callback

2015-03-17 Thread Peter Krempa
With the current control flow the post parse callback returned success right away for fully virtualized VMs. To allow adding additional checks into the post parse callback tweak the conditions so that the function doesn't return early except for error cases. To clarify the original piece of code b

Re: [libvirt] [PATCH 1/7] parallels: introduce and use string constants for network types and names

2015-03-17 Thread Maxim Nestratov
17.03.2015 17:15, Michal Privoznik пишет: On 13.03.2015 16:52, Maxim Nestratov wrote: Signed-off-by: Maxim Nestratov --- src/parallels/parallels_network.c |6 +++--- src/parallels/parallels_sdk.c |6 +++--- src/parallels/parallels_utils.h |8 +++- 3 files changed, 13

[libvirt] [PATCHv3 04/12] qemu: Implement setup of memory hotplug parameters

2015-03-17 Thread Peter Krempa
To enable memory hotplug the maximum memory size and slot count need to be specified. As qemu supports now other units than mebibytes when specifying memory, use the new interface in this case. --- Notes: Version 2: - simplified condition for enabling the max_memory formatting - tweake

[libvirt] [PATCHv3 07/12] qemu: memdev: Add infrastructure to load memory device information

2015-03-17 Thread Peter Krempa
When using 'dimm' memory devices with qemu, some of the information like the slot number and base address need to be reloaded from qemu after process start so that it reflects the actual state. The state then allows to use memory devices across migrations. --- Notes: Version 3: - Don't try

[libvirt] [PATCHv3 09/12] qemu: add support for memory devices

2015-03-17 Thread Peter Krempa
Add support to start qemu instance with 'pc-dimm' device. Thanks to the refactors we are able to reuse the existing function to determine the parameters. --- Notes: Version 2: - dropped the ACPI naming src/qemu/qemu_command.c| 130 - src/qe

[libvirt] [PATCHv3 10/12] qemu: conf: Add support for memory device cold(un)plug

2015-03-17 Thread Peter Krempa
Add a few helpers that allow to operate with memory device definitions on the domain config and use them to implement memory device coldplug in the qemu driver. --- Notes: Version 2: - no changes src/conf/domain_conf.c | 100 +++ src/conf/dom

[libvirt] [PATCHv3 00/12] Add support for memory hotplug

2015-03-17 Thread Peter Krempa
This version includes review feedback changes from John and also fixes the element documentation and code that calculates it to support possible non-NUMA configs with memory hotplug if any hypervisor would support that in the future. Peter Krempa (12): qemu: monitor: Don't leak @props with non

[libvirt] [PATCHv3 01/12] qemu: monitor: Don't leak @props with non-JSON in qemuMonitorAddObject

2015-03-17 Thread Peter Krempa
The function comment states that @props is always consumed, even on failure. This was not true with the failure if the monitor is not using QMP. --- This patch is new in the series. src/qemu/qemu_monitor.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_mo

Re: [libvirt] [PATCH 0/7] Fix ejecting of network backed cdroms via virsh

2015-03-17 Thread Peter Krempa
On Thu, Mar 12, 2015 at 18:09:52 +0100, Peter Krempa wrote: > It turned out that not only virsh was broken ... > > Peter Krempa (7): > virsh: domain: Don't use vshPrepareDiskXML for creating XML to detach > disk > virsh: domain: Add --print-xml flag for command change-media > virsh: doma

[libvirt] [PATCHv3 12/12] qemu: Implement memory device hotunplug

2015-03-17 Thread Peter Krempa
Add code to hot-remove memory devices from qemu. Unfortunately QEMU doesn't support this right now, so this is just for completenes. --- Notes: Version 3: - moved check for the "-device" capability before any other code Version 2: - no change src/qemu/qemu_driver.c | 4 ++- src

[libvirt] [PATCHv3 03/12] conf: Add support for parsing and formatting max memory and slot count

2015-03-17 Thread Peter Krempa
Add a XML element that will allow to specify maximum supportable memory and the count of memory slots to use with memory hotplug. To avoid possible confusion and misuse of the new element this patch also explicitly forbids the use of the maxMemory setting in individual drivers's post parse callbac

[libvirt] [PATCHv3 08/12] qemu: migration: Forbid migration with memory modules lacking info

2015-03-17 Thread Peter Krempa
Make sure that libvirt has all vital information needed to reliably represent configuration of guest's memory devices in case of a migration. This patch forbids migration in case the required slot number and module base address are not present (failed to be loaded from qemu via monitor). --- Note

[libvirt] [PATCHv3 06/12] conf: Add interface to parse and format memory device information

2015-03-17 Thread Peter Krempa
This patch adds code that parses and formats configuration for memory devices. A simple configuration would be: 524287 0 A complete configuration of a memory device: 4096 1-3 524287 1 This patch preemptively forbids use of the device in individual d

Re: [libvirt] [PATCH 4/7] parallels: set network adapter device status to connected

2015-03-17 Thread Michal Privoznik
On 13.03.2015 16:52, Maxim Nestratov wrote: > when a new network adapter device is added > > Signed-off-by: Maxim Nestratov > --- > src/parallels/parallels_sdk.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallel

[libvirt] [PATCHv3 05/12] conf: Add device address type for dimm devices

2015-03-17 Thread Peter Krempa
Dimm devices are described by the slot and base address. Add a new address type to be able to describe such address. --- Notes: Version 2: - drop 'ACPI' from everything docs/schemas/domaincommon.rng | 18 +++ src/conf/domain_conf.c| 74

[libvirt] [PATCHv3 11/12] qemu: Implement memory device hotplug

2015-03-17 Thread Peter Krempa
Add code to hot-add memory devices to running qemu instances. --- Notes: Version 3: - added comment to clarify that @mem is always consumed by qemuDomainAttachMemory Version 2: - no change Version 2: - no change src/qemu/qemu_command.c | 4 +-- src/qemu/qemu_comman

Re: [libvirt] [PATCH 3/7] parallels: better bridge network interface support

2015-03-17 Thread Michal Privoznik
On 13.03.2015 16:52, Maxim Nestratov wrote: > In order to support 'bridge' network adapters in parallels > driver we need to plug our veth devices into corresponding > linux bridges. > We are going to do this by reusing our abstraction of > Virtual Networks in terms of PCS. On a domain creation, we

Re: [libvirt] [PATCH 6/7] parallels: switch off offline management feature

2015-03-17 Thread Michal Privoznik
On 13.03.2015 16:52, Maxim Nestratov wrote: > which is on by default when a new VM/CT is created. > We should do this because this feature can't be controlled > by libvirt now and it sets up some iptables rules. So it's > better to do this to avoid potential conflict of different > set of rules or

Re: [libvirt] [PATCH 1/7] parallels: introduce and use string constants for network types and names

2015-03-17 Thread Michal Privoznik
On 13.03.2015 16:52, Maxim Nestratov wrote: > Signed-off-by: Maxim Nestratov > --- > src/parallels/parallels_network.c |6 +++--- > src/parallels/parallels_sdk.c |6 +++--- > src/parallels/parallels_utils.h |8 +++- > 3 files changed, 13 insertions(+), 7 deletions(-) > > di

Re: [libvirt] [PATCH 7/7] parallels: don't prevent domain define if VIR_DOMAIN_NET_TYPE_BRIDGE

2015-03-17 Thread Michal Privoznik
On 13.03.2015 16:52, Maxim Nestratov wrote: > network adapter is used > --- > src/parallels/parallels_sdk.c |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c > index a0a2ba0..4c90a18 100644 > --- a/src/par

Re: [libvirt] [PATCH 2/7] parallels: fix parallelsLoadNetworks

2015-03-17 Thread Michal Privoznik
On 13.03.2015 16:52, Maxim Nestratov wrote: > Don't fail initialization of parallels driver if > parallelsLoadNetwork fails for optional networks. > This can happen when some of them are added manually > and configured incompletely. PCS requires only two networks > created automatically (named Host

Re: [libvirt] [PATCH 5/7] parallels: make E1000 network adapter type default

2015-03-17 Thread Michal Privoznik
On 13.03.2015 16:52, Maxim Nestratov wrote: > Signed-off-by: Maxim Nestratov > --- > src/parallels/parallels_sdk.c |4 > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c > index 9588163..748a308 100644 > ---

[libvirt] [PATCH 4/6] parallels: report, that cdroms are readonly

2015-03-17 Thread Dmitry Guryanov
When retriving list of domains from PCS, set readonly flag for cdrom devices. Signed-off-by: Dmitry Guryanov --- src/parallels/parallels_sdk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index 6b3321b..ea

[libvirt] [PATCH 5/6] parallels: add controllers in prlsdkLoadDomain

2015-03-17 Thread Dmitry Guryanov
Call virDomainDefAddImplicitControllers to add disk controllers, so virDomainDef, filled by this function will look exactly like the one returned by virDomainDefParseString. Signed-off-by: Dmitry Guryanov --- src/parallels/parallels_sdk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sr

[libvirt] [PATCH 6/6] parallels: fix virDomainDefineXML for domain in saved state

2015-03-17 Thread Dmitry Guryanov
PCS doesn't store domain config in managed save state file. It's forbidden to change config for VMs in this state. It's possible to change config for containers, but after restoring domain will have that new config, not a config, which domain had at the moment of virDomainManagedSave. So we need t

[libvirt] [PATCH 1/6] parallels: fix headers in parallels_sdk.h

2015-03-17 Thread Dmitry Guryanov
Return value of functions prlsdkStart/Kill/Stop e.t.c. is PRL_RESULT in parallels_sdk.c and int in parallels_sdk.h. PRL_RESULT is int, so compiler didn't report errors. Let's fix the difference. Signed-off-by: Dmitry Guryanov --- src/parallels/parallels_sdk.h | 10 +- 1 file changed, 5 i

[libvirt] [PATCH 0/6] parallels: implement managed save

2015-03-17 Thread Dmitry Guryanov
This patch is intended to implement all needed code, so that suspend/resume in openstack nova will work. It implements .domainHasManagedSaveImage, .domainManagedSave and .domainManagedSaveRemove functions. Also it adds workaround to parallelsDomainDefineXMLFlags to skip applying configuration, if

[libvirt] [PATCH 3/6] parallels: implement virDomainManagedSave

2015-03-17 Thread Dmitry Guryanov
Implement virDomainManagedSave api function. In PCS this feature called "suspend". You can suspend VM or CT while it is in running or paused state. And after resuming (or starting) it will have the same state, as before suspend. Signed-off-by: Dmitry Guryanov --- src/parallels/parallels_driver.c

[libvirt] [PATCH 2/6] parallels: split prlsdkDomainChangeState function

2015-03-17 Thread Dmitry Guryanov
Split function prlsdkDomainChangeState into prlsdkDomainChangeStateLocked and prlsdkDomainChangeState. So it can be used from places, where virDomainObj already found and locked. Signed-off-by: Dmitry Guryanov --- src/parallels/parallels_sdk.c | 35 +-- src/parall

[libvirt] [PATCH] tests: Add tests for virCgroupDetectMounts

2015-03-17 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/libvirt_private.syms | 1 + src/util/vircgroup.c | 19 ++-- src/util/vircgrouppriv.h | 4 + tests/vircgroupdata/all-in-one.mounts | 7 ++ tests/vircgroupdata/all-in-one.parsed | 10 +++ tes

[libvirt] [PATCHv2 4/5] Expand the address set when attaching a virtio-serial controller

2015-03-17 Thread Ján Tomko
--- src/qemu/qemu_hotplug.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 7845fd1..b2f70d1 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -435,6 +435,7 @@ int qemuDomainAttachControllerDevice(virQEMUDr

[libvirt] [PATCHv2 5/5] Assign an address when hotplugging a virtio-serial device

2015-03-17 Thread Ján Tomko
--- src/qemu/qemu_hotplug.c | 21 +++-- tests/qemuhotplugtest.c | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index b2f70d1..3e8d398 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1

[libvirt] [PATCHv2 3/5] Allocate virtio-serial addresses when starting a domain

2015-03-17 Thread Ján Tomko
Instead of always using controller 0 and incrementing port number, respect the maximum port numbers of controllers and use all of them. Ports for virtio consoles are quietly reserved, but not formatted (neither in XML nor on QEMU command line). Also rejects duplicate virtio-serial addresses. http

[libvirt] [PATCHv2 0/5] Allocate virtio-serial addresses

2015-03-17 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=890606 https://bugzilla.redhat.com/show_bug.cgi?id=1076708 Ján Tomko (5): Add test for virtio serial port assignment Add functions to track virtio-serial addresses Allocate virtio-serial addresses when starting a domain Expand the address set whe

[libvirt] [PATCHv2 1/5] Add test for virtio serial port assignment

2015-03-17 Thread Ján Tomko
Add a test to demonstrate the effect of this series. --- .../qemuxml2argv-channel-virtio-autoassign.args| 20 + .../qemuxml2argv-channel-virtio-autoassign.xml | 50 ++ tests/qemuxml2argvtest.c | 2 + 3 files changed, 72 insertions(+)

[libvirt] [PATCHv2 2/5] Add functions to track virtio-serial addresses

2015-03-17 Thread Ján Tomko
Create a sorted array of virtio-serial controllers. Each of the elements contains the controller index and a bitmap of available ports. Buses are not tracked, because they aren't supported by QEMU. --- src/conf/domain_addr.c | 348 +++ src/conf/domain

Re: [libvirt] [PATCH v2 4/4] conf: Use correct type for balloon stats period

2015-03-17 Thread Martin Kletzander
On Mon, Mar 16, 2015 at 02:10:35PM +0100, Erik Skultety wrote: On 03/13/2015 05:17 PM, Martin Kletzander wrote: We're parsing memballoon status period as unsigned int, but when we're trying to set it, both we and qemu use signed int. That means large values will get wrapped around to negative

[libvirt] [PATCH][libvirt-ruby] Introduce .gitignore

2015-03-17 Thread Michal Privoznik
When building the project from a clean repo, there are some blobs we don't want git to bother about. Just ignore them. Signed-off-by: Michal Privoznik --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644

[libvirt] [PATCH][libvirt-ruby] Rakefile: Build on Mac OS-X cleanly

2015-03-17 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1161338 There's this bug report, which suggests using '-arch x86_64' on Macs. Otherwise one gets unclear error messages when building. Signed-off-by: Michal Privoznik --- Rakefile | 4 1 file changed, 4 insertions(+) diff --git a/Rakefile b/Rake

[libvirt] [PATCH] wireshark: fix VPATH build

2015-03-17 Thread Pavel Hrdina
Add $(top_builddir) paths to INCLUDES to fix VPATH build. Signed-off-by: Pavel Hrdina --- Pushed under build-breaker rule. tools/wireshark/src/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/wireshark/src/Makefile.am b/tools/wireshark/src/Makefile.am

Re: [libvirt] [PATCH v2] rpm-build: use pkg-config to detect wireshark presence

2015-03-17 Thread Pavel Hrdina
On Tue, Mar 17, 2015 at 10:04:18AM +, Daniel P. Berrange wrote: > On Tue, Mar 17, 2015 at 09:18:06AM +0100, Pavel Hrdina wrote: > > Wireshark supports pkg-config since 1.11.3. Right now we build > > wireshark-dissectior tool as default trough rpm build only on > > fedora >= 21 and there is new

Re: [libvirt] [PATCH] network: Resolve Coverity FORWARD_NULL

2015-03-17 Thread Michal Privoznik
On 16.03.2015 14:16, John Ferlan wrote: > The following is a long winded way to say this patch is avoiding a > false positive. > > Coverity complains that calling networkPlugBandwidth() could eventually > end up with a NULL dereference on iface->bandwidth because in the > networkAllocateActualDevi

  1   2   >