Re: [libvirt] [PATCH 0/4] qemu: export disk snapshot capability

2014-02-19 Thread Francesco Romani
- Original Message - This patch series extend the QEMU capabilities XML to report if the underlying QEMU binary supports, or not, the live disk snapshotting. Could please someone take a look and review this? Any comment would be really appreciated! ping -- Francesco Romani

Re: [libvirt] [PATCH v9 0/7] Support keyboard device

2014-02-19 Thread Ján Tomko
On 02/19/2014 07:17 AM, Li Zhang wrote: On 2014年02月18日 20:52, Ján Tomko wrote: On 02/18/2014 09:58 AM, Li Zhang wrote: Hi Jan and Daniel, Would you like to accept this patchset? Thanks. Hi, it looks good to me and I'd like to push it this week with the changes I pointed out, unless

Re: [libvirt] [PATCH v9 2/7] conf: Add a keyboard input device type

2014-02-19 Thread Ján Tomko
On 02/19/2014 07:22 AM, Li Zhang wrote: On 2014年02月18日 20:51, Ján Tomko wrote: On 02/17/2014 11:17 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com There is no keyboard support currently in libvirt . For some platforms, it needs to add a USB keyboard when graphics are

Re: [libvirt] Is it possible to set a timeout to the Connection class?

2014-02-19 Thread Claudio Bley
Am 18.02.2014 15:02, schrieb Pasquale Dir: I am using the java api bindings. I'd like to set a connection timeout on the Connect class as sometimes it takes just too long. This depends on the driver you're using. If the connection is established over the network, you'd have to change the

[libvirt] [bug-report] libvirtd 1.1.4-maint with lastest patches can't be connected

2014-02-19 Thread Wangpan
Hi experts, Is there anybody could help me to fix this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1066801 my libvirt version is 1.1.4-manit without the newest patches after this one: 13 days ago Eric Blake event: move event filtering to daemon (regression fix) Description of

Re: [libvirt] java api bindings for detecting domain events

2014-02-19 Thread Claudio Bley
Am 18.02.2014 18:15, schrieb Avanti Ajay: Hi.. I am doing a project in which I need to detect KVM domain events and I am using java for my project. On the net I found many patches for the libvirt Java API bindings for event detection. Does the latest version 0.5 have these patches included

Re: [libvirt] Is it possible to set a timeout to the Connection class?

2014-02-19 Thread Daniel P. Berrange
On Tue, Feb 18, 2014 at 04:13:19PM -0700, Eric Blake wrote: On 02/18/2014 07:02 AM, Pasquale Dir wrote: I am using the java api bindings. I'd like to set a connection timeout on the Connect class as sometimes it takes just too long. Which particular API takes too long? There are some

[libvirt] [PATCH] make virDomainGetMaxVcpus work on inactive domains

2014-02-19 Thread Claudio Bley
Signed-off-by: Claudio Bley cb...@av-test.de --- OK, how about this patch? While at it, should I convert the VIR_DOMAIN_VCPU_* instances to VIR_DOMAIN_AFFECT_* instances for consistency? src/esx/esx_driver.c |2 +- src/openvz/openvz_driver.c |2 +- src/phyp/phyp_driver.c |

[libvirt] LSN-2013-0018: Unsafe usage of paths under /proc/$PID/root by the LXC driver

2014-02-19 Thread Daniel P. Berrange
Libvirt Security Notice: LSN-2013-0018 == Summary: Unsafe usage of paths under /proc/$PID/root by the LXC driver Reported on: 20131217 Published on: 20131217 Fixed on: 20140219 Reported by: Reco recovery

Re: [libvirt] Is it possible to set a timeout to the Connection class?

2014-02-19 Thread Claudio Bley
[please, don't top-post on technical lists and keep the conversation on list] At Wed, 19 Feb 2014 11:59:29 +0100, Pasquale Dir wrote: Thank you I didn't think about the Future, I'll try it and if it doesn't work I'll just try to edit the tcp connection timeout file. Can you answer me to the

Re: [libvirt] Reporting log/error messages through capabilities

2014-02-19 Thread Michal Privoznik
On 19.02.2014 00:11, Richard W.M. Jones wrote: When qemu is completely broken, libvirtd starts up OK but exists in a kind of broken state where no guests can possibly be run. I hit this problem ... again ... today: https://bugzilla.redhat.com/show_bug.cgi?id=1066630#c0 There is a libvirt bug

Re: [libvirt] Reporting log/error messages through capabilities

2014-02-19 Thread Kashyap Chamarthy
On Tue, Feb 18, 2014 at 11:11:10PM +, Richard W.M. Jones wrote: [. . .] Are there other unanticipated problems here? I think one is that libvirt doesn't appear to collect detailed log information by default, (unless the user edits log_level). That's assuming I understand the code

Re: [libvirt] Reporting log/error messages through capabilities

2014-02-19 Thread Daniel P. Berrange
On Tue, Feb 18, 2014 at 11:11:10PM +, Richard W.M. Jones wrote: When qemu is completely broken, libvirtd starts up OK but exists in a kind of broken state where no guests can possibly be run. I hit this problem ... again ... today: https://bugzilla.redhat.com/show_bug.cgi?id=1066630#c0

Re: [libvirt] Reporting log/error messages through capabilities

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 19, 2014 at 02:01:43PM +0100, Michal Privoznik wrote: On 19.02.2014 00:11, Richard W.M. Jones wrote: [1] By the way, this is a general complaint about libvirt. Please DON'T add any more stuff to the configuration file. Everything should be configurable through the API, or not at

Re: [libvirt] Reporting log/error messages through capabilities

2014-02-19 Thread Daniel P. Berrange
On Tue, Feb 18, 2014 at 11:11:10PM +, Richard W.M. Jones wrote: There is a libvirt bug here, which is that it's very hard to diagnose what is going on when qemu fails to work at all. The logging system in libvirt(d) is trememdously powerful, but ultimately confusing to use, and requires

[libvirt] [PATCH] networkRunHook: Run hook only if possible

2014-02-19 Thread Michal Privoznik
Currently, networkRunHook() is called in networkAllocateActualDevice and friends. These functions, however, doesn't necessarily work on networks, For example, if domain's interface is defined in this fashion: interface type='bridge' mac address='52:54:00:0b:3b:16'/ source

Re: [libvirt] Is it possible to set a timeout to the Connection class?

2014-02-19 Thread Eric Blake
On 02/19/2014 04:06 AM, Daniel P. Berrange wrote: FWIW, for the initial 'virConnectOpen' API I think it probably would be worthwhile us supporting a standardized timeout URI parameter. That way if the remote service doesn't respond at all for some reason users can have fine control. That's a

Re: [libvirt] [PATCH v10] bhyve: add a basic driver

2014-02-19 Thread Daniel P. Berrange
On Tue, Feb 18, 2014 at 02:08:10PM +0400, Roman Bogorodskiy wrote: At this point it has a limited functionality and is highly experimental. Supported domain operations are: * define * start * destroy * dumpxml * dominfo It's only possible to have only one disk device and only

Re: [libvirt] Is it possible to set a timeout to the Connection class?

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 19, 2014 at 07:54:54AM -0700, Eric Blake wrote: On 02/19/2014 04:06 AM, Daniel P. Berrange wrote: FWIW, for the initial 'virConnectOpen' API I think it probably would be worthwhile us supporting a standardized timeout URI parameter. That way if the remote service doesn't

Re: [libvirt] [PATCH V2 00/13] libxl: add job support

2014-02-19 Thread Jim Fehlig
Jim Fehlig wrote: This patch series adds job support to the libxl driver, using a simplified version of the technique used in the qemu driver. One benefit of this series is no longer blocking get operations during long running modify operations. E.g. with these patches 'vish dominfo dom'

Re: [libvirt] [PATCH] networkRunHook: Run hook only if possible

2014-02-19 Thread John Ferlan
On 02/19/2014 09:54 AM, Michal Privoznik wrote: Currently, networkRunHook() is called in networkAllocateActualDevice and friends. These functions, however, doesn't necessarily work on networks, s/doesn't/don't/ For example, if domain's interface is defined in this fashion: interface

Re: [libvirt] [PATCH v2] qemu: Use virtio network device for aarch64/virt

2014-02-19 Thread Cole Robinson
On 02/14/2014 09:09 AM, Oleg Strikov wrote: This patch changes network device type used by default from rtl8139 to virtio when architecture type is aarch64 and machine type is virt. Qemu doesn't support any other machine types for aarch64 right now and we can't make any other aarch64-specific

Re: [libvirt] [libvirt-users] event-test.py cannot detects domain shutdown

2014-02-19 Thread Cole Robinson
On 02/18/2014 10:45 PM, Jim Fehlig wrote: Cole Robinson wrote: On 02/18/2014 05:12 AM, Kim Larry wrote: The thing I found today is that if libvirt uses xend driver, shutdown events are delivered, but if libvirt uses libxl drvier, doesn't show up anything. It seems there are bugs on

Re: [libvirt] [PATCH V2 00/13] libxl: add job support

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 19, 2014 at 08:35:21AM -0700, Jim Fehlig wrote: Jim Fehlig wrote: This patch series adds job support to the libxl driver, using a simplified version of the technique used in the qemu driver. One benefit of this series is no longer blocking get operations during long running

Re: [libvirt] [PATCHv6 1/5] virstring.h/c: Util method for finding regexp patterns in some strings

2014-02-19 Thread Daniel P. Berrange
On Thu, Jan 23, 2014 at 10:28:29AM +0100, Manuel VIVES wrote: --- po/POTFILES.in |1 + src/libvirt_private.syms |1 + src/util/virstring.c | 97 ++ src/util/virstring.h |3 ++ 4 files changed, 102 insertions(+)

Re: [libvirt] Reporting log/error messages through capabilities

2014-02-19 Thread Richard W.M. Jones
On Wed, Feb 19, 2014 at 01:41:21PM +, Daniel P. Berrange wrote: And of course it goes without saying we should never have got into this scenario in the first place. We need better testing of QEMU binaries to make sure such brokenness can get detected at build time. To be fair in this case

Re: [libvirt] Reporting log/error messages through capabilities

2014-02-19 Thread Richard W.M. Jones
On Wed, Feb 19, 2014 at 01:56:24PM +, Daniel P. Berrange wrote: On Wed, Feb 19, 2014 at 02:01:43PM +0100, Michal Privoznik wrote: On 19.02.2014 00:11, Richard W.M. Jones wrote: [1] By the way, this is a general complaint about libvirt. Please DON'T add any more stuff to the

Re: [libvirt] [PATCHv6 2/5] virstring.h/c: Util method for making some find and replace in strings

2014-02-19 Thread Daniel P. Berrange
On Thu, Jan 23, 2014 at 10:28:30AM +0100, Manuel VIVES wrote: --- src/libvirt_private.syms |1 + src/util/virstring.c | 66 +- src/util/virstring.h |1 + 3 files changed, 67 insertions(+), 1 deletion(-) Can you also add a test

Re: [libvirt] Reporting log/error messages through capabilities

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 19, 2014 at 04:50:42PM +, Richard W.M. Jones wrote: On Wed, Feb 19, 2014 at 01:41:21PM +, Daniel P. Berrange wrote: And of course it goes without saying we should never have got into this scenario in the first place. We need better testing of QEMU binaries to make sure

Re: [libvirt] Reporting log/error messages through capabilities

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 19, 2014 at 04:51:17PM +, Richard W.M. Jones wrote: On Wed, Feb 19, 2014 at 01:56:24PM +, Daniel P. Berrange wrote: On Wed, Feb 19, 2014 at 02:01:43PM +0100, Michal Privoznik wrote: On 19.02.2014 00:11, Richard W.M. Jones wrote: [1] By the way, this is a general

Re: [libvirt] [PATCHv6 4/5] vbox_tmpl.c: Patch for redefining snapshots

2014-02-19 Thread Daniel P. Berrange
On Thu, Jan 23, 2014 at 10:28:32AM +0100, Manuel VIVES wrote: The snapshots are saved in xml files, and then can be redefined --- src/vbox/vbox_tmpl.c | 1083 +- 1 file changed, 1075 insertions(+), 8 deletions(-) My comment here is that you

Re: [libvirt] [PATCHv6 5/5] vbox_tmpl.c: Add methods for undefining snapshots

2014-02-19 Thread Daniel P. Berrange
On Thu, Jan 23, 2014 at 10:28:33AM +0100, Manuel VIVES wrote: All the informations concerning snapshots (and snapshot disks) will be deleted from the vbox xml. But the differencing disks will be kept so you will be able to redefine the snapshots. --- src/vbox/vbox_tmpl.c | 448

Re: [libvirt] [PATCH V2 01/13] libxl: always set vm id to -1 on shutdown

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:56:15PM -0700, Jim Fehlig wrote: Once a domain has reached the shutdown state, set its ID to -1. Signed-off-by: Jim Fehlig jfeh...@suse.com --- src/libxl/libxl_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ACK Daniel -- |:

Re: [libvirt] [PATCH V2 02/13] libxl: remove libxlVmReap function

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:56:16PM -0700, Jim Fehlig wrote: This function, which only has five call sites, simply calls libxl_domain_destroy and libxlVmCleanup. Call those functions directly at the call sites, allowing more control over how a domain is destroyed and cleaned up. This patch

Re: [libvirt] Reporting log/error messages through capabilities

2014-02-19 Thread Richard W.M. Jones
On Wed, Feb 19, 2014 at 02:00:21PM +, Daniel P. Berrange wrote: On Tue, Feb 18, 2014 at 11:11:10PM +, Richard W.M. Jones wrote: There is a libvirt bug here, which is that it's very hard to diagnose what is going on when qemu fails to work at all. The logging system in libvirt(d) is

Re: [libvirt] [libvirt-users] event-test.py cannot detects domain shutdown

2014-02-19 Thread Jim Fehlig
Cole Robinson wrote: On 02/18/2014 10:45 PM, Jim Fehlig wrote: Cole Robinson wrote: On 02/18/2014 05:12 AM, Kim Larry wrote: The thing I found today is that if libvirt uses xend driver, shutdown events are delivered, but if libvirt uses libxl drvier, doesn't show up

Re: [libvirt] Reporting log/error messages through capabilities

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 19, 2014 at 05:00:43PM +, Richard W.M. Jones wrote: On Wed, Feb 19, 2014 at 02:00:21PM +, Daniel P. Berrange wrote: On Tue, Feb 18, 2014 at 11:11:10PM +, Richard W.M. Jones wrote: There is a libvirt bug here, which is that it's very hard to diagnose what is going

Re: [libvirt] [PATCH V2 04/13] libxl: use job functions in libxlVmStart

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:56:18PM -0700, Jim Fehlig wrote: Creating a large domain could potentially be time consuming. Use the recently added job functions and unlock the virDomainObj while the create operation is in progress. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2:

Re: [libvirt] [PATCH V2 03/13] libxl: Add job support to libxl driver

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:56:17PM -0700, Jim Fehlig wrote: Follows the pattern used in the QEMU driver for managing multiple, simultaneous jobs within the driver. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: Add ATTRIBUTE_RETURN_CHECK to libxlDomainObjEndJob

Re: [libvirt] [PATCH V2 06/13] libxl: use job functions in libxlDomain{Suspend, Resume}

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:56:20PM -0700, Jim Fehlig wrote: These operations aren't necessarily time consuming, but need to wait in the queue of modify jobs. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: Check libxlDomainObjEndJob() return value src/libxl/libxl_driver.c | 26

Re: [libvirt] [PATCH V2 05/13] libxl: use job functions in libxlDomainSetMemoryFlags

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:56:19PM -0700, Jim Fehlig wrote: Large balloon operation can be time consuming. Use the recently added job functions and unlock the virDomainObj while ballooning. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: Check libxlDomainObjEndJob() return value

Re: [libvirt] [PATCH V2 07/13] libxl: use job functions when cleaning up a domain

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:56:21PM -0700, Jim Fehlig wrote: When explicitly destroying a domain (libxlDomainDestroyFlags), or handling an out-of-band domain shutdown event, cleanup the domain in the context of a job. Introduce libxlVmCleanupJob to wrap libxlVmCleanup in a job block.

Re: [libvirt] [PATCH V2 08/13] libxl: use job functions in domain save operations

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:56:22PM -0700, Jim Fehlig wrote: Saving domain memory and cpu state can take considerable time. Use the recently added job functions and unlock the virDomainObj while saving the domain. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: Check

Re: [libvirt] [PATCH V2 11/13] libxl: use job functions in device attach and detach functions

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:56:25PM -0700, Jim Fehlig wrote: These operations aren't necessarily time consuming, but need to wait in the queue of modify jobs. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: Check libxlDomainObjEndJob() return value src/libxl/libxl_driver.c | 42

Re: [libvirt] [PATCH V2 09/13] libxl: use job functions in libxlDomainCoreDump

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:56:23PM -0700, Jim Fehlig wrote: Dumping a domain's core can take considerable time. Use the recently added job functions and unlock the virDomainObj while dumping core. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: Check libxlDomainObjEndJob() return

Re: [libvirt] [PATCH V2 10/13] libxl: use job functions in vcpu set and pin functions

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:56:24PM -0700, Jim Fehlig wrote: These operations aren't necessarily time consuming, but need to wait in the queue of modify jobs. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: Check libxlDomainObjEndJob() return value src/libxl/libxl_driver.c | 48

Re: [libvirt] [PATCH V2 12/13] libxl: use job functions in libxlDomainSetAutostart

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:56:26PM -0700, Jim Fehlig wrote: Setting autostart is a modify operation that needs to wait in the queue of modify jobs. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: Check libxlDomainObjEndJob() return value src/libxl/libxl_driver.c | 19

Re: [libvirt] [PATCH 0/2] Introduce max_anonymous_clients

2014-02-19 Thread Daniel P. Berrange
On Tue, Jan 21, 2014 at 11:04:37AM +0100, Michal Privoznik wrote: On 09.12.2013 15:35, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=981729 So far we can limit how many clients are connected, how many are waiting in accept() line but we could not control the count

Re: [libvirt] [PATCH V2 13/13] libxl: use job functions in libxlDomainSetSchedulerParametersFlags

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:56:27PM -0700, Jim Fehlig wrote: Modify operation that needs to wait in the queue of modify jobs. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: Check libxlDomainObjEndJob() return value src/libxl/libxl_driver.c | 16 1 file changed, 12

Re: [libvirt] [PATCHv6 1/5] virstring.h/c: Util method for finding regexp patterns in some strings

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 19, 2014 at 04:46:22PM +, Daniel P. Berrange wrote: On Thu, Jan 23, 2014 at 10:28:29AM +0100, Manuel VIVES wrote: --- po/POTFILES.in |1 + src/libvirt_private.syms |1 + src/util/virstring.c | 97 ++

Re: [libvirt] [PATCH 0/2] Introduce max_anonymous_clients

2014-02-19 Thread Eric Blake
On 02/19/2014 10:55 AM, Daniel P. Berrange wrote: On Tue, Jan 21, 2014 at 11:04:37AM +0100, Michal Privoznik wrote: On 09.12.2013 15:35, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=981729 So far we can limit how many clients are connected, how many are waiting in

Re: [libvirt] [PATCH 0/2] Introduce max_anonymous_clients

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 19, 2014 at 11:03:00AM -0700, Eric Blake wrote: On 02/19/2014 10:55 AM, Daniel P. Berrange wrote: On Tue, Jan 21, 2014 at 11:04:37AM +0100, Michal Privoznik wrote: On 09.12.2013 15:35, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=981729 So far we can

Re: [libvirt] [PATCH V2 13/13] libxl: use job functions in libxlDomainSetSchedulerParametersFlags

2014-02-19 Thread Jim Fehlig
Daniel P. Berrange wrote: On Wed, Feb 12, 2014 at 06:56:27PM -0700, Jim Fehlig wrote: Modify operation that needs to wait in the queue of modify jobs. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: Check libxlDomainObjEndJob() return value src/libxl/libxl_driver.c | 16

Re: [libvirt] [PATCHv3 00/10] Add BlkIO and CPU/mem stat API implementations for lxc

2014-02-19 Thread Thorsten Behrens
I wrote: This patch set adds block io, memory and domain cpu statistics API slot implementations to the LXC driver, in order to get linux container monitoring and accounting a bit closer to qemu standards. Hi guys, hmm, this would be cool to get into 1.2.2 - any chance for that? ;) Some

[libvirt] [PATCH 0/2] Add two string helper methods

2014-02-19 Thread Daniel P. Berrange
As mentioned in my review, I took the first two patches from this series and polished them up ready for merge https://www.redhat.com/archives/libvir-list/2014-January/msg01067.html Hopefully this should be good enough for the vbox snapshot work to use. Changes since that posting - Added

[libvirt] [PATCH 2/2] Add virStringReplace method for substring replacement

2014-02-19 Thread Daniel P. Berrange
Add a virStringReplace method to virstring.{h,c} to perform substring matching and replacement Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/libvirt_private.syms | 1 + src/util/virstring.c | 44 +++- src/util/virstring.h | 5

[libvirt] [PATCH 1/2] Add virStringSearch method for regex matching

2014-02-19 Thread Daniel P. Berrange
From: Manuel VIVES manuel.vi...@diateam.net Add a virStringSearch method to virstring.{c,h} which performs a regex match against a string and returns the matching substrings. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- po/POTFILES.in | 1 + src/libvirt_private.syms |

Re: [libvirt] [PATCHv3 00/10] Add BlkIO and CPU/mem stat API implementations for lxc

2014-02-19 Thread Daniel P. Berrange
On Wed, Feb 19, 2014 at 08:38:33PM +0100, Thorsten Behrens wrote: I wrote: This patch set adds block io, memory and domain cpu statistics API slot implementations to the LXC driver, in order to get linux container monitoring and accounting a bit closer to qemu standards. Hi guys, hmm,

[libvirt] [PATCH v1 0/2] support dumping guest memory in compressed format

2014-02-19 Thread Qiao Nuohan
dumping guest's memroy is introduced without compression supported, and this is a freature regression of 'virsh dump --memory-only'. This patchset is used to add support in libvirt side to make qemu dump guest's memory in kdump-compressed format and please refer the following address to see

[libvirt] [PATCH v1 1/2] make qemu dump memory in kdump-compressed format

2014-02-19 Thread Qiao Nuohan
--memory-only option is introduced without compression supported. Therefore, this is a freature regression of virsh dump. Now qemu has support dumping memory in kdump-compressed format. This patch is used to add --compress and [--compression-format] string to virsh dump --memory-only and send

[libvirt] [PATCH v1 2/2] add dump_memory_format in qemu.conf

2014-02-19 Thread Qiao Nuohan
This patch is used to add dump_memory_format to qemu.conf and libvirt will use it to specify the default format in which qemu dumps guest's memory. But when --compress is specified with virsh dump --memory-only, the format configured by dump_memory_format will be overrided. dump_memory_format can

[libvirt] [PATCH] libxl: always use libxlVmCleanupJob in shutdown thread

2014-02-19 Thread Jim Fehlig
Commit e4a0e900 missed calling libxlVmCleanupJob in the shutdown handler when processing a reboot event. Signed-off-by: Jim Fehlig jfeh...@suse.com --- src/libxl/libxl_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c

[libvirt] [PATCH 03/10] util: make it easier to reflect child exit status

2014-02-19 Thread Eric Blake
Thanks to namespaces, we have a couple of places in the code base that want to reflect a child exit status, including the ability to detect death by a signal, back to a grandparent. Best to make it a reusable function. * src/util/virprocess.h (virProcessExitWithStatus): New prototype. *

[libvirt] [PATCH 01/10] nwfilter: don't ignore child process failures

2014-02-19 Thread Eric Blake
While auditing all callers of virCommandRun, I noticed that nwfilter code never paid attention to commands with a non-zero status. In the cases where status was captured, either the callers required that the status was 0, or they discarded any failures from virCommandRun. Collecting status

[libvirt] [PATCH 02/10] virFork: give specific status on failure prior to exec

2014-02-19 Thread Eric Blake
When a child fails without exec'ing, we want a well-known status; best is to match what env(1), nice(1), su(1), and other wrapper programs do. This patch adds enum values that later patches will use, and sets up virFork as the first client of EXIT_CANCELED for errors detected prior to even

[libvirt] [PATCH 05/10] util: make it easier to grab only regular process exit

2014-02-19 Thread Eric Blake
Right now, a caller waiting for a child process either requires the child to have status 0, or must use WIFEXITED() and friends itself. But in many cases, we want the middle ground of treating fatal signals as an error, and directly accessing the normal exit value without having to use

Re: [libvirt] [PATCH] libxl: always use libxlVmCleanupJob in shutdown thread

2014-02-19 Thread Eric Blake
On 02/19/2014 07:54 PM, Jim Fehlig wrote: Commit e4a0e900 missed calling libxlVmCleanupJob in the shutdown handler when processing a reboot event. Signed-off-by: Jim Fehlig jfeh...@suse.com --- src/libxl/libxl_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK diff

[libvirt] [PATCH 10/10] virsh: report exit status of failed lxc-enter-namespace

2014-02-19 Thread Eric Blake
'virsh lxc-enter-namespace' does not have a way to reflect exit status to the caller in single-command mode, but we might as well at least report the exit status. Prior to this patch, $ virsh -c lxc:/// lxc-enter-namespace shell /bin/sh 'exit 3'; echo $? 1 now it gives some details: $ virsh -c

[libvirt] [PATCH 07/10] virFork: simplify semantics

2014-02-19 Thread Eric Blake
The old semantics of virFork() violates the priciple of good usability: it requires the caller to check the pid argument after use, *even when virFork returned -1*, in order to properly abort a child process that failed setup done immediately after fork() - that is, the caller must call _exit() in

[libvirt] [PATCH 04/10] util: preserve exit status from mount namespace callback

2014-02-19 Thread Eric Blake
The documentation of namespace callbacks was inconsistent on whether it preserved positive return values. Now that we have a dedicated EXIT_CANCELED to flag all errors before getting to the callback, it is possible to use positive return values (not that any of the current callers do, but it

[libvirt] [PATCH 09/10] virt-login-shell: saner exit value

2014-02-19 Thread Eric Blake
virt-login-shell was exiting with status 0, regardless of what the wrapped shell returned. This is unkind to users; we should behave more like env(1), nice(1), su(1), and other wrapper programs, by preserving the invoked application's status (which includes the distinction between death due to

[libvirt] [PATCH 08/10] virt-login-shell: use single instead of double fork

2014-02-19 Thread Eric Blake
Note that 'virsh lxc-enter-namespace' must double-fork, for two reasons: some namespaces can only be done from a single thread, while virsh is multithreaded; and because virsh can be run in batch mode where we must not corrupt the namespace of that execution upon return from the subsidiary

Re: [libvirt] [PATCH v10] bhyve: add a basic driver

2014-02-19 Thread Roman Bogorodskiy
Daniel P. Berrange wrote: ACK, and pushed to GIT. Great job getting this new driver up running, and welcome to the libvirt committers team. Superb! Thanks! Roman Bogorodskiy -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v12 04/11] qemu_hostdev: parse BACKEND_DEFAULT outside

2014-02-19 Thread Chunyan Liu
2014-02-17 23:26 GMT+08:00 Laine Stump la...@laine.org: On 02/17/2014 11:38 AM, Cedric Bosdonnat wrote: On Mon, 2014-02-17 at 14:32 +0800, Chunyan Liu wrote: For extracting hostdev codes from qemu_hostdev.c to common library, change original paring VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT