Re: [libvirt] [PATCHv2 2/7] interface: define internal driver API for network config transactions

2011-05-24 Thread Daniel Veillard
On Thu, May 19, 2011 at 04:51:24PM -0400, Laine Stump wrote: From: Michal Privoznik mpriv...@redhat.com --- src/driver.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/driver.h b/src/driver.h index 450dd53..c9747aa 100644 --- a/src/driver.h +++

Re: [libvirt] [PATCHv2 1/7] interface: new public API for networkconfig change transactions

2011-05-24 Thread Daniel Veillard
On Thu, May 19, 2011 at 05:15:20PM -0500, Christian Benvenuti (benve) wrote: As a failsafe measure, if neither ncf_change_commit() or ncf_change_rollback() is called by the next time the system reboots, the netcf-transaction initscript will be automatically called to rollback the changes.

Re: [libvirt] [PATCHv2 3/7] interface: implement public APIs for libvirt transactional network changes

2011-05-24 Thread Daniel Veillard
On Thu, May 19, 2011 at 04:51:25PM -0400, Laine Stump wrote: From: Michal Privoznik mpriv...@redhat.com --- src/libvirt.c | 141 - 1 files changed, 139 insertions(+), 2 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c

Re: [libvirt] [PATCHv2 4/7] interface: implement remote protocol for network config transaction API

2011-05-24 Thread Daniel Veillard
On Thu, May 19, 2011 at 04:51:26PM -0400, Laine Stump wrote: From: Michal Privoznik mpriv...@redhat.com --- src/remote/remote_driver.c |3 +++ src/remote/remote_protocol.x | 17 - src/remote_protocol-structs |9 + 3 files changed, 28 insertions(+), 1

Re: [libvirt] [PATCHv2 6/7] interface: Implement driver methods for network config transaction API

2011-05-24 Thread Daniel Veillard
On Thu, May 19, 2011 at 04:51:28PM -0400, Laine Stump wrote: From: Michal Privoznik mpriv...@redhat.com This is the functionality at the end of the libvirt part of the call chain - for each function, the corresponding netcf API is called. --- configure.ac |5 +++

[libvirt] libvirt.so.0: cannot open shared object file: No such file or directory

2011-05-24 Thread YAO
Hi, I cloned the latest libvirt from git and compiled as follows: cd libvirt ./autogen.sh make sudo make install when installing, it reported */usr/bin/install: cannot stat `./xxx.html': No such file or directory*, is that normal? after install completed, I typed virsh, it showed: *virsh: error

[libvirt] [PATCH] Fix netdev detection on RHEL6x versions of qemu

2011-05-24 Thread Neil Wilson
This allows the attach-device derived functions to work on the vanilla RHEL6 versions of qemu. Looking for the '-spice' parameter differentiates the RHEL from non-RHEL versions. Signed-off-by: Neil Wilson n...@brightbox.co.uk --- src/qemu/qemu_capabilities.c |7 --- tests/qemuhelptest.c

[libvirt] [PATCH 0/3] add support for changing blkio parameters for inactive domains

2011-05-24 Thread Hu Tao
This series enables user to change blkio parameters for inactive domains from virsh command line. Hu Tao (3): Add new parameters for blkiotune update qemuDomainGetBlkioParameters to use flags Update qemuDomainSetBlkioParameters to use flags include/libvirt/libvirt.h.in |6 +

[libvirt] [PATCH 3/3] Update qemuDomainSetBlkioParameters to use flags

2011-05-24 Thread Hu Tao
--- src/qemu/qemu_driver.c | 126 ++-- 1 files changed, 90 insertions(+), 36 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ddd3d58..381ecca 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4646,14

[libvirt] [PATCH 1/3] Add new parameters for blkiotune

2011-05-24 Thread Hu Tao
This patch adds three parameters --live, --config and --current for command blkiotune. --- include/libvirt/libvirt.h.in |6 ++ tools/virsh.c| 26 +++--- tools/virsh.pod |6 +- 3 files changed, 34 insertions(+), 4 deletions(-)

[libvirt] [PATCH 2/3] update qemuDomainGetBlkioParameters to use flags

2011-05-24 Thread Hu Tao
--- src/qemu/qemu_driver.c | 124 +--- 1 files changed, 86 insertions(+), 38 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 691965d..ddd3d58 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4725,18

[libvirt] [PATCH] storage: Add comment to picking return value of qemu-img

2011-05-24 Thread Michal Privoznik
Commit d7b2679253504d6defa9fc7159b572cfd6a25a95 introduced a return value picking of qemu-img on '-h', but without any comment. --- src/storage/storage_backend.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/storage/storage_backend.c

Re: [libvirt] libvirt.so.0: cannot open shared object file: No such file or directory

2011-05-24 Thread Matthias Bolte
2011/5/24 YAO yffbr...@gmail.com: Hi, I cloned the latest libvirt from git and compiled as follows: cd libvirt ./autogen.sh make sudo make install when installing, it reported /usr/bin/install: cannot stat `./xxx.html': No such file or directory, is that normal? You are probably missing

Re: [libvirt] Git snapshot tar not working?

2011-05-24 Thread Matthias Bolte
2011/5/20 Neil Wilson n...@brightbox.co.uk: Hi, Has the git snapshot tar service stopped working? The file is dated 6th May and is very out of date compared to git head. Rgs Neil I noticed this today too. Also the file from May 6th is broken gzip: stdin: invalid compressed data--crc

Re: [libvirt] [PATCH] Don't restore labels on network shares

2011-05-24 Thread Daniel P. Berrange
On Mon, May 23, 2011 at 10:03:58PM +0200, Christian Brunner wrote: Restoring security labels on network shares doesn't work and will cause an error. Therefore it should be skipped. Signed-off-by: Christian Brunner c...@muc.de --- src/security/security_dac.c |7 +++ 1 files

Re: [libvirt] [PATCH] Fix netdev detection on RHEL6x versions of qemu

2011-05-24 Thread Daniel P. Berrange
On Tue, May 24, 2011 at 07:16:28AM +0100, Neil Wilson wrote: This allows the attach-device derived functions to work on the vanilla RHEL6 versions of qemu. Looking for the '-spice' parameter differentiates the RHEL from non-RHEL versions. Signed-off-by: Neil Wilson n...@brightbox.co.uk ---

Re: [libvirt] [PATCH] Fix netdev detection on RHEL6x versions of qemu

2011-05-24 Thread Neil Wilson
On Tue, 2011-05-24 at 10:10 +0100, Daniel P. Berrange wrote: IMHO RHEL specific hacks don't belong in upstream libvirt code. Currently there are checks against the qemu-kvm RHEL6 help files in the test system of libvirt, and it is incorrect - as RHEL6 qemu uses netdev, not add_host. So why are

Re: [libvirt] [PATCH] Fix netdev detection on RHEL6x versions of qemu

2011-05-24 Thread Daniel P. Berrange
On Tue, May 24, 2011 at 10:31:19AM +0100, Neil Wilson wrote: On Tue, 2011-05-24 at 10:10 +0100, Daniel P. Berrange wrote: IMHO RHEL specific hacks don't belong in upstream libvirt code. Currently there are checks against the qemu-kvm RHEL6 help files in the test system of libvirt, and it

Re: [libvirt] [PATCH] Fix netdev detection on RHEL6x versions of qemu

2011-05-24 Thread Neil Wilson
On Tue, 2011-05-24 at 10:37 +0100, Daniel P. Berrange wrote: Use the libvirt that ships with RHEL6, or apply the RHEL6 specific patches manually when building an alternative libvirt for RHEL6. It isn't sustainable for upstream projects to deal with hacks for every crazy non-upstream change

Re: [libvirt] [PATCH RFC] Add domainSave/Restore to libxl driver

2011-05-24 Thread Markus Groß
Quoting Jim Fehlig jfeh...@novell.com: Markus Groß wrote: Am Montag 23 Mai 2011 04:30:12 schrieb Jim Fehlig: Jim Fehlig wrote: Markus Groß wrote: This patch adds save/restore functionality to the libxl driver. It is a v2 of this patch:

[libvirt] [PATCH] Allow to explicitly disable the secrets a directory storage driver

2011-05-24 Thread Matthias Bolte
--- configure.ac |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 412fdb8..7940ef0 100644 --- a/configure.ac +++ b/configure.ac @@ -1499,7 +1499,9 @@ AC_SUBST([NETCF_CFLAGS]) AC_SUBST([NETCF_LIBS]) -with_secrets=yes

Re: [libvirt] API Proposal: virDomainBlockPull() (Block device streaming) V4

2011-05-24 Thread Stefan Hajnoczi
On Mon, May 23, 2011 at 5:56 PM, Adam Litke a...@us.ibm.com wrote: /**  * virDomainBlockPull:  * @dom: pointer to domain object  * @path: Fully-qualified filename of disk  * @cursor: pointer to a virDomainBlockPullCursor, or NULL  * @flags: One of virDomainBlockPullFlags, or zero  *  *

Re: [libvirt] [PATCH] conf: Fix incorrect spice graphic XML format on compression options

2011-05-24 Thread Michal Prívozník
On 24.05.2011 13:43, Michal Privoznik wrote: If spice graphics has no channel elements, the output graphics XML is messed up. To prevent this, we need to end the graphics element By messing up I mean something like this: .. graphics type='spice' autoport='yes' image

Re: [libvirt] API Proposal: virDomainBlockPull() (Block device streaming) V4

2011-05-24 Thread Daniel P. Berrange
On Tue, May 24, 2011 at 01:00:04PM +0100, Stefan Hajnoczi wrote: On Mon, May 23, 2011 at 5:56 PM, Adam Litke a...@us.ibm.com wrote: /**  * virDomainBlockPull:  * @dom: pointer to domain object  * @path: Fully-qualified filename of disk  * @cursor: pointer to a virDomainBlockPullCursor,

Re: [libvirt] API Proposal: virDomainBlockPull() (Block device streaming) V4

2011-05-24 Thread Daniel P. Berrange
On Mon, May 23, 2011 at 11:56:03AM -0500, Adam Litke wrote: Here is version 4 of the BlockStream API (now called BlockPull). Hopefully this version addresses all remaining concerns and I can begin to work on the code. Does everyone approve of the new name 'virDomainBlockPull'? Changes

Re: [libvirt] API Proposal: virDomainBlockPull() (Block device streaming) V4

2011-05-24 Thread Adam Litke
On 05/24/2011 07:19 AM, Daniel P. Berrange wrote: On Mon, May 23, 2011 at 11:56:03AM -0500, Adam Litke wrote: Here is version 4 of the BlockStream API (now called BlockPull). Hopefully this version addresses all remaining concerns and I can begin to work on the code. Does everyone approve

Re: [libvirt] API Proposal: virDomainBlockPull() (Block device streaming) V4

2011-05-24 Thread Stefan Hajnoczi
On Tue, May 24, 2011 at 1:16 PM, Daniel P. Berrange berra...@redhat.com wrote: On Tue, May 24, 2011 at 01:00:04PM +0100, Stefan Hajnoczi wrote: On Mon, May 23, 2011 at 5:56 PM, Adam Litke a...@us.ibm.com wrote: /**  * virDomainBlockPull:  * @dom: pointer to domain object  * @path:

[libvirt] [PATCH] qemu: Don't change ownership of file when appending to it

2011-05-24 Thread Michal Privoznik
Saving domain to previously created file changes also its ownership. This is certainly not what users want if some conditions are met: it is a regular, local file and dynamic_ownership is off. --- src/qemu/qemu_driver.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff

Re: [libvirt] API Proposal: virDomainBlockPull() (Block device streaming) V4

2011-05-24 Thread Adam Litke
On 05/24/2011 07:16 AM, Daniel P. Berrange wrote: On Tue, May 24, 2011 at 01:00:04PM +0100, Stefan Hajnoczi wrote: On Mon, May 23, 2011 at 5:56 PM, Adam Litke a...@us.ibm.com wrote: /** * virDomainBlockPull: * @dom: pointer to domain object * @path: Fully-qualified filename of disk *

Re: [libvirt] API Proposal: virDomainBlockPull() (Block device streaming) V4

2011-05-24 Thread Daniel P. Berrange
On Tue, May 24, 2011 at 07:36:36AM -0500, Adam Litke wrote: On 05/24/2011 07:19 AM, Daniel P. Berrange wrote: On Mon, May 23, 2011 at 11:56:03AM -0500, Adam Litke wrote: Here is version 4 of the BlockStream API (now called BlockPull). Hopefully this version addresses all remaining

Re: [libvirt] API Proposal: virDomainBlockPull() (Block device streaming) V4

2011-05-24 Thread Adam Litke
I need to clarify this a bit... On 05/24/2011 08:06 AM, Adam Litke wrote: On 05/24/2011 07:16 AM, Daniel P. Berrange wrote: On Tue, May 24, 2011 at 01:00:04PM +0100, Stefan Hajnoczi wrote: On Mon, May 23, 2011 at 5:56 PM, Adam Litke a...@us.ibm.com wrote: /** * virDomainBlockPull: *

Re: [libvirt] libvirt.so.0: cannot open shared object file: No such file or directory

2011-05-24 Thread YAO
2011/5/24 Matthias Bolte matthias.bo...@googlemail.com 2011/5/24 YAO yffbr...@gmail.com: Hi, I cloned the latest libvirt from git and compiled as follows: cd libvirt ./autogen.sh make sudo make install when installing, it reported /usr/bin/install: cannot stat `./xxx.html': No

[libvirt] API Proposal: virDomainBlockPull() V5

2011-05-24 Thread Adam Litke
Changes since V4: - Split out BlockPull() and BlockPullAll(). - BlockPull() cursor changed to a virDomainBlockPullInfo for progress reporting only (from in/out to out-only parameter). /* An iterator for initiating and monitoring block pull operations */ typedef unsigned long long

Re: [libvirt] migration of vnlink VMs

2011-05-24 Thread Daniel P. Berrange
On Fri, Apr 29, 2011 at 04:12:55PM -0400, Laine Stump wrote: Okay, here's a brief description of what I *think* will work. I'll build up the RNG based on this pseudo-xml: For the interface definition in the guest XML, the main change will be that source .. mode='something' will be valid

[libvirt] [PATCHv2] qemu: fix typo in name - should be VHOST_NET, not VNET_HOST

2011-05-24 Thread Laine Stump
NB: the enum that uses the string vnet-host (now changed to vhost-net) is used in XML, but fortunately that hasn't been in an official release yet, so it can still be fixed. --- src/qemu/qemu_capabilities.c |4 ++-- src/qemu/qemu_capabilities.h |2 +- src/qemu/qemu_command.c |2

Re: [libvirt] [PATCHv2] qemu: fix typo in name - should be VHOST_NET, not VNET_HOST

2011-05-24 Thread Eric Blake
On 05/24/2011 08:31 AM, Laine Stump wrote: NB: the enum that uses the string vnet-host (now changed to vhost-net) is used in XML, but fortunately that hasn't been in an official release yet, so it can still be fixed. --- src/qemu/qemu_capabilities.c |4 ++-- src/qemu/qemu_capabilities.h

[libvirt] [PATCH 6/9] Fix error propagation in finish method for v3 migration

2011-05-24 Thread Daniel P. Berrange
Even when failing to start CPUs, the finish method was returning a success result. Fix this so that the QEMU process is killed off when finish fails under v3 protocol. Also rename the killOnFinish boolean to 'v3proto' to make it clearer that this is a tunable based on the migration protocol

[libvirt] [PATCH 2/9] Add a second URI parameter to virDomainMigratePerform3 method

2011-05-24 Thread Daniel P. Berrange
The virDomainMigratePerform3 currently has a single URI parameter whose meaning varies. It is either - A QEMU migration URI (normal migration) - A libvirtd connection URI (peer2peer migration) Unfortunately when using peer2peer migration, without also using tunnelled migration, it is possible

[libvirt] [PATCH 4/9] Fix resume on destination when doing non-live tunnelled migration

2011-05-24 Thread Daniel P. Berrange
Before running perform in peer-2-peer migration, the current guest state must be recorded, so that non-live migration can currently unpause a running guest on completion. * src/qemu/qemu_migration.c: Move check for offline guest to fix non-live migration --- src/qemu/qemu_migration.c | 19

Re: [libvirt] [PATCHv2] qemu: fix typo in name - should be VHOST_NET, not VNET_HOST

2011-05-24 Thread Laine Stump
On 05/24/2011 10:35 AM, Eric Blake wrote: On 05/24/2011 08:31 AM, Laine Stump wrote: NB: the enum that uses the string vnet-host (now changed to vhost-net) is used in XML, but fortunately that hasn't been in an official release yet, so it can still be fixed. --- src/qemu/qemu_capabilities.c |

[libvirt] [PATCH 0/9] Many migration enhancements bug fixes

2011-05-24 Thread Daniel P. Berrange
This is a series containing all my pending migration related enhancements and bugfixes. It includes these previous patches to change the migration v3 protocol API + ABI http://www.redhat.com/archives/libvir-list/2011-May/msg01243.html Patch 9 also changes the v3 protocol API/ABI to deal with

[libvirt] [PATCH 1/9] Extend v3 migration protocol to allow app supplied XML for target

2011-05-24 Thread Daniel P. Berrange
This extends the v3 migration protocol such that the virDomainMigrateBegin3 and virDomainMigratePerform3 methods accept an application supplied XML config for the target VM. If the 'xmlin' parameter is NULL, then Begin3 uses the current guest XML as normal. A driver implementing the Begin3 method

[libvirt] [PATCH 9/9] Fix the signature of virDomainMigrateFinish3 for error reporting

2011-05-24 Thread Daniel P. Berrange
The current virDomainMigrateFinish3 method signature attempts to distinguish two types of errors, by allowing return with ret== 0, but ddomain == NULL, to indicate a failure to start the guest. This is flawed, because when ret == 0, there is no way for the virErrorPtr details to be sent back to

[libvirt] [PATCH 5/9] Fix SPICE seemless migration hostname

2011-05-24 Thread Daniel P. Berrange
--- src/qemu/qemu_migration.c | 34 -- 1 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index d0e8e14..fa1a75b 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -79,8

[libvirt] [PATCH 8/9] Fix preservation of errors across migration steps

2011-05-24 Thread Daniel P. Berrange
When doing migration, if an error occurs in Perform, it must not be overwritten during Finish/Confirm steps. If an error occurs in Finish, it must not be overwritten in Confirm. Previous commit a9d12c2444e43a0d3e5135eb15b4b62a7c011427 added code to qemudDomainMigrateFinish2 to preserve the error.

Re: [libvirt] [PATCHv2] qemu: fix typo in name - should be VHOST_NET, not VNET_HOST

2011-05-24 Thread Daniel P. Berrange
On Tue, May 24, 2011 at 10:46:30AM -0400, Laine Stump wrote: On 05/24/2011 10:35 AM, Eric Blake wrote: On 05/24/2011 08:31 AM, Laine Stump wrote: NB: the enum that uses the string vnet-host (now changed to vhost-net) is used in XML, but fortunately that hasn't been in an official release yet,

Re: [libvirt] [PATCHv2] qemu: fix typo in name - should be VHOST_NET, not VNET_HOST

2011-05-24 Thread Eric Blake
On 05/24/2011 08:51 AM, Daniel P. Berrange wrote: On Tue, May 24, 2011 at 10:46:30AM -0400, Laine Stump wrote: On 05/24/2011 10:35 AM, Eric Blake wrote: On 05/24/2011 08:31 AM, Laine Stump wrote: NB: the enum that uses the string vnet-host (now changed to vhost-net) is used in XML, but

Re: [libvirt] [PATCHv2] qemu: fix typo in name - should be VHOST_NET, not VNET_HOST

2011-05-24 Thread Daniel P. Berrange
On Tue, May 24, 2011 at 08:54:34AM -0600, Eric Blake wrote: On 05/24/2011 08:51 AM, Daniel P. Berrange wrote: On Tue, May 24, 2011 at 10:31:33AM -0400, Laine Stump wrote: NB: the enum that uses the string vnet-host (now changed to vhost-net) is used in XML, but fortunately that hasn't been

Re: [libvirt] [PATCHv2] qemu: fix typo in name - should be VHOST_NET, not VNET_HOST

2011-05-24 Thread Eric Blake
On 05/24/2011 08:55 AM, Daniel P. Berrange wrote: These strings did not exist in 0.9.1. They will first appear in 0.9.2, which means that _now_ is the time to fix them. Oh, I was thinking we had this in 0.9.1 $ git describe --contains 43c01d3838 fatal: cannot describe

Re: [libvirt] [PATCH] Allow to explicitly disable the secrets a directory storage driver

2011-05-24 Thread Daniel Veillard
On Tue, May 24, 2011 at 01:21:51PM +0200, Matthias Bolte wrote: --- configure.ac |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) Okay, ACK, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ dan...@veillard.com | Rpmfind RPM search

Re: [libvirt] [PATCH] Fix initialization of current vcpus in libxl driver

2011-05-24 Thread Daniel Veillard
On Mon, May 23, 2011 at 04:43:19PM -0600, Eric Blake wrote: On 05/23/2011 04:26 PM, Jim Fehlig wrote: b_info-hvm = hvm; b_info-max_vcpus = def-maxvcpus; -b_info-cur_vcpus = def-vcpus; +b_info-cur_vcpus = (1 def-vcpus) - 1; That's a compilation pitfall if def-vcpus is

Re: [libvirt] [PATCH] Fix initialization of current vcpus in libxl driver

2011-05-24 Thread Eric Blake
On 05/24/2011 09:14 AM, Daniel Veillard wrote: On Mon, May 23, 2011 at 04:43:19PM -0600, Eric Blake wrote: On 05/23/2011 04:26 PM, Jim Fehlig wrote: b_info-hvm = hvm; b_info-max_vcpus = def-maxvcpus; -b_info-cur_vcpus = def-vcpus; +b_info-cur_vcpus = (1 def-vcpus) - 1;

[libvirt] [PATCH 08/10] Support passing QEMU lock state to dest during migration

2011-05-24 Thread Daniel P. Berrange
Some lock managers associate state with leases, allowing a process to temporarily release its leases, and re-acquire them later, safe in the knowledge that no other process has acquired + released the leases in between. This is already used between suspend/resume operations, and must also be used

Re: [libvirt] [PATCH] qemu: Don't change ownership of file when appending to it

2011-05-24 Thread Eric Blake
On 05/24/2011 09:12 AM, Daniel Veillard wrote: On Tue, May 24, 2011 at 02:54:28PM +0200, Michal Privoznik wrote: Saving domain to previously created file changes also its ownership. This is certainly not what users want if some conditions are met: it is a regular, local file and

[libvirt] [PATCH 05/10] Add higher level lock API for domain objects

2011-05-24 Thread Daniel P. Berrange
To facilitate use of the locking plugins from hypervisor drivers, introduce a higher level API for locking virDomainObjPtr instances. In includes APIs targetted to VM startup, and hotplug/unplug * src/Makefile.am: Add domain lock API * src/locking/domain_lock.c, src/locking/domain_lock.h: High

[libvirt] [PATCH 02/10] Support leases in guest XML and lock manager

2011-05-24 Thread Daniel P. Berrange
A lock manager may operate in various modes. The direct mode of operation is to obtain locks based on the resources associated with devices in the XML. The indirect mode is where the app creating the domain provides explicit leases for each resource that needs to be locked. This XML extension

[libvirt] [PATCH 09/10] Allow leases to be hotpluged with QEMU guests

2011-05-24 Thread Daniel P. Berrange
* src/conf/domain_conf.c, src/conf/domain_conf.h: APIs for inserting/finding/removing virDomainLeaseDefPtr instances * src/qemu/qemu_driver.c: Wire up hotplug/unplug for leases * src/qemu/qemu_hotplug.h, src/qemu/qemu_hotplug.c: Support for hotplug and unplug of leases --- bootstrap

[libvirt] [PATCH 07/10] Integrate the QEMU driver with the lock manager infrastructure

2011-05-24 Thread Daniel P. Berrange
The QEMU integrates with the lock manager instructure in a number of key places * During startup, a lock is acquired in between the fork exec * During startup, the libvirtd process acquires a lock before setting file labelling * During shutdown, the libvirtd process acquires a lock

[libvirt] [PATCH 03/10] Basic framework for lock manager plugins

2011-05-24 Thread Daniel P. Berrange
Define the basic framework lock manager plugins. The basic plugin API for 3rd parties to implemented is defined in src/locking/lock_driver.h This allows dlopen()able modules for alternative locking schemes, however, we do not install the header. This requires lock plugins to be in-tree

Re: [libvirt] [PATCHv2] qemu: fix typo in name - should be VHOST_NET, not VNET_HOST

2011-05-24 Thread Daniel Veillard
On Tue, May 24, 2011 at 08:58:12AM -0600, Eric Blake wrote: On 05/24/2011 08:55 AM, Daniel P. Berrange wrote: These strings did not exist in 0.9.1. They will first appear in 0.9.2, which means that _now_ is the time to fix them. Oh, I was thinking we had this in 0.9.1 $ git describe

[libvirt] [PATCH 00/10 v5] Integration of lock managers in QEMU

2011-05-24 Thread Daniel P. Berrange
Another update to http://www.redhat.com/archives/libvir-list/2011-May/msg01272.html New in this series - Return values -200 are not errnos, they are sanlock specific error codes. - Fix state handling after migration This is also available at

[libvirt] [PATCH 01/10] Allow handshake with child process during startup

2011-05-24 Thread Daniel P. Berrange
Allow the parent process to perform a bi-directional handshake with the child process during fork/exec. The child process will fork and do its initial setup. Immediately prior to the exec(), it will stop wait for a handshake from the parent process. The parent process will spawn the child and

[libvirt] [PATCH 04/10] Add a 'nop' lock driver implementation.

2011-05-24 Thread Daniel P. Berrange
To allow hypervisor drivers to assume that a lock driver impl will be guaranteed to exist, provide a 'nop' impl that is compiled into the library * src/Makefile.am: Add nop driver * src/locking/lock_driver_nop.c, src/locking/lock_driver_nop.h: Nop lock driver implementation *

[libvirt] [PATCH 06/10] Add initial docs about the lock managers

2011-05-24 Thread Daniel P. Berrange
--- docs/internals/locking.html.in | 257 docs/sitemap.html.in |4 + 2 files changed, 261 insertions(+), 0 deletions(-) create mode 100644 docs/internals/locking.html.in diff --git a/docs/internals/locking.html.in

[libvirt] [PATCH 10/10] Add a plugin for the 'sanlock' project

2011-05-24 Thread Daniel P. Berrange
Sanlock is a project that implements a disk-paxos locking algorithm. This is suitable for cluster deployments with shared storage. * src/Makefile.am: Add dlopen plugin for sanlock * src/locking/lock_driver_sanlock.c: Sanlock driver * configure.ac: Check for sanlock * libvirt.spec.in: Add a

Re: [libvirt] API Proposal: virDomainBlockPull() V5

2011-05-24 Thread Stefan Hajnoczi
On Tue, May 24, 2011 at 3:13 PM, Adam Litke a...@us.ibm.com wrote: Looks like we're close to converging here. I am going to update the QEMU-side patches to this new API. /**  * virDomainBlockPull:  * @dom: pointer to domain object  * @path: Fully-qualified filename of disk  * @pos: A

Re: [libvirt] API Proposal: virDomainBlockPull() V5

2011-05-24 Thread Daniel P. Berrange
On Tue, May 24, 2011 at 04:34:47PM +0100, Stefan Hajnoczi wrote: On Tue, May 24, 2011 at 3:13 PM, Adam Litke a...@us.ibm.com wrote: Looks like we're close to converging here. I am going to update the QEMU-side patches to this new API. /**  * virDomainBlockPull:  * @dom: pointer to

Re: [libvirt] [PATCH] qemu: Don't change ownership of file when appending to it

2011-05-24 Thread Michal Prívozník
On 24.05.2011 17:17, Eric Blake wrote: On 05/24/2011 09:12 AM, Daniel Veillard wrote: On Tue, May 24, 2011 at 02:54:28PM +0200, Michal Privoznik wrote: Saving domain to previously created file changes also its ownership. This is certainly not what users want if some conditions are met: it is

Re: [libvirt] [PATCHv2] qemu: fix typo in name - should be VHOST_NET, not VNET_HOST

2011-05-24 Thread Daniel P. Berrange
On Tue, May 24, 2011 at 10:31:33AM -0400, Laine Stump wrote: NB: the enum that uses the string vnet-host (now changed to vhost-net) is used in XML, but fortunately that hasn't been in an official release yet, so it can still be fixed. --- src/qemu/qemu_capabilities.c |4 ++--

[libvirt] [PATCH 00/10 v5] New internal infrastructure for RPC

2011-05-24 Thread Daniel P. Berrange
An update of https://www.redhat.com/archives/libvir-list/2011-May/msg00633.html New in this series: - Nothing. Just rebased to latest GIT. Again, I'm not posting the remote client / daemon conversion patches here, since I want to get this core infrastructure merged real soon and the

[libvirt] [PATCH 01/10] Defines the basics of a generic RPC protocol in XDR

2011-05-24 Thread Daniel P. Berrange
This patch defines the basics of a generic RPC protocol in XDR. This is wire ABI compatible with the original remote_protocol.x. It takes everything except for the RPC calls / events from that protocol - The basic header virNetMessageHeader (aka remote_message_header) - The error object

[libvirt] [PATCH 04/10] Generic module for handling TLS encryption and x509 certs

2011-05-24 Thread Daniel P. Berrange
This provides two modules for handling TLS * virNetTLSContext provides the process-wide state, in particular all the x509 credentials, DH params and x509 whitelists * virNetTLSSession provides the per-connection state, ie the TLS session itself. The virNetTLSContext provides APIs for

[libvirt] [PATCH 06/10] Integrate TLS/SASL directly into the socket APIs

2011-05-24 Thread Daniel P. Berrange
This extends the basic virNetSocket APIs to allow them to have a handle to the TLS/SASL session objects, once established. This ensures that any data reads/writes are automagically passed through the TLS/SASL encryption layers if required. * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Wire up

[libvirt] [PATCH 05/10] Generic module for handling SASL authentication encryption

2011-05-24 Thread Daniel P. Berrange
This provides two modules for handling SASL * virNetSASLContext provides the process-wide state, currently just a whitelist of usernames on the server and a one time library init call * virNetTLSSession provides the per-connection state, ie the SASL session itself. This also include

[libvirt] [PATCH 02/10] Provide a simple object for encoding/decoding RPC messages

2011-05-24 Thread Daniel P. Berrange
This provides a new struct that contains a buffer for the RPC message header+payload, as well as a decoded copy of the message header. There is an API for applying a XDR encoding decoding of the message headers and payloads. There are also APIs for maintaining a simple FIFO queue of message

[libvirt] [PATCH 10/10] Move the RPC generator scripts into src/rpc

2011-05-24 Thread Daniel P. Berrange
Move the daemon/remote_generator.pl to src/rpc/gendispatch.pl and move the src/remote/rpcgen_fix.pl to src/rpc/genprotocol.pl * daemon/Makefile.am: Update for new name/location of generator * src/Makefile.am: Update for new name/location of generator --- daemon/Makefile.am

[libvirt] [PATCH 08/10] Introduce generic RPC module for advertizing via MDNS

2011-05-24 Thread Daniel P. Berrange
Allow RPC servers to advertize themselves using MDNS, via Avahi * src/rpc/virnetserver.c, src/rpc/virnetserver.h: Allow registration of MDNS services via avahi * src/rpc/virnetserverservice.c, src/rpc/virnetserverservice.h: Add API to fetch the listen port number * src/rpc/virnetsocket.c,

[libvirt] [PATCH 03/10] Introduce a generic object for using network sockets

2011-05-24 Thread Daniel P. Berrange
Introduces a simple wrapper around the raw POSIX sockets APIs and name resolution APIs. Allows for easy creation of client and server sockets with correct usage of name resolution APIs for protocol agnostic socket setup. It can listen for UNIX and TCP stream sockets. It can connect to UNIX, TCP

Re: [libvirt] [PATCH] Fix initialization of current vcpus in libxl driver

2011-05-24 Thread Jim Fehlig
Eric Blake wrote: On 05/24/2011 09:14 AM, Daniel Veillard wrote: On Mon, May 23, 2011 at 04:43:19PM -0600, Eric Blake wrote: On 05/23/2011 04:26 PM, Jim Fehlig wrote: b_info-hvm = hvm; b_info-max_vcpus = def-maxvcpus; -b_info-cur_vcpus = def-vcpus; +

Re: [libvirt] [PATCH] Fix initialization of current vcpus in libxl driver

2011-05-24 Thread Eric Blake
On 05/24/2011 10:33 AM, Jim Fehlig wrote: This works in the libxl driver since cur_vcpus is an int. But vcpu_avail is a long in xenxs/xen_sxpr.c and I'm hoping there is something better than the following approach diff --git a/src/xenxs/xen_sxpr.c b/src/xenxs/xen_sxpr.c index

Re: [libvirt] [PATCH] qemu: Don't change ownership of file when appending to it

2011-05-24 Thread Daniel Veillard
On Tue, May 24, 2011 at 02:54:28PM +0200, Michal Privoznik wrote: Saving domain to previously created file changes also its ownership. This is certainly not what users want if some conditions are met: it is a regular, local file and dynamic_ownership is off. --- src/qemu/qemu_driver.c | 12

Re: [libvirt] [PATCH] Fix initialization of current vcpus in libxl driver

2011-05-24 Thread Jim Fehlig
Eric Blake wrote: On 05/24/2011 10:33 AM, Jim Fehlig wrote: This works in the libxl driver since cur_vcpus is an int. But vcpu_avail is a long in xenxs/xen_sxpr.c and I'm hoping there is something better than the following approach diff --git a/src/xenxs/xen_sxpr.c

[libvirt] [PATCH 0/3 v2] More graceful handling of QEMU monitor failures

2011-05-24 Thread Daniel P. Berrange
An update of https://www.redhat.com/archives/libvir-list/2011-May/msg00657.html Currently when libvirt has a serious error doing I/O and/or parsing of the QEMU monitor, it will kill off the guest. Application developers have expressed a desire for more graceful handling of this scenario. In

[libvirt] [PATCH 2/3] Don't kill QEMU process when a monitor I/O parsing error occurs

2011-05-24 Thread Daniel P. Berrange
Currently whenever there is any failure with parsing the monitor, this is treated in the same was as end-of-file (ie QEMU quit). The domain is terminated, if not already dead. With this change, failures in parsing the monitor stream do not result in the death of QEMU. The guest continues running

[libvirt] [PATCH 1/3] Introduce a new event emitted when a virtualization failure occurs

2011-05-24 Thread Daniel P. Berrange
This introduces a new domain VIR_DOMAIN_EVENT_ID_CONTROL_ERROR Which uses the existing generic callback typedef void (*virConnectDomainEventGenericCallback)(virConnectPtr conn, virDomainPtr dom,

[libvirt] [PATCH 3/3] Issue full error messages when processing QEMU monitor I/O

2011-05-24 Thread Daniel P. Berrange
Currently the QEMU monitor I/O handler code uses errno values to report errors. This results in a sub-optimal error messages on certain conditions, in particular when parsing JSON strings malformed data simply results in 'EINVAL'. This changes the code to use the standard libvirt error reporting

[libvirt] [Patch V2] Fix initialization of current vcpus in libxl driver

2011-05-24 Thread Jim Fehlig
The cur_vcpus member of struct libxl_domain_build_info was incorrectly initialized to the number of vcpus, when it should have been interpreted as a bitmap, where bit X corresponds to online/offline status of vcpuX. To complicate matters, cur_vcpus is an int, so only 32 vcpus can be set online.

Re: [libvirt] [Patch V2] Fix initialization of current vcpus in libxl driver

2011-05-24 Thread Eric Blake
On 05/24/2011 11:22 AM, Jim Fehlig wrote: The cur_vcpus member of struct libxl_domain_build_info was incorrectly initialized to the number of vcpus, when it should have been interpreted as a bitmap, where bit X corresponds to online/offline status of vcpuX. To complicate matters, cur_vcpus

[libvirt] [PATCH] build: fix VIR_DEBUG on mingw

2011-05-24 Thread Eric Blake
We don't use the gnulib vsnprintf replacement, which means that on mingw, vsnprintf doesn't support %sn. But as it turns out, VIR_GET_VAR_STR was a rather inefficient reimplementation of virVasprintf. * src/util/logging.c (VIR_GET_VAR_STR): Drop. (virLogMessage): Inline a simpler version here. *

Re: [libvirt] [PATCH] build: fix VIR_DEBUG on mingw

2011-05-24 Thread Matthias Bolte
2011/5/24 Eric Blake ebl...@redhat.com: We don't use the gnulib vsnprintf replacement, which means that on mingw, vsnprintf doesn't support %sn. But as it turns out, VIR_GET_VAR_STR was a rather inefficient reimplementation of virVasprintf. * src/util/logging.c (VIR_GET_VAR_STR): Drop.

Re: [libvirt] [PATCH] build: fix VIR_DEBUG on mingw

2011-05-24 Thread Eric Blake
On 05/24/2011 12:33 PM, Matthias Bolte wrote: 2011/5/24 Eric Blake ebl...@redhat.com: We don't use the gnulib vsnprintf replacement, which means that on mingw, vsnprintf doesn't support %sn. I meant %zn, not %sn; and I'll also mention %llu which is another one mingw doesn't natively know.

Re: [libvirt] [Patch V2] Fix initialization of current vcpus in libxl driver

2011-05-24 Thread Jim Fehlig
Eric Blake wrote: On 05/24/2011 11:22 AM, Jim Fehlig wrote: The cur_vcpus member of struct libxl_domain_build_info was incorrectly initialized to the number of vcpus, when it should have been interpreted as a bitmap, where bit X corresponds to online/offline status of vcpuX. To

Re: [libvirt] migration of vnlink VMs

2011-05-24 Thread Jérémie Tarot
Hi, 2011/5/24 Daniel P. Berrange berra...@redhat.com ... And new bridging modes would be forward layer='link' mode='bridge-brctl|vepa|private|passthru|bridge-macvtap'/ VDE ? Openvswitch ? Thanks in advance JT -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] qemu: don't require is_kvm for vhost-net support

2011-05-24 Thread Laine Stump
On 05/23/2011 01:48 PM, Eric Blake wrote: On 05/23/2011 11:43 AM, Laine Stump wrote: This was discussed in: https://www.redhat.com/archives/libvir-list/2011-May/msg01370.html The capabilities code only sets the flag to allow use of vhost-net if kvm is detected (set if the help string

Re: [libvirt] [PATCH RFC] Add domainSave/Restore to libxl driver

2011-05-24 Thread Jim Fehlig
Jim Fehlig wrote: [...] diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index 65110cf..e75e418 100644 --- a/src/libxl/libxl_conf.h +++ b/src/libxl/libxl_conf.h @@ -1,5 +1,6 @@ /*---*/ /* Copyright (c)

[libvirt] [PATCH] build: avoid strerror_r pitfalls

2011-05-24 Thread Eric Blake
In particular, this guarantees that virStrerror always gives a useful result. * .gnulib: Update to latest, for (lots of) strerror_r fixes. --- This patch removes the need for Daniel's proposal: https://www.redhat.com/archives/libvir-list/2011-May/msg01236.html Now gnulib guarantees that

Re: [libvirt] [PATCH] build: avoid strerror_r pitfalls

2011-05-24 Thread Matthias Bolte
2011/5/25 Eric Blake ebl...@redhat.com: In particular, this guarantees that virStrerror always gives a useful result. * .gnulib: Update to latest, for (lots of) strerror_r fixes. --- This patch removes the need for Daniel's proposal: