Re: [libvirt] [PATCH] LXC: trivially support flag VIR_DRV_FEATURE_TYPED_PARAM_STRING

2014-06-24 Thread chenhanx...@cn.fujitsu.com
-Original Message- From: Ján Tomko [mailto:jto...@redhat.com] Sent: Monday, June 23, 2014 9:08 PM To: Chen, Hanxiao/陈 晗霄; libvir-list@redhat.com Subject: Re: [libvirt] [PATCH] LXC: trivially support flag VIR_DRV_FEATURE_TYPED_PARAM_STRING On 06/23/2014 09:28 AM, Chen Hanxiao

Re: [libvirt] [PATCH 2/5] conf: Introduce viremulator_capabilities

2014-06-24 Thread Peter Krempa
On 06/20/14 16:19, Michal Privoznik wrote: The virEmulatorCapabilities is going to hold emulator capabilities, surprisingly. It's intended to be able to cover qemuCaps, lxcCaps (once we invent them, if ever) and so on. Among with adding the code itself, both some documentation and basic

Re: [libvirt] [PATCH v4 1/5] blockjob: allow omitted arguments to QMP block-commit

2014-06-24 Thread Peter Krempa
On 06/24/14 01:30, Eric Blake wrote: We are about to turn on support for active block commit. Although qemu 2.0 was the first version to mostly support it, that version mis-handles 0-length files, and doesn't have anything available for easy probing. But qemu 2.1 fixed bugs, and made life

Re: [libvirt] [PATCH v4 2/5] blockjob: turn on qemu capability bit for active commit

2014-06-24 Thread Peter Krempa
On 06/24/14 01:30, Eric Blake wrote: Use the probing functionality added in the last patch to turn on a capability bit when active commit is present, and gate active commit on that capability. For my own reference: the difference between BLOCKJOB_SYNC and BLOCKJOB_ASYNC is whether qemu

[libvirt] [PATCH v2] LXC: trivially support flag VIR_DRV_FEATURE_TYPED_PARAM_STRING

2014-06-24 Thread Chen Hanxiao
fix: virsh -c lxc:/// memtune DOMAIN error: Unable to get number of memory parameters error: unsupported flags (0x4) in function lxcDomainGetMemoryParameters Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v2: also fix a similar issue in lxcDomainGetSchedulerParametersFlags

Re: [libvirt] [PATCH 2/2] graphics: remember graphics not auto allocated ports

2014-06-24 Thread Ján Tomko
On 06/23/2014 08:15 PM, Giuseppe Scrivano wrote: When looking for a port to allocate, the port allocator didn't take in consideration ports that are statically set by the user. Defining these two graphics elements in the XML would cause an error, as the port allocator would try to use the

Re: [libvirt] [PATCH v4 3/5] blockjob: expose active commit capability

2014-06-24 Thread Peter Krempa
On 06/24/14 01:30, Eric Blake wrote: Add an element to QEMU's capability XML, to show if the underlying qemu binary supports active commit. This allows the client to know ahead of time if they can rely on this method, or must fall back to older techniques such as blockpull. Without this

Re: [libvirt] [PATCH 2/3] virNumaGetPages: Don't fail on huge page-less systems

2014-06-24 Thread Ján Tomko
On 06/23/2014 03:59 PM, Michal Privoznik wrote: If we are running on a system that is not capable of huge pages (e.g. because the kernel is not configured that way) we still try to open /sys/kernel/mm/hugepages/ which however does not exist. We should be tolerant to this specific use case.

Re: [libvirt] [PATCH 1/3] virNumaGetPageInfo: Take huge pages into account

2014-06-24 Thread Ján Tomko
On 06/23/2014 03:59 PM, Michal Privoznik wrote: On the Linux kernel, if huge pages are allocated the size they cut off from memory is accounted under the 'MemUsed' in the meminfo file. However, we want the sum to be subtracted from 'MemTotal'. This patch implements this feature. After this

Re: [libvirt] [PATCH v4 4/5] blockcommit: track job type in xml

2014-06-24 Thread Peter Krempa
On 06/24/14 01:30, Eric Blake wrote: A future patch is going to wire up qemu active block commit jobs; but as they have similar events and are canceled/pivoted in the same way as block copy jobs, it is easiest to track all bookkeeping for the commit job by reusing the mirror element. This

Re: [libvirt] [PATCH v4 5/5] blockcommit: turn on active commit

2014-06-24 Thread Peter Krempa
On 06/24/14 01:30, Eric Blake wrote: With this in place, I can (finally!) now do: virsh blockcommit $dom vda --shallow --verbose --pivot and watch qemu shorten the backing chain by one, followed by libvirt automatically updating the dumpxml output, effectively undoing the work of virsh

Re: [libvirt] [PATCHv5 03/19] storage: gluster: Add backend to return unique storage file path

2014-06-24 Thread Peter Krempa
On 06/24/14 05:35, Eric Blake wrote: On 06/19/2014 07:59 AM, Peter Krempa wrote: Use virStorageFileSimplifyPathInternal to canonicalize gluster paths via a callback and use it for the unique volume path retrieval API. --- src/storage/storage_backend_gluster.c | 80

Re: [libvirt] [PATCH 2/2] graphics: remember graphics not auto allocated ports

2014-06-24 Thread Giuseppe Scrivano
Ján Tomko jto...@redhat.com writes: On 06/23/2014 08:15 PM, Giuseppe Scrivano wrote: When looking for a port to allocate, the port allocator didn't take in consideration ports that are statically set by the user. Defining these two graphics elements in the XML would cause an error, as the

Re: [libvirt] [PATCH v2] LXC: trivially support flag VIR_DRV_FEATURE_TYPED_PARAM_STRING

2014-06-24 Thread Ján Tomko
On 06/24/2014 09:24 AM, Chen Hanxiao wrote: fix: virsh -c lxc:/// memtune DOMAIN error: Unable to get number of memory parameters error: unsupported flags (0x4) in function lxcDomainGetMemoryParameters Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v2: also fix a similar issue

Re: [libvirt] [PATCH V3] enhance capabilities mode hostdev process

2014-06-24 Thread Jincheng Miao
ping any ideas? - Original Message - hostdev has mode capabilities for LXC, from formatdomain.html: Block / character devices from the host can be passed through to the guest using the hostdev element. This is only possible with container based virtualization. since after 1.0.1 for

Re: [libvirt] [PATCH libvirt] xen: handle root= in xen-xm configuration files.

2014-06-24 Thread Ian Campbell
On Thu, 2014-06-19 at 00:15 -0600, Jim Fehlig wrote: Ian Campbell wrote: On Tue, 2014-06-17 at 16:24 +0100, Ian Campbell wrote: +if (xenXMConfigGetString(conf, extra, extra, NULL) 0) This was subtly broken. The default needs to be . Turns out, it wasn't :).

[libvirt] [PATCH] storage: gluster: Avoid name shadow on older compilers

2014-06-24 Thread Peter Krempa
s/link/linkpath/g in virStorageFileBackendGlusterReadlinkCallback as older gcc complains. --- Notes: Pushed as trivial. src/storage/storage_backend_gluster.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storage/storage_backend_gluster.c

Re: [libvirt] [PATCH v2] LXC: trivially support flag VIR_DRV_FEATURE_TYPED_PARAM_STRING

2014-06-24 Thread chenhanx...@cn.fujitsu.com
-Original Message- From: Ján Tomko [mailto:jto...@redhat.com] Sent: Tuesday, June 24, 2014 4:57 PM To: Chen, Hanxiao/陈 晗霄; libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v2] LXC: trivially support flag VIR_DRV_FEATURE_TYPED_PARAM_STRING On 06/24/2014 09:24 AM, Chen Hanxiao

Re: [libvirt] [PATCH 2/5] conf: Introduce viremulator_capabilities

2014-06-24 Thread Daniel P. Berrange
On Tue, Jun 24, 2014 at 09:03:51AM +0200, Peter Krempa wrote: On 06/20/14 16:19, Michal Privoznik wrote: The virEmulatorCapabilities is going to hold emulator capabilities, surprisingly. It's intended to be able to cover qemuCaps, lxcCaps (once we invent them, if ever) and so on. Among with

[libvirt] [PATCH v3] LXC: trivially support flag VIR_DRV_FEATURE_TYPED_PARAM_STRING

2014-06-24 Thread Chen Hanxiao
fix: virsh -c lxc:/// memtune DOMAIN error: Unable to get number of memory parameters error: unsupported flags (0x4) in function lxcDomainGetMemoryParameters Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v2: also fix a similar issue in lxcDomainGetSchedulerParametersFlags v3: fix

[libvirt] [PATCH] LXC: update comments of lxcDomainCreateXMLWithFiles() and lxcDomainCreateXML()

2014-06-24 Thread Wangrui (K)
update comments of lxcDomainCreateXMLWithFiles() and lxcDomainCreateXML() Signed-off-by: Yue wenyuan yueweny...@huawei.com Signed-off-by: Wang Rui moon.wang...@huawei.com --- src/lxc/lxc_driver.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCH 1/3] virNumaGetPageInfo: Take huge pages into account

2014-06-24 Thread Michal Privoznik
On 24.06.2014 10:15, Ján Tomko wrote: On 06/23/2014 03:59 PM, Michal Privoznik wrote: On the Linux kernel, if huge pages are allocated the size they cut off from memory is accounted under the 'MemUsed' in the meminfo file. However, we want the sum to be subtracted from 'MemTotal'. This patch

Re: [libvirt] [PATCH V3] enhance capabilities mode hostdev process

2014-06-24 Thread Pavel Hrdina
On 19.6.2014 19:59, Jincheng Miao wrote: hostdev has mode capabilities for LXC, from formatdomain.html: Block / character devices from the host can be passed through to the guest using the hostdev element. This is only possible with container based virtualization. since after 1.0.1 for LXC

Re: [libvirt] [PATCH 1/3] virNumaGetPageInfo: Take huge pages into account

2014-06-24 Thread Ján Tomko
On 06/24/2014 11:56 AM, Michal Privoznik wrote: On 24.06.2014 10:15, Ján Tomko wrote: On 06/23/2014 03:59 PM, Michal Privoznik wrote: + * kernel limitation. The problem is, if there are some huge + * pages allocated, they are accounted under the 'MemUsed' field + * in the meminfo file instead

Re: [libvirt] [PATCH v3] LXC: trivially support flag VIR_DRV_FEATURE_TYPED_PARAM_STRING

2014-06-24 Thread Ján Tomko
On 06/24/2014 11:44 AM, Chen Hanxiao wrote: fix: virsh -c lxc:/// memtune DOMAIN error: Unable to get number of memory parameters error: unsupported flags (0x4) in function lxcDomainGetMemoryParameters Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v2: also fix a similar issue

Re: [libvirt] [Xen-devel] [PATCH] libxl: prefer qdisk for driver name='file'

2014-06-24 Thread Ian Campbell
On Fri, 2014-06-20 at 15:07 -0600, Jim Fehlig wrote: The libxl driver currently sets the disk backend to LIBXL_DISK_BACKEND_TAP when driver name='file' is specified in the disk config. qdisk should be prefered with this configuration, otherwise existing configuration such as the following,

[libvirt] [PATCH] Fix shadowed variable with older gcc

2014-06-24 Thread Ján Tomko
Commit 2cff94c fixed the shadowed 'link' added by commit 975f0e2, but forgot the 'link' added by commit 08aa22e. --- Pushed as a build-breaker fix. tests/virstoragetest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c

Re: [libvirt] [PATCH v7 2/4] net-dhcp-leases: Implement the remote protocol

2014-06-24 Thread Daniel P. Berrange
On Tue, Jun 24, 2014 at 02:31:50AM +0530, Nehal J Wani wrote: diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index bef9fd7..d6eb477 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -7549,6 +7549,190 @@ remoteNodeGetFreePages(virConnectPtr conn,

Re: [libvirt] [PATCH v7 1/4] net-dhcp-leases: Implement the public APIs

2014-06-24 Thread Daniel P. Berrange
On Tue, Jun 24, 2014 at 02:31:49AM +0530, Nehal J Wani wrote: Introduce 3 new APIs, virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC and virNetworkDHCPLeaseFree. * virNetworkGetDHCPLeases: returns the dhcp leases information for a given virtual network. For DHCPv4, the

[libvirt] [PATCH v2 0/2] virtportallocator: remember not auto allocated graphics ports

2014-06-24 Thread Giuseppe Scrivano
Changes in v2: * virPortAllocatorSetUsed returns an error if the port is already used. * Changed *[pP]ortAllocated to *[pP]ortReserved that keep track only of ports that were marked used but not bound. * Handle separately port and tlsPort for SPICE. Fix a conflict when both autoport graphics

[libvirt] [PATCH v2 1/2] virtportallocator: new function virPortAllocatorSetUsed

2014-06-24 Thread Giuseppe Scrivano
virPortAllocatorSetUsed permits to set a port as already used and prevent the port allocator to use it without any attempt to bind it. Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- src/libvirt_private.syms| 1 + src/util/virportallocator.c | 44

[libvirt] [PATCH v2 2/2] graphics: remember graphics not auto allocated ports

2014-06-24 Thread Giuseppe Scrivano
When looking for a port to allocate, the port allocator didn't take in consideration ports that are statically set by the user. Defining these two graphics elements in the XML would cause an error, as the port allocator would try to use the same port for the spice graphics element: graphics

Re: [libvirt] [PATCH v2 1/2] virtportallocator: new function virPortAllocatorSetUsed

2014-06-24 Thread Michal Privoznik
On 24.06.2014 13:34, Giuseppe Scrivano wrote: virPortAllocatorSetUsed permits to set a port as already used and prevent the port allocator to use it without any attempt to bind it. Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- src/libvirt_private.syms| 1 +

Re: [libvirt] [PATCH v2 2/2] graphics: remember graphics not auto allocated ports

2014-06-24 Thread Michal Privoznik
On 24.06.2014 13:34, Giuseppe Scrivano wrote: When looking for a port to allocate, the port allocator didn't take in consideration ports that are statically set by the user. Defining these two graphics elements in the XML would cause an error, as the port allocator would try to use the same

[libvirt] [PATCH] bridge: leases: Fix potential crash caused by use after free

2014-06-24 Thread Peter Krempa
Don't free individual JSON array members as the array will be freed at the end. This may potentially lead to a crash although it didn't crash on my setup. --- src/network/bridge_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/network/bridge_driver.c

Re: [libvirt] [PATCH v2 1/2] virtportallocator: new function virPortAllocatorSetUsed

2014-06-24 Thread Giuseppe Scrivano
Michal Privoznik mpriv...@redhat.com writes: On 24.06.2014 13:34, Giuseppe Scrivano wrote: virPortAllocatorSetUsed permits to set a port as already used and prevent the port allocator to use it without any attempt to bind it. Signed-off-by: Giuseppe Scrivano gscri...@redhat.com ---

Re: [libvirt] [PATCH] bridge: leases: Fix potential crash caused by use after free

2014-06-24 Thread Peter Krempa
On 06/24/14 13:54, Peter Krempa wrote: Don't free individual JSON array members as the array will be freed at the end. This may potentially lead to a crash although it didn't crash on my setup. --- src/network/bridge_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) It

Re: [libvirt] [PATCH v7 1/4] net-dhcp-leases: Implement the public APIs

2014-06-24 Thread Peter Krempa
On 06/23/14 23:01, Nehal J Wani wrote: Introduce 3 new APIs, virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC and virNetworkDHCPLeaseFree. * virNetworkGetDHCPLeases: returns the dhcp leases information for a given virtual network. For DHCPv4, the information returned: -

Re: [libvirt] [PATCH v7 0/4] Introduce APIs to extract DHCP leases info

2014-06-24 Thread Peter Krempa
On 06/23/14 23:01, Nehal J Wani wrote: This API returns the leases information stored in the DHCP leases file of dnsmasq for a given virtual network. It contacts the bridge network driver, which parses a custom leases file created by libvirt. It supports two methods: 1. Return info for

Re: [libvirt] [PATCH v2 1/2] virtportallocator: new function virPortAllocatorSetUsed

2014-06-24 Thread Michal Privoznik
On 24.06.2014 14:04, Giuseppe Scrivano wrote: Michal Privoznik mpriv...@redhat.com writes: On 24.06.2014 13:34, Giuseppe Scrivano wrote: virPortAllocatorSetUsed permits to set a port as already used and prevent the port allocator to use it without any attempt to bind it. Signed-off-by:

Re: [libvirt] [PATCH] bridge: leases: Fix potential crash caused by use after free

2014-06-24 Thread Daniel P. Berrange
On Tue, Jun 24, 2014 at 01:54:42PM +0200, Peter Krempa wrote: Don't free individual JSON array members as the array will be freed at the end. This may potentially lead to a crash although it didn't crash on my setup. --- src/network/bridge_driver.c | 4 +--- 1 file changed, 1 insertion(+),

Re: [libvirt] [PATCH v7 1/4] net-dhcp-leases: Implement the public APIs

2014-06-24 Thread Daniel P. Berrange
On Tue, Jun 24, 2014 at 02:18:32PM +0200, Peter Krempa wrote: On 06/23/14 23:01, Nehal J Wani wrote: Introduce 3 new APIs, virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC and virNetworkDHCPLeaseFree. * virNetworkGetDHCPLeases: returns the dhcp leases information for a given

[libvirt] [PATCH] Change 'interface' to 'iface' in virNetworkDHCPLease

2014-06-24 Thread Daniel P. Berrange
Variables/fields named 'interface' clash with system header symbols on some platforms. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- daemon/remote.c | 4 ++-- include/libvirt/libvirt.h.in | 2 +- src/libvirt.c| 2 +- src/network/bridge_driver.c | 2 +-

[libvirt] [PATCH 1/3] Free file header in virStorageFileGetMetadataRecurse

2014-06-24 Thread Ján Tomko
Introduced by commit 2bdb8b9 --- src/storage/storage_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 7116185..a5adc63 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -2906,6 +2906,7 @@

[libvirt] [PATCH 2/3] Rework remoteSerializeDHCPLease

2014-06-24 Thread Ján Tomko
Don't leak the temporary variables on success if NULL is returned for that field. Don't dereference NULL on failure to allocate some of the temporaries. Introduced by commit 990c3b6 --- daemon/remote.c | 53 ++--- 1 file changed, 34 insertions(+),

[libvirt] [PATCH 0/3] Make libvirt leak less memory

2014-06-24 Thread Ján Tomko
Ján Tomko (3): Free file header in virStorageFileGetMetadataRecurse Rework remoteSerializeDHCPLease Free DHCP leases file in networkGetDHCPLeasesHelper daemon/remote.c | 53 src/network/bridge_driver.c | 1 +

[libvirt] [PATCH 3/3] Free DHCP leases file in networkGetDHCPLeasesHelper

2014-06-24 Thread Ján Tomko
Introduced by commit ba51398 --- src/network/bridge_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index a407c6e..69c66f3 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -3529,6 +3529,7 @@

Re: [libvirt] [PATCH 0/3] Make libvirt leak less memory

2014-06-24 Thread Michal Privoznik
On 24.06.2014 14:45, Ján Tomko wrote: Ján Tomko (3): Free file header in virStorageFileGetMetadataRecurse Rework remoteSerializeDHCPLease Free DHCP leases file in networkGetDHCPLeasesHelper daemon/remote.c | 53

Re: [libvirt] [PATCH 2/3] Rework remoteSerializeDHCPLease

2014-06-24 Thread Daniel P. Berrange
On Tue, Jun 24, 2014 at 02:45:33PM +0200, Ján Tomko wrote: Don't leak the temporary variables on success if NULL is returned for that field. Don't dereference NULL on failure to allocate some of the temporaries. Introduced by commit 990c3b6 --- daemon/remote.c | 53

[libvirt] Regarding guest-file-write

2014-06-24 Thread Puneet Bakshi
Hi, From host, I wrote 26 alphabets in guest file (/tmp/testqga) using guest-file-write guest agent command (logs pasted below). I faced 2 issues when doing that. 1a. It could wrote only 18bytes! Why could it not write all 26 characters? Are we supposed to track how much data is written and need

Re: [libvirt] [PATCH 1/3] Free file header in virStorageFileGetMetadataRecurse

2014-06-24 Thread Daniel P. Berrange
On Tue, Jun 24, 2014 at 02:45:32PM +0200, Ján Tomko wrote: Introduced by commit 2bdb8b9 --- src/storage/storage_driver.c | 1 + 1 file changed, 1 insertion(+) ACK Regards, Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org

Re: [libvirt] [PATCH 3/3] Free DHCP leases file in networkGetDHCPLeasesHelper

2014-06-24 Thread Daniel P. Berrange
On Tue, Jun 24, 2014 at 02:45:34PM +0200, Ján Tomko wrote: Introduced by commit ba51398 --- src/network/bridge_driver.c | 1 + 1 file changed, 1 insertion(+) ACK Regards, Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org

Re: [libvirt] Regarding guest-file-write

2014-06-24 Thread Daniel P. Berrange
On Tue, Jun 24, 2014 at 06:20:16PM +0530, Puneet Bakshi wrote: Hi, From host, I wrote 26 alphabets in guest file (/tmp/testqga) using guest-file-write guest agent command (logs pasted below). I faced 2 issues when doing that. 1a. It could wrote only 18bytes! Why could it not write all 26

Re: [libvirt] Regarding guest-file-write

2014-06-24 Thread Puneet Bakshi
1. In that case, I hope it allow sending binary data (non-ASCII) also. 2. If I encode my data in base-64 form, is there a limit on size of the data I can pass (or I can pass arbitrarily large amount of data). ​Regards​, ~Puneet On Tue, Jun 24, 2014 at 6:27 PM, Daniel P. Berrange

Re: [libvirt] [PATCH] bridge: leases: Fix potential crash caused by use after free

2014-06-24 Thread Peter Krempa
On 06/24/14 14:23, Daniel P. Berrange wrote: On Tue, Jun 24, 2014 at 01:54:42PM +0200, Peter Krempa wrote: Don't free individual JSON array members as the array will be freed at the end. This may potentially lead to a crash although it didn't crash on my setup. ---

Re: [libvirt] [PATCH 4/5] install vbox api register in vbox_driver

2014-06-24 Thread Michal Privoznik
On 23.06.2014 06:25, Taowei wrote: Register pVBoxAPI in vbox_common.c with the current vbox version. --- src/vbox/vbox_driver.c | 35 +++ 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/src/vbox/vbox_driver.c b/src/vbox/vbox_driver.c index

Re: [libvirt] [PATCH 2/5] a sample of vbox_common function : vboxInitialize

2014-06-24 Thread Michal Privoznik
On 23.06.2014 06:25, Taowei wrote: This is a example of how common codes work. The file vbox_commondef.h tells the common codes to treat vbox structs defined in vbox_common.h as a void* type. --- src/vbox/vbox_common.c| 89 +

Re: [libvirt] [PATCH 0/5] Outline of rewriting vbox driver, with common code support.

2014-06-24 Thread Michal Privoznik
On 23.06.2014 06:25, Taowei wrote: Michal asked me to try working out a sample of vbox driver's common code. Here it is. As the PATCHv2 is pending, I merged it. Taowei (5): define interface with vbox_common a sample of vbox_common function : vboxInitialize implement vboxUniformedAPI in

Re: [libvirt] [PATCH 5/5] make new files be compiled by libvirt

2014-06-24 Thread Michal Privoznik
On 23.06.2014 06:25, Taowei wrote: Changes in makefile and make new files to be compiled. --- po/POTFILES.in |1 + src/Makefile.am |4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 31a8381..d20107d 100644 ---

Re: [libvirt] [PATCH 1/5] define interface with vbox_common

2014-06-24 Thread Michal Privoznik
On 23.06.2014 06:25, Taowei wrote: The vboxGlobalData and the vboxUniformedAPI is defined here. It defines the middle layer interface. When using this file, it needs a context to explain how *.c files treat vbox structs in vboxGlobalData(vboxObj, vboxSession and so on). See annotate in this

Re: [libvirt] [PATCH 3/5] implement vboxUniformedAPI in vbox_tmpl.c

2014-06-24 Thread Michal Privoznik
On 23.06.2014 06:25, Taowei wrote: Version specified codes for vboxUniformedAPI is implemented here, almost the same as PATCHv2. Common codes are moved to vbox_common.h and vbox_common.c. --- src/vbox/vbox_tmpl.c | 142 ++ 1 file changed, 52

[libvirt] libvirt domblkstat result is quite different from the info acquired from /proc/[pid]/io

2014-06-24 Thread coperd
Hi, all. I’m current doing monitoring jobs(CPU, memory and disk utilisation) on some KVM-based VMs using libvirt, but i came to some confusions. For the disk data(blkstat), I find that the results acquired by virDomainBlockStats is not consistent with the value read from /proc/[vm_pid]/io(i

Re: [libvirt] [PATCH] LXC: update comments of lxcDomainCreateXMLWithFiles() and lxcDomainCreateXML()

2014-06-24 Thread Michal Privoznik
On 24.06.2014 11:45, Wangrui (K) wrote: update comments of lxcDomainCreateXMLWithFiles() and lxcDomainCreateXML() Signed-off-by: Yue wenyuan yueweny...@huawei.com Signed-off-by: Wang Rui moon.wang...@huawei.com --- src/lxc/lxc_driver.c | 17 ++--- 1 file changed, 14 insertions(+), 3

[libvirt] Bug: iohelper drops I/O error messages

2014-06-24 Thread Jason J. Herne
During a recent managed save operation I received the following error message: error: operation failed: domain save job: unexpectedly failed. It turns out that I had run out of disk space. After a brief investigation I discovered that libvirt_iohelper is exec'ed and is used to handle all

Re: [libvirt] [Qemu-devel] Regarding guest-file-write

2014-06-24 Thread Eric Blake
On 06/24/2014 06:50 AM, Puneet Bakshi wrote: Hi, From host, I wrote 26 alphabets in guest file (/tmp/testqga) using guest-file-write guest agent command (logs pasted below). I faced 2 issues when doing that. 1a. It could wrote only 18bytes! Why could it not write all 26 characters? Are we

Re: [libvirt] [Qemu-devel] Regarding guest-file-write

2014-06-24 Thread Eric Blake
On 06/24/2014 07:10 AM, Puneet Bakshi wrote: [please don't top-post on technical lists] 1. In that case, I hope it allow sending binary data (non-ASCII) also. Yes, the reason guest-file-write takes base64 encoded data is PRECISELY so that it can cope with binary data while still using only

Re: [libvirt] [PATCH 2/2] nwfilter: enum cleanups in src/nwfilter/*

2014-06-24 Thread Julio Faracco
ping... -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 1/2] qemu: enum cleanups in src/qemu/*

2014-06-24 Thread Julio Faracco
ping... -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] libxl: fix version annotation of migration functions

2014-06-24 Thread Jim Fehlig
Commit 9b8d6e1e missed updating the libvirt version which introduced support for domainMigrate*3Params functions. Signed-off-by: Jim Fehlig jfeh...@suse.com --- This patch only changes the comments describing when these functions were introduced. Pushing under the trivial rule.

Re: [libvirt] [PATCH 1/2] qemu: enum cleanups in src/qemu/*

2014-06-24 Thread Eric Blake
On 06/15/2014 10:32 AM, Julio Faracco wrote: As we are doing with the enum structures, a cleanup in src/qemu/ directory was done now. All the enums that were defined in the header files were converted to typedefs in this directory. This patch includes all the adjustments to remove conflicts

Re: [libvirt] [PATCH 2/2] nwfilter: enum cleanups in src/nwfilter/*

2014-06-24 Thread Eric Blake
On 06/15/2014 10:32 AM, Julio Faracco wrote: As we are doing with the enum structures, a cleanup in src/nwfilter/ directory was done now. All the enums that were defined in the header files were converted to typedefs in this directory. This patch includes all the adjustments to remove

Re: [libvirt] [PATCH 2/2] nwfilter: enum cleanups in src/nwfilter/*

2014-06-24 Thread Eric Blake
On 06/24/2014 01:02 PM, Eric Blake wrote: On 06/15/2014 10:32 AM, Julio Faracco wrote: As we are doing with the enum structures, a cleanup in src/nwfilter/ directory was done now. All the enums that were defined in the header files were converted to typedefs in this directory. This patch

Re: [libvirt] Bug: iohelper drops I/O error messages

2014-06-24 Thread Eric Blake
On 06/24/2014 08:07 AM, Jason J. Herne wrote: During a recent managed save operation I received the following error message: error: operation failed: domain save job: unexpectedly failed. It turns out that I had run out of disk space. After a brief investigation I discovered that

Re: [libvirt] [PATCH 2/5] conf: Introduce viremulator_capabilities

2014-06-24 Thread Eric Blake
On 06/24/2014 03:39 AM, Daniel P. Berrange wrote: We also have a features subelement of guest in the capabilities XML which is used for a similar thing although it doesn't support a per-machine-type output, only per-binary capabilities. Should we add this more granular approach and abandon

Re: [libvirt] [PATCH libvirt] xen: handle root= in xen-xm configuration files.

2014-06-24 Thread Eric Blake
On 06/24/2014 03:20 AM, Ian Campbell wrote: I see VIR_STRDUP actually does handle NULL input correctly, which was what I was worried about. Yes, it is by design that VIR_STRDUP(NULL) works, and gives a different return value (0) than when dup'ing a string (positive) or on failure (negative).

Re: [libvirt] libvirt domblkstat result is quite different from the info acquired from /proc/[pid]/io

2014-06-24 Thread Eric Blake
On 06/23/2014 09:42 PM, coperd wrote: [can you convince your mailer to wrap long lines?] Hi, all. I’m current doing monitoring jobs(CPU, memory and disk utilisation) on some KVM-based VMs using libvirt, but i came to some confusions. For the disk data(blkstat), I find that the results

Re: [libvirt] [PATCHv5 04/19] util: storage: Add helper to resolve relative path difference

2014-06-24 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: This patch introduces a function that will allow us to resolve a relative difference between two elements of a disk backing chain. This fucntion will be used to allow relative block commit and block pull s/fucntion/function/ where we need to

Re: [libvirt] [PATCHv5 05/19] tests: virstoragetest: Remove expBackingStore field

2014-06-24 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: Now that we changed ordering of the stored metadata so that the backing store is described by the child element the test should reflect this change too. Remove the expected backing store field as it's actually described by the next element in the

Re: [libvirt] [PATCHv5 06/19] storage: Store relative path only for relatively backed storage

2014-06-24 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: Due to various refactors and compatibility with the virstoragetest the relPath field of the virStorageSource structure was always filled either with the relative name or the full path in case of abslutely backed s/abslutely/absolutely/ storage.

Re: [libvirt] [PATCHv5 07/19] tests: virstoragetest: Remove now unused pathAbs

2014-06-24 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: Separately remove the now unused variable. --- tests/virstoragetest.c | 15 --- 1 file changed, 15 deletions(-) ACK. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org

Re: [libvirt] [PATCHv5 08/19] util: storage: Remove now redundant backingRelative from virStorageSource

2014-06-24 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: Now that we store only relative names in virStorageSource's member relPath the backingRelative member is obsolete. Remove it and adapt the code to the removal. --- src/util/virstoragefile.c | 4 +--- src/util/virstoragefile.h | 2 --

Re: [libvirt] [PATCHv5 09/19] tests: virstoragetest: Don't test relative start of backing chains

2014-06-24 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: libvirt always uses an absolute path to address the top image of an image chain. Our storage test tests also the relative path which won't ever be used. Additionally it makes the test more complicated. It covers some interesting corner cases that

Re: [libvirt] [PATCHv5 10/19] tests: virstoragetest: Remove unneeded relative test plumbing

2014-06-24 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: After we don't test relative paths, remove even more unnecessary cruft from the test code. --- tests/virstoragetest.c | 61 +++--- 1 file changed, 18 insertions(+), 43 deletions(-) ACK. -- Eric Blake

Re: [libvirt] [PATCHv5 11/19] storage: Don't canonicalize paths unnecessarily

2014-06-24 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: Store backing chain paths as non-canonical. The canonicalization step will be already taken. This will allow to avoid storing unnecessary amounts of data. --- src/util/virstoragefile.c | 33 ++--- tests/virstoragetest.c

Re: [libvirt] [Xen-devel] [PATCH] libxl: prefer qdisk for driver name='file'

2014-06-24 Thread Jim Fehlig
Ian Campbell wrote: On Fri, 2014-06-20 at 15:07 -0600, Jim Fehlig wrote: The libxl driver currently sets the disk backend to LIBXL_DISK_BACKEND_TAP when driver name='file' is specified in the disk config. qdisk should be prefered with this configuration, otherwise existing configuration

Re: [libvirt] [PATCHv5 12/19] storage: Don't store parent directory of an image explicitly

2014-06-24 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: The parent directory doesn't necessarily need to be stored after we don't mangle the path stored in the image. Remove it and tweak the code to avoid using it. --- src/storage/storage_driver.c | 11 ++- src/util/virstoragefile.c| 68

Re: [libvirt] [PATCHv5 14/19] qemu: monitor: Add argument for specifying backing name for block commit

2014-06-24 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: To allow changing the name that is recorded in the overlay of the TOP image used in a block commit operation, we need to specify the backing name to qemu. This is done via the backing-file attribute to the block-commit command. Yeah, I can see how

Re: [libvirt] [PATCH] LXC: update comments of lxcDomainCreateXMLWithFiles() and lxcDomainCreateXML()

2014-06-24 Thread Wangrui (K)
-Original Message- From: Michal Privoznik [mailto:mpriv...@redhat.com] Sent: Tuesday, June 24, 2014 9:38 PM To: Wangrui (K); libvir-list@redhat.com Subject: Re: [libvirt] [PATCH] LXC: update comments of lxcDomainCreateXMLWithFiles() and lxcDomainCreateXML() One does not

[libvirt] [PATCH] LXC: check whether we get MemSwap[Total|Usage]

2014-06-24 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- src/lxc/lxc_cgroup.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c index 8dfdc60..39e30ad 100644 --- a/src/lxc/lxc_cgroup.c +++ b/src/lxc/lxc_cgroup.c @@ -288,8

Re: [libvirt] [Xen-devel] [PATCH RFC OSSTEST 7/9] Toolstack: Abstract away migration support check.

2014-06-24 Thread Jim Fehlig
Jim Fehlig wrote: Ian Campbell wrote: Jim, What would be the right thing to do for this? The intention is for osstest to skip migration tests when that feature is unimplemented by the toolstack/xen/arch combination. It looks like the output of virsh capabilities indicates migration:

Re: [libvirt] [PATCH] LXC: check whether we get MemSwap[Total|Usage]

2014-06-24 Thread Martin Kletzander
On Wed, Jun 25, 2014 at 09:57:32AM +0800, Chen Hanxiao wrote: Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- src/lxc/lxc_cgroup.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c index 8dfdc60..39e30ad 100644 ---