Re: [libvirt] [PATCH] python: improve conversion validation

2012-04-02 Thread Laszlo Ersek
On 03/30/12 20:49, Eric Blake wrote: Laszlo Ersek pointed out that in trying to convert a long to an unsigned int, we used: long long_val = ...; if ((unsigned int)long_val == long_val) According to C99 integer promotion rules, the if statement is equivalent to: (unsigned

Re: [libvirt] Start of freeze for libvirt-0.9.11 and availability of rc1

2012-04-02 Thread Philipp Hahn
Hello Daniel, On Saturday 31 March 2012 13:53:32 you wrote: On Mon, Mar 26, 2012 at 09:18:53AM +0200, Philipp Hahn wrote: On Monday 26 March 2012 04:32:23 Daniel Veillard wrote: As scheduled, we are entering the freeze for 0.9.11. I think most API additions are now commited to git

[libvirt] [PATCHv5 0/3] Xen: Fix clock handling

2012-04-02 Thread Philipp Hahn
Before version 3.1 xen only implemented clock/@offset='utc' and 'localtime'. With the introduction of managed domains in 3.1 xend keeps track of the rtc_timeoffset, even over reboots. This translates to libvirts clock/@offset='variable' variant. Be advised that only HV domains have a RTC. In

[libvirt] [PATCHv5 1/3] Support clock=variable relative to localtime

2012-04-02 Thread Philipp Hahn
Since Xen 3.1 the clock=variable semantic is supported. In addition to qemu/kvm Xen also knows about a variant where the offset is relative to 'localtime' instead of 'utc'. Extends the libvirt structure with a flag 'basis' to specify, if the offset is relative to 'localtime' or 'utc'. Extends

[libvirt] [PATCHv5 2/3] Xen: Fix clock handling

2012-04-02 Thread Philipp Hahn
XenD-3.1 introduced managed domains. HV-domains have rtc_timeoffset (hgd24f37b31030 from 2007-04-03), which tracks the offset between the hypervisors clock and the domains RTC, and is persisted by XenD. In combination with localtime=1 this had a bug until XenD-3.4 (hg5d701be7c37b from 2009-04-01)

Re: [libvirt] Start of freeze for libvirt-0.9.11 and availability of rc1

2012-04-02 Thread Michal Privoznik
On 01.04.2012 03:35, Laine Stump wrote: On 03/31/2012 07:56 AM, Daniel Veillard wrote: I just made the second release candidate ftp://libvirt.org/libvirt/libvirt-0.9.11-rc2.tar.gz along with the rpms and tagged the git tree. It seems to work okay in my limited testing. If all goes well

Re: [libvirt] Start of freeze for libvirt-0.9.11 and availability of rc1

2012-04-02 Thread Jiri Denemark
On Sat, Mar 31, 2012 at 21:35:50 -0400, Laine Stump wrote: On 03/31/2012 07:56 AM, Daniel Veillard wrote: I just made the second release candidate ftp://libvirt.org/libvirt/libvirt-0.9.11-rc2.tar.gz along with the rpms and tagged the git tree. It seems to work okay in my limited

[libvirt] Openvswitch support - port tagging

2012-04-02 Thread Daniele Milani
I was looking at the release candidate of libvirt (0.9.11-rc2) and I have not been able to understand if the openvswitch support includes the port tagging support. So my question is: is it possible to create a tagged port? How? Otherwise, would it be useful to add this functionality? Thanks,

Re: [libvirt] Start of freeze for libvirt-0.9.11 and availability of rc1

2012-04-02 Thread Maxim Sditanov
2012/4/2 Jiri Denemark jdene...@redhat.com On Sat, Mar 31, 2012 at 21:35:50 -0400, Laine Stump wrote: On 03/31/2012 07:56 AM, Daniel Veillard wrote: I just made the second release candidate ftp://libvirt.org/libvirt/libvirt-0.9.11-rc2.tar.gz along with the rpms and tagged the

[libvirt] [Patch v2] vmware: detect when a domain was shut down from the inside

2012-04-02 Thread Jean-Baptiste Rouault
This patch adds an internal function vmwareUpdateVMStatus to update the real state of the domain. This function is used in various places in the driver, in particular to detect when the domain has been shut down by the user with the halt command. --- v2: - Replace internal function

[libvirt] [PATCH] qemu: Start nested job in qemuDomainCheckEjectableMedia

2012-04-02 Thread Jiri Denemark
Originally, qemuDomainCheckEjectableMedia was entering monitor with qemu driver lock. Commit 2067e31bf97667eab9f111b496f5e9a44e827c5b, which I made to fix that, revealed another issue we had (but didn't notice it since the driver was locked): we didn't set nested job when

[libvirt] xend_internal: Use domain/status for shutdown check

2012-04-02 Thread Stefan Bader
xend_internal: Use domain/status for shutdown check On newer xend (v3.x and after) there is no state and domid reported for inactive domains. When initially creating connections this is handled in various places by assigning domain-id = -1. But once an instance has been running, the id is set to

[libvirt] [RESEND] libvirt: xen: Shutdown detection fixes (RH-BZ#746007)

2012-04-02 Thread Stefan Bader
Resending this as there was no feedback overall and at least the first change fixes the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=746007 --- The issue is easy to observe when using virt-manager as a frontend. Its main window seems to open connections for the up/down main display

[libvirt] xen-hypervisor: GetVcpus may not find a certain domain

2012-04-02 Thread Stefan Bader
xen-hypervisor: GetVcpus may not find a certain domain Observed on connections that have been running and then shut down. The hypervisor subdriver fills the log with internal errors while the xend driver actually can handle the query. This only handles the case which I observed after shutting

Re: [libvirt] Start of freeze for libvirt-0.9.11 and availability of rc1

2012-04-02 Thread Laine Stump
On 04/02/2012 06:43 AM, Philipp Hahn wrote: The patch still aplies, but sending new version as you requested. Still compiles (with minor problems regarding undefined IFLA_PORT_MAX and broken libnl on my Debian-Squeeze here) What is the version of libnl? Different versions of libnl are

Re: [libvirt] [PATCH] qemu: fix memory leak in virDomainGetVcpus

2012-04-02 Thread Laine Stump
On 04/02/2012 01:43 AM, Wen Congyang wrote: At 04/02/2012 01:33 PM, Laine Stump Wrote: https://bugzilla.redhat.com/show_bug.cgi?id=808979 The leak is really in virProcessInfoGetAffinity, as shown in the valgrind output given in the above bug report - it calls CPU_ALLOC(), but then fails to

Re: [libvirt] [PATCH 0/2] use qemu's dump-guest-meory when vm uses host device

2012-04-02 Thread Eric Blake
On 04/01/2012 10:01 PM, Wen Congyang wrote: Currently, we use migrate to dump guest's memory. There is one restriction in migrate command: the device's status should be stored in qemu because the device's status should be passed to target machine. If we passthrough a host device to guest,

Re: [libvirt] [PATCH] Fix typos and spacing in messages

2012-04-02 Thread Eric Blake
On 04/01/2012 03:28 AM, Yuri Chornoivan wrote: Fix-typos-and-spacing-in-messages.patch From 6da6c8646de997acc2acaaa585dcb84f33e429f2 Mon Sep 17 00:00:00 2001 From: Yuri Chornoivan yurc...@ukr.net Date: Sun, 1 Apr 2012 12:23:56 +0300 Subject: [PATCH] Fix typos and spacing in messages.

Re: [libvirt] [PATCHv5 1/3] Support clock=variable relative to localtime

2012-04-02 Thread Eric Blake
On 02/06/2012 06:59 AM, Philipp Hahn wrote: Since Xen 3.1 the clock=variable semantic is supported. In addition to qemu/kvm Xen also knows about a variant where the offset is relative to 'localtime' instead of 'utc'. Extends the libvirt structure with a flag 'basis' to specify, if the

Re: [libvirt] [PATCHv5 2/3] Xen: Fix clock handling

2012-04-02 Thread Eric Blake
On 02/08/2012 09:32 AM, Philipp Hahn wrote: XenD-3.1 introduced managed domains. HV-domains have rtc_timeoffset (hgd24f37b31030 from 2007-04-03), which tracks the offset between the hypervisors clock and the domains RTC, and is persisted by XenD. In combination with localtime=1 this had a bug

Re: [libvirt] [PATCHv5 3/3] Xen: Adapt clock tests

2012-04-02 Thread Eric Blake
On 02/08/2012 11:23 AM, Philipp Hahn wrote: localtime = 0 is always inserted, because otherwise on updates the value is not changed within XenD. adjustment='reset' is inserted for all cases, since they're all XEND_CONFIG_VERSION_3_1_0, only 3.1 introduced persistent rtc_timeoffset. Some

Re: [libvirt] [PATCH] qemu: Start nested job in qemuDomainCheckEjectableMedia

2012-04-02 Thread Eric Blake
On 04/02/2012 08:20 AM, Jiri Denemark wrote: Originally, qemuDomainCheckEjectableMedia was entering monitor with qemu driver lock. Commit 2067e31bf97667eab9f111b496f5e9a44e827c5b, which I made to fix that, revealed another issue we had (but didn't notice it since the driver was locked): we

[libvirt] is it possible to set txqueuelen on vnetX devices automatically

2012-04-02 Thread Tim Hughes
Hello, We have been tuning our libvirt hosts and discovered that setting the txqueuelen on vnetX devices to 2500 we can increase the network throughput by a factor of almost 10. On an eth device it can be set by hand/rc.local with the following instructions

Re: [libvirt] is it possible to set txqueuelen on vnetX devices automatically

2012-04-02 Thread Daniel P. Berrange
On Mon, Apr 02, 2012 at 05:15:55PM +0100, Tim Hughes wrote: Hello, We have been tuning our libvirt hosts and discovered that setting the txqueuelen on vnetX devices to 2500 we can increase the network throughput by a factor of almost 10. On an eth device it can be set by hand/rc.local with

[libvirt] [RH-BZ #639987 RH-BZ #639983] already fixed tickets in buglist

2012-04-02 Thread Maxim Sditanov
I found 2 bugs in bug tracker https://bugzilla.redhat.com/show_bug.cgi?id=639983 https://bugzilla.redhat.com/show_bug.cgi?id=639987 I tried to reproduce bugs (create domain with name and ; ). Then i start, stop, listen this domains without problem with virsh cli (virsh from git master, version

Re: [libvirt] is it possible to set txqueuelen on vnetX devices automatically

2012-04-02 Thread Tim Hughes
Thankyou , I should be able to do it with the hooks. I have raised a feature request at BZ809172 Tim Hughes mailto:thug...@thegoldfish.org On 2 April 2012 17:22, Daniel P. Berrange berra...@redhat.com wrote: On Mon, Apr 02, 2012 at 05:15:55PM +0100, Tim Hughes wrote: Hello, We have

[libvirt] call for volunteer: FLOSS weekly podcast opportunity

2012-04-02 Thread Eric Blake
The FLOSS weekly podcast is interested in doing an interview about libvirt development on June 6, at 9:30am Los Angeles time (UTC-7). For more information on past podcasts, see: http://twit.tv/show/floss-weekly With prodding from Justin Clift, I have volunteered to take on the task, but the

[libvirt] [test-API PATCH] Added screenshot test

2012-04-02 Thread Martin Kletzander
This patch adds a test that obtains a screenshot of a domain and saves it in a file. --- repos/domain/screenshot.py | 57 1 files changed, 57 insertions(+), 0 deletions(-) create mode 100644 repos/domain/screenshot.py diff --git

Re: [libvirt] [test-API] RFC: Stabilization of libvirt-test-API

2012-04-02 Thread Martin Kletzander
On 04/01/2012 04:30 PM, Guannan Ren wrote: On 03/29/2012 10:20 PM, Guannan Ren wrote: On 03/29/2012 08:14 PM, Martin Kletzander wrote: [...] Hi Martin Could you have a review on the code. Anything require changes, you could sent patch based on

[libvirt] 0.9.11 rc2, FreeBSD

2012-04-02 Thread Jason Helfman
Hi, I was able to get rc2 to build on FreeBSD. Here are the buildlogs for current release of FreeBSD (9): http://lorie.secnap.net/tb/index.php?action=display_markup_logbuild=9-jgh_AMD64id=1289 http://lorie.secnap.net/tb/index.php?action=display_markup_logbuild=9-jgh_I386id=1289 -jgh -- Jason

Re: [libvirt] 0.9.11 rc2, FreeBSD

2012-04-02 Thread Daniel P. Berrange
On Mon, Apr 02, 2012 at 11:34:09AM -0700, Jason Helfman wrote: Hi, I was able to get rc2 to build on FreeBSD. Here are the buildlogs for current release of FreeBSD (9): http://lorie.secnap.net/tb/index.php?action=display_markup_logbuild=9-jgh_AMD64id=1289

Re: [libvirt] 0.9.11 rc2, FreeBSD

2012-04-02 Thread Jason Helfman
On Mon, Apr 02, 2012 at 07:50:43PM +0100, Daniel P. Berrange thus spake: On Mon, Apr 02, 2012 at 11:34:09AM -0700, Jason Helfman wrote: Hi, I was able to get rc2 to build on FreeBSD. Here are the buildlogs for current release of FreeBSD (9):

[libvirt] [RH-BZ #595428] 'virsh list' should output more information 'xm list'

2012-04-02 Thread Maxim Sditanov
Is this new feature request still https://bugs.gentoo.org/show_bug.cgi?id=366561 actual? Because virsh still show not enough information: $./virsh -c qemu:///system list --all  Id    Name   State  1

Re: [libvirt] 0.9.11 rc2, FreeBSD

2012-04-02 Thread Daniel P. Berrange
On Mon, Apr 02, 2012 at 12:33:19PM -0700, Jason Helfman wrote: On Mon, Apr 02, 2012 at 07:50:43PM +0100, Daniel P. Berrange thus spake: On Mon, Apr 02, 2012 at 11:34:09AM -0700, Jason Helfman wrote: Hi, I was able to get rc2 to build on FreeBSD. Here are the buildlogs for current release of

[libvirt] [PATCH 00/10] Enable loadable modules for libvirtd

2012-04-02 Thread Daniel P. Berrange
For a long timer we've had the ability to build each libvirt driver as a loadable module. We have never used this by default and as a result it constantly bit-rots. This series fixes various bugs, and then enables it by default in configure. It also makes the PRMs use the loadable modules, adding

[libvirt] [PATCH 04/10] Ensure LXC driver links against libblkid explicitly.

2012-04-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Only libvirt_driver_storage.la links to libblkid currently. If we are running in a scenario with driver modules, LXC must directly link to it, since it can't assume the storage driver is present Signed-off-by: Daniel P. Berrange berra...@redhat.com

[libvirt] [PATCH 01/10] Only build server side drivers as modules

2012-04-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The driver modules all use symbols which are defined in libvirt.so. Thus for loading of modules to work, the binary that libvirt.so is linked to must be exported its symbols back to modules. If the libvirt.so itself is dlopen()d then the RTLD_GLOBAL

[libvirt] [PATCH 09/10] Default to enable driver modules for libvirtd

2012-04-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Always enable driver modules for libvirtd, if we have dlopen available. This allows more modular packaging by distros and ensures we don't break this config * configure.ac: Default to enable driver modules Signed-off-by: Daniel P. Berrange

[libvirt] [PATCH 06/10] Split QEMU dtrace probes into separate file

2012-04-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When building as driver modules, it is not possible for the QEMU driver module to reference the DTrace/SystemTAP probes linked into the main libvirt.so. Thus we need to move the QEMU probes into a separate file 'libvirt_qemu_probes.d'. Also rename the

[libvirt] [PATCH 05/10] Replace RTLD_LOCAL with RTLD_GLOBAL

2012-04-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Since we have drivers which depend on each other (ie QEMU/LXC depend on the network driver APIs), we need to use RTLD_GLOBAL instead of RTLD_LOCAL. While this pollutes the calling binary with many more symbols, this is no worse than if we directly link

[libvirt] [PATCH 02/10] Fix broken linkage of libvirt_driver_nodedev.la

2012-04-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com libvirt_driver_nodedev.la should not link against either libvirt_util.la or gnulib.la, since libvirt.so brings in those deps. * src/Makefile.am: Fix broken linkage of libvirt_driver_nodedev.la Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 08/10] Add test case for loading driver modules

2012-04-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com To ensure all symbols used by loadable driver modules are exported in libvirt.so, add a test suite that simply loads each driver in turn * tests/Makefile.am, tests/virdrivermoduletest.c: Add a test case for loading drivers Signed-off-by: Daniel P.

[libvirt] [PATCH 07/10] Override default driver dir when running from GIT

2012-04-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com * daemon/libvirtd.c: Set custom driver module dir if the current binary name is 'lt-libvirtd' (indicating execution directly from GIT checkout) * src/driver.c, src/driver.h, src/libvirt_driver_modules.syms: Add virDriverModuleInitialize to allow

[libvirt] [PATCH 10/10] Enable driver modules in libvirt RPM

2012-04-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Turn on loadable modules for libvirtd. Add new sub-RPMs libvirt-daemon-driver-XXX, one for each loadable .so. Modify the libvirt-daemon-YYY RPMs to depend on each of the individual drivers they required * libvirt.spec.in: Enable driver modules

[libvirt] [PATCH 03/10] Remove libvirt_test.la library

2012-04-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The libvirt_test.la library was introduced to allow test suites to reference internal-only symbols. These days, nearly every symbol we care about is in src/libvirt_private.syms, so there is no need for libvirt_test.la to continue to exist *

Re: [libvirt] [PATCH 00/10] Enable loadable modules for libvirtd

2012-04-02 Thread Eric Blake
On 04/02/2012 01:57 PM, Daniel P. Berrange wrote: For a long timer we've had the ability to build each libvirt driver as a loadable module. We have never used this by default and as a result it constantly bit-rots. This series fixes various bugs, and then enables it by default in configure.

Re: [libvirt] [PATCH 02/10] Fix broken linkage of libvirt_driver_nodedev.la

2012-04-02 Thread Eric Blake
On 04/02/2012 01:57 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com libvirt_driver_nodedev.la should not link against either libvirt_util.la or gnulib.la, since libvirt.so brings in those deps. * src/Makefile.am: Fix broken linkage of libvirt_driver_nodedev.la

Re: [libvirt] [PATCH 07/10] Override default driver dir when running from GIT

2012-04-02 Thread Eric Blake
On 04/02/2012 01:57 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com * daemon/libvirtd.c: Set custom driver module dir if the current binary name is 'lt-libvirtd' (indicating execution directly from GIT checkout) * src/driver.c, src/driver.h,

Re: [libvirt] 0.9.11 rc2, FreeBSD

2012-04-02 Thread Jason Helfman
On Mon, Apr 02, 2012 at 08:48:11PM +0100, Daniel P. Berrange thus spake: http://lorie.secnap.net/tb/index.php?action=display_markup_logbuild=9-jgh_AMD64id=1289 http://lorie.secnap.net/tb/index.php?action=display_markup_logbuild=9-jgh_I386id=1289 The test suite doesn't depend on anything that

Re: [libvirt] 0.9.11 rc2, FreeBSD

2012-04-02 Thread Daniel P. Berrange
On Mon, Apr 02, 2012 at 02:10:38PM -0700, Jason Helfman wrote: On Mon, Apr 02, 2012 at 08:48:11PM +0100, Daniel P. Berrange thus spake: http://lorie.secnap.net/tb/index.php?action=display_markup_logbuild=9-jgh_AMD64id=1289

Re: [libvirt] [PATCH] qemu: Start nested job in qemuDomainCheckEjectableMedia

2012-04-02 Thread Jiri Denemark
On Mon, Apr 02, 2012 at 09:49:38 -0600, Eric Blake wrote: On 04/02/2012 08:20 AM, Jiri Denemark wrote: Originally, qemuDomainCheckEjectableMedia was entering monitor with qemu driver lock. Commit 2067e31bf97667eab9f111b496f5e9a44e827c5b, which I made to fix that, revealed another issue we

Re: [libvirt] 0.9.11 rc2, FreeBSD

2012-04-02 Thread Jason Helfman
On Mon, Apr 02, 2012 at 10:16:46PM +0100, Daniel P. Berrange thus spake: I strongly expect that the QEMU driver has a large number of Linux-isms in it. That said, I also expect all the Linux-isms to be solveable. So my recommendation is probably to enable it, then insert enough #ifdef's to get

[libvirt] question on API spelling

2012-04-02 Thread Eric Blake
We're quite inconsistent on US (canceled) vs. UK (cancelled) spelling in our public API: include/libvirt/libvirt.h.in:124: VIR_DOMAIN_RUNNING_MIGRATION_CANCELED = 6, /* returned from migration */ include/libvirt/libvirt.h.in:125:VIR_DOMAIN_RUNNING_SAVE_CANCELED = 7, /* returned from failed

Re: [libvirt] [PATCH 0/2] use qemu's dump-guest-meory when vm uses host device

2012-04-02 Thread Wen Congyang
At 04/02/2012 10:50 PM, Eric Blake Wrote: On 04/01/2012 10:01 PM, Wen Congyang wrote: Currently, we use migrate to dump guest's memory. There is one restriction in migrate command: the device's status should be stored in qemu because the device's status should be passed to target machine.

Re: [libvirt] Openvswitch support - port tagging

2012-04-02 Thread Ansis Atteka
On Mon, Apr 2, 2012 at 5:56 AM, Daniele Milani dano1...@hotmail.it wrote: I was looking at the release candidate of libvirt (0.9.11-rc2) and I have not been able to understand if the openvswitch support includes the port tagging support. If your question is Whether it is possible to specify

Re: [libvirt] [PATCH 0/2] use qemu's dump-guest-meory when vm uses host device

2012-04-02 Thread Eric Blake
On 04/02/2012 06:23 PM, Wen Congyang wrote: Why are we bothering with a text implementation? We know that the feature is only present if you have qemu 1.1 or later (assuming that qemu-devel did apply your series adding the monitor command), and therefore we know that we have QMP, so we

Re: [libvirt] [PATCH 0/2] use qemu's dump-guest-meory when vm uses host device

2012-04-02 Thread Wen Congyang
At 04/03/2012 08:46 AM, Eric Blake Wrote: On 04/02/2012 06:23 PM, Wen Congyang wrote: Why are we bothering with a text implementation? We know that the feature is only present if you have qemu 1.1 or later (assuming that qemu-devel did apply your series adding the monitor command), and

[libvirt] [PATCH 08/13] blockjob: enhance xml to track mirrors across libvirtd restart

2012-04-02 Thread Eric Blake
QUESTION: should we parse and ignore mirror on input, rather than rejecting it? By rejecting it, I can't add a unit test, since the unit test framework currently doesn't expose a way to trigger internal parsing. In order to track a block copy job across libvirtd restarts, we need to save

[libvirt] [PATCH 09/13] blockjob: react to active block copy

2012-04-02 Thread Eric Blake
For now, disk migration via block copy job is not implemented. But when we do implement it, we have to deal with the fact that qemu does not provide an easy way to re-start a qemu process with mirroring still intact (it _might_ be possible by using qemu -S then an initial 'drive-mirror' with disk

[libvirt] [PATCH 01/13] blockjob: add API for async virDomainBlockJobAbort

2012-04-02 Thread Eric Blake
From: Adam Litke a...@us.ibm.com Qemu has changed the semantics of the block_job_cancel API. The original qed implementation (pretty much only backported to RHEL 6.2 qemu) was synchronous (ie. upon command completion, the operation was guaranteed to be completely stopped). With the new

[libvirt] [RFC: PATCH 00/13] live block migration via virDomainBlockCopy

2012-04-02 Thread Eric Blake
This is in response to my discussion with Paolo here: https://www.redhat.com/archives/libvir-list/2012-March/msg01171.html It also picks up an old patch from Adam here (now split into two): https://www.redhat.com/archives/libvir-list/2012-January/msg00562.html Patches 1-12 are in pretty good

[libvirt] [PATCH 07/13] blockjob: wire up RPC for block copy

2012-04-02 Thread Eric Blake
Almost trivial; the trick was dealing with the fact that we're stuck with 'unsigned long bandwidth' due to earlier design decisions. * src/remote/remote_protocol.x (remote_domain_block_copy_args): New struct. * src/remote/remote_driver.c (remote_driver): Use it. * src/rpc/gendispatch.pl

[libvirt] [PATCH 05/13] blockjob: add virDomainBlockCopy

2012-04-02 Thread Eric Blake
This new API provides additional flexibility over what can be crammed on top of virDomainBlockRebase, at the expense that it cannot be backported without bumping the .so version. * include/libvirt/libvirt.h.in (virDomainBlockCopy): New API. * src/libvirt.c (virDomainBlockCopy): Implement it. *

[libvirt] [PATCH 03/13] blockjob: add new API flags

2012-04-02 Thread Eric Blake
This patch introduces a new block job, useful for live storage migration using pre-copy streaming. If a live VM is using the following backing chain: base - snap1 - snap2 then virDomainBlockRebase(dom, disk, /path/to/copy, 0, VIR_DOMAIN_BLOCK_REBASE_COPY) will create /path/to/copy with no

[libvirt] [PATCH 06/13] blockjob: enhance virsh 'blockcopy'

2012-04-02 Thread Eric Blake
Expose the full abilities of virDomainBlockCopy. * tools/virsh.c (blockJobImpl): Support more options for block copy. * tools/virsh.pod (blockcopy): Document these. --- tools/virsh.c | 23 +++ tools/virsh.pod | 10 ++ 2 files changed, 25 insertions(+), 8

[libvirt] [PATCH 11/13] blockjob: query backing file of a disk

2012-04-02 Thread Eric Blake
Implementing the VIR_DOMAIN_BLOCK_REBASE_SHALLOW flag will require knowing what the immediate backing file is. As long as we don't track the entire backing chain in domain XML, the next best that we can do is to ask qemu. * src/qemu/qemu_conf.h (qemuDomainDiskInfo): Add member. *

[libvirt] [PATCH 10/13] blockjob: expose qemu commands for mirrored storage migration

2012-04-02 Thread Eric Blake
The new block copy storage migration sequence requires both the 'drive-mirror' action in 'transaction' (present if the 'drive-mirror' standalone monitor command also exists) and the 'drive-reopen' monitor command (it would be nice if that were also part of a 'transaction', but the initial qemu

[libvirt] [PATCH 13/13] WIP: blockjob: implement block copy for qemu

2012-04-02 Thread Eric Blake
Wire up all the pieces in the previous patches to actually enable a block copy job. This compiles, but isn't correct, and there are still more patches to go: prereq patch: fix qemuDomainBlockJobImpl to do BLOCK_JOB_PULL and BLOCK_JOB_SPEED in one monitor job, rather than two this patch: fix