Re: [libvirt] [PATCH] LXC: create a bind mount for sysfs when enable userns but disable netns

2014-07-18 Thread chenhanx...@cn.fujitsu.com
ping -Original Message- From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] On Behalf Of Chen Hanxiao Sent: Monday, July 14, 2014 6:02 PM To: libvir-list@redhat.com Subject: [libvirt] [PATCH] LXC: create a bind mount for sysfs when enable userns but

[libvirt] [PATCH 00/29] vbox: Rewrite several APIs.

2014-07-18 Thread Taowei
Put exactly one API into one patch. Add a test case to test with vboxUniformedAPI. Taowei (29): vbox: Begin to rewrite, vboxConnectOpen vbox: Add test case for vboxUniformedAPI vbox: Rewrite vboxConnectClose vbox: Rewrite vboxDomainSave vbox: Rewrite vboxConnectGetVersion vbox:

[libvirt] [PATCH 20/29] vbox: Rewrite vboxDomainCreateXML

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 28 src/vbox/vbox_tmpl.c | 28 src/vbox/vbox_uniformed_api.h |2 ++ 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index

[libvirt] [PATCH 01/29] vbox: Begin to rewrite, vboxConnectOpen

2014-07-18 Thread Taowei
Introduce vbox_uniformed_api to deal with version conflicts. vboxConnectOpen has been rewritten. --- po/POTFILES.in|1 + src/Makefile.am |4 +- src/vbox/vbox_common.c| 289 src/vbox/vbox_common.h| 132

[libvirt] [PATCH 26/29] vbox: Rewrite vboxDomainResume

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 47 + src/vbox/vbox_tmpl.c | 66 - src/vbox/vbox_uniformed_api.h |3 ++ 3 files changed, 63 insertions(+), 53 deletions(-) diff --git a/src/vbox/vbox_common.c

[libvirt] [PATCH 12/29] vbox: Rewrite vboxConnectListDomains

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 42 ++ src/vbox/vbox_tmpl.c | 80 + src/vbox/vbox_uniformed_api.h | 22 3 files changed, 105 insertions(+), 39 deletions(-) diff --git a/src/vbox/vbox_common.c

[libvirt] [PATCH 29/29] vbox: Rewrite vboxDomainReboot

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 44 src/vbox/vbox_tmpl.c | 56 ++--- src/vbox/vbox_uniformed_api.h |2 ++ 3 files changed, 53 insertions(+), 49 deletions(-) diff --git a/src/vbox/vbox_common.c

[libvirt] [PATCH 25/29] vbox: Rewrite vboxDomainSuspend

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 47 + src/vbox/vbox_tmpl.c | 65 + src/vbox/vbox_uniformed_api.h |3 ++ 3 files changed, 63 insertions(+), 52 deletions(-) diff --git a/src/vbox/vbox_common.c

[libvirt] [PATCH 06/29] vbox: Rewrite vboxConnectGetHostname

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c|5 + src/vbox/vbox_tmpl.c |6 -- src/vbox/vbox_uniformed_api.h |1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 3edadce..2588379 100644 ---

[libvirt] [PATCH 09/29] vbox: Rewrite vboxConnectIsAlive

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c|5 + src/vbox/vbox_tmpl.c |5 - src/vbox/vbox_uniformed_api.h |1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 188b878..f380c78 100644 ---

[libvirt] [PATCH 04/29] vbox: Rewrite vboxDomainSave

2014-07-18 Thread Taowei
vboxIIDUnion is introduced in this patch to fixup vboxIID conflictions. --- src/vbox/vbox_common.c| 95 +++ src/vbox/vbox_common.h| 40 + src/vbox/vbox_tmpl.c | 346 +++-- src/vbox/vbox_uniformed_api.h | 82 ++

[libvirt] [PATCH 08/29] vbox: Rewrite vboxConnectIsEncrypted

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c|6 ++ src/vbox/vbox_tmpl.c |6 -- src/vbox/vbox_uniformed_api.h |1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index cdc3664..188b878 100644 ---

[libvirt] [PATCH 23/29] vbox: Rewrite vboxDomainIsPersistent

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 19 +++ src/vbox/vbox_tmpl.c | 26 -- src/vbox/vbox_uniformed_api.h |1 + 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index

[libvirt] [PATCH 14/29] vbox: Rewrite vboxDomainLookupById

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 73 src/vbox/vbox_tmpl.c | 82 +++-- src/vbox/vbox_uniformed_api.h |3 ++ 3 files changed, 90 insertions(+), 68 deletions(-) diff --git a/src/vbox/vbox_common.c

[libvirt] [PATCH 02/29] vbox: Add test case for vboxUniformedAPI

2014-07-18 Thread Taowei
The test case will make sure each API will filled with something. So we will not to define an API, use it, yet forgot to implement. --- tests/Makefile.am|9 +++- tests/vboxuniformedapitest.c | 98 ++ 2 files changed, 105 insertions(+), 2

[libvirt] [PATCH 07/29] vbox: Rewrite vboxConnectIsSecure

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c|6 ++ src/vbox/vbox_tmpl.c |6 -- src/vbox/vbox_uniformed_api.h |1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 2588379..cdc3664 100644 ---

[libvirt] [PATCH 05/29] vbox: Rewrite vboxConnectGetVersion

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 22 ++ src/vbox/vbox_tmpl.c | 13 - src/vbox/vbox_uniformed_api.h |1 + 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index a74a1de..3edadce

[libvirt] [PATCH 03/29] vbox: Rewrite vboxConnectClose

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 11 +++ src/vbox/vbox_tmpl.c | 29 - src/vbox/vbox_uniformed_api.h |1 + 3 files changed, 12 insertions(+), 29 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 8fb4494..2e23d62

[libvirt] [PATCH 11/29] vbox: Rewrite vboxConnectGetCapabilities

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 11 +++ src/vbox/vbox_tmpl.c | 16 ++-- src/vbox/vbox_uniformed_api.h |1 + 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 1c67eea..ed6597c 100644 ---

[libvirt] [PATCH 21/29] vbox: Rewrite vboxDomainLookupByName

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 70 src/vbox/vbox_tmpl.c | 71 - src/vbox/vbox_uniformed_api.h |2 ++ 3 files changed, 72 insertions(+), 71 deletions(-) diff --git a/src/vbox/vbox_common.c

[libvirt] [PATCH 24/29] vbox: Rewrite vboxDomainIsUpdated

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 19 +++ src/vbox/vbox_tmpl.c | 25 - src/vbox/vbox_uniformed_api.h |1 + 3 files changed, 20 insertions(+), 25 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index

[libvirt] [PATCH 27/29] vbox: Rewrite vboxDomainShutdownFlags

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 48 + src/vbox/vbox_tmpl.c | 67 - src/vbox/vbox_uniformed_api.h |3 ++ 3 files changed, 64 insertions(+), 54 deletions(-) diff --git a/src/vbox/vbox_common.c

[libvirt] [PATCH 13/29] vbox: Rewrite vboxConnectNumOfDomains

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 35 +++ src/vbox/vbox_tmpl.c | 36 src/vbox/vbox_uniformed_api.h |1 + 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/vbox/vbox_common.c

[libvirt] [PATCH 10/29] vbox: Rewrite vboxConnectGetMaxVcpus

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 24 +++ src/vbox/vbox_common.h|1 + src/vbox/vbox_tmpl.c | 42 ++--- src/vbox/vbox_uniformed_api.h |8 4 files changed, 51 insertions(+), 24 deletions(-) diff --git

[libvirt] [PATCH 28/29] vbox: Rewrite vboxDomainShutdown

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c|5 + src/vbox/vbox_tmpl.c |6 -- src/vbox/vbox_uniformed_api.h |1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index cc4328e..98d7c8a 100644 ---

[libvirt] [PATCH 22/29] vbox: Rewrite vboxDomainIsActive

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 66 src/vbox/vbox_tmpl.c | 67 - src/vbox/vbox_uniformed_api.h |1 + 3 files changed, 67 insertions(+), 67 deletions(-) diff --git a/src/vbox/vbox_common.c

[libvirt] [PATCH 16/29] vbox: Rewrite vboxDomainUndefineFlags

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 67 src/vbox/vbox_tmpl.c | 356 + src/vbox/vbox_uniformed_api.h |8 + 3 files changed, 255 insertions(+), 176 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index

[libvirt] [PATCH 18/29] vbox: Rewrite vboxDomainCreateWithFlags

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 219 src/vbox/vbox_tmpl.c | 274 +++-- src/vbox/vbox_uniformed_api.h |8 ++ 3 files changed, 269 insertions(+), 232 deletions(-) diff --git a/src/vbox/vbox_common.c

[libvirt] [PATCH 19/29] vbox: Rewrite vboxDomainCreate

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c|5 + src/vbox/vbox_tmpl.c |7 --- src/vbox/vbox_uniformed_api.h |1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index c5b6c4e..4861d52 100644 ---

[libvirt] [PATCH 15/29] vbox: Rewrite vboxDomainLookupByUUId

2014-07-18 Thread Taowei
--- src/vbox/vbox_common.c| 73 + src/vbox/vbox_tmpl.c | 73 - src/vbox/vbox_uniformed_api.h |2 ++ 3 files changed, 75 insertions(+), 73 deletions(-) diff --git a/src/vbox/vbox_common.c

[libvirt] [PATCH] doc: add domain to address of hostdev pci

2014-07-18 Thread Hu Tao
libvirt supports pci domain already, so update the documentation. Otherwise users who lookup the documentation for how to use hostdev may miss the domain and encounter error when pass-through a pci device in a domain other than 0. Signed-off-by: Hu Tao hu...@cn.fujitsu.com ---

[libvirt] [PATCHv4 2/2] lxc domain from xml: convert lxc.cap.drop

2014-07-18 Thread Cédric Bosdonnat
--- src/lxc/lxc_native.c | 25 ++ tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml| 2 ++ tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml | 2 ++ tests/lxcconf2xmldata/lxcconf2xml-cputune.xml | 2 ++

[libvirt] [PATCHv4 0/2] lxc keep/drop capabilities

2014-07-18 Thread Cédric Bosdonnat
Hi all, Even though the v3 has been ACKed (but not pushed), I rebased it on top of master before pushing it and did a few changes that are worth checking before. * Path 1 (feature) and 3 (doc) of the previous version merge merged together as suggested for another similar series. *

[libvirt] [PATCHv4 1/2] lxc: allow to keep or drop capabilities

2014-07-18 Thread Cédric Bosdonnat
Added capabilities in the features section of LXC domains configuration. This section can contain elements named after the capabilities like: mknod state=on/, keep CAP_MKNOD capability sys_chroot state=off/ drop CAP_SYS_CHROOT capability Users can restrict or give more capabilities than the

Re: [libvirt] [PATCH] spec: Consolidate with_qemu* definitions

2014-07-18 Thread Jiri Denemark
On Thu, Jul 17, 2014 at 09:12:31 -0600, Eric Blake wrote: On 07/17/2014 08:22 AM, Jiri Denemark wrote: Decisions whether qemu driver and libvirt-daemon-{qemu,kvm} packages should be built on various OS/arch combinations were scattered around the spec file. Let's make it easier to see where

Re: [libvirt] [PATCHv4 1/2] lxc: allow to keep or drop capabilities

2014-07-18 Thread chenhanx...@cn.fujitsu.com
-Original Message- From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] On Behalf Of Cédric Bosdonnat Sent: Friday, July 18, 2014 4:02 PM To: libvir-list@redhat.com Cc: Cédric Bosdonnat Subject: [libvirt] [PATCHv4 1/2] lxc: allow to keep or drop

[libvirt] [PATCH v2] examples: Introduce domtop

2014-07-18 Thread Michal Privoznik
There's this question on the list that is asked over and over again. How do I get {cpu, memory, ...} usage in percentage? Or its modified version: How do I plot nice graphs like virt-manager does? It would be nice if we have an example to inspire people. And that's what domtop should do. Yes, it

[libvirt] [PATCH 2/2] qemu: snapshot: Forbid snapshots of iSCSI passthrough devices

2014-07-18 Thread Peter Krempa
As with the local SCSI passthrough devicesm qemu can't support snapshots on those as the block ops are handled by the device. This is also true for iSCSI backing of the disk. Remove the check for the local block device and just forbid snapshot when the disk is of type 'lun'. Resolves:

[libvirt] [PATCH 0/2] Fix docs and handling of snapshots on SCSI passthrough devices

2014-07-18 Thread Peter Krempa
Libvirt didn't catch an attempt to do a snapshot of a SCSI passthrough disk when backed by iSCSI and the docs didn't state that disk type 'lun' works also with iSCSI. Peter Krempa (2): doc: domain: Clarify that disk type 'lun' works with iSCSI too qemu: snapshot: Forbid snapshots of iSCSI

[libvirt] [PATCH 1/2] doc: domain: Clarify that disk type 'lun' works with iSCSI too

2014-07-18 Thread Peter Krempa
Disk type 'lun' enables SCSI command passthrough for a disk. We stated that it works only with block disks. Qemu supports it also when using the iSCSI protocol. --- docs/formatdomain.html.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in

Re: [libvirt] [PATCHv4 2/2] lxc domain from xml: convert lxc.cap.drop

2014-07-18 Thread chenhanx...@cn.fujitsu.com
-Original Message- From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] On Behalf Of Cédric Bosdonnat Sent: Friday, July 18, 2014 4:03 PM To: libvir-list@redhat.com Cc: Cédric Bosdonnat Subject: [libvirt] [PATCHv4 2/2] lxc domain from xml: convert

Re: [libvirt] [PATCH] qemuConnectGetDomainCapabilities: Use wiser defaults

2014-07-18 Thread Michal Privoznik
On 17.07.2014 11:28, Daniel P. Berrange wrote: On Thu, Jul 17, 2014 at 11:12:05AM +0200, Michal Privoznik wrote: diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 33541d3..7d99435 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16849,17 +16849,17 @@

[libvirt] [PATCH] support vhost-scsi controller

2014-07-18 Thread Zhang Min
libvirt support vhost-scsi controller. The way to config the vhost-scsi controller is edit the xml file, Format is as follows: controller type='scsi' index='0' model='vhost-scsi' source wwpn='naa.6001405f5e3acbba' event_idx='on'/ /controller the tag of wwpn is necessary, the 'model' must

Re: [libvirt] [PATCH v3 07/16] numatune: Encapsulate numatune configuration in order to unify results

2014-07-18 Thread Martin Kletzander
On Thu, Jul 17, 2014 at 10:02:45PM +0400, Roman Bogorodskiy wrote: Eric Blake wrote: On 07/17/2014 10:57 AM, Roman Bogorodskiy wrote: Roman Bogorodskiy wrote: Looks like this breaks build with clang: gmake[3]: Entering directory `/usr/home/novel/code/libvirt/src' CC

Re: [libvirt] [libvirt-glib] gobject: Fix GEnum generation through glib-mkenums

2014-07-18 Thread Zeeshan Ali (Khattak)
On Tue, Jun 3, 2014 at 10:16 AM, Christophe Fergeau cferg...@redhat.com wrote: We were only passing libvirt-gobject-domain.h and libvirt-gobject-connection.h through glib-mkenums, which causes it to only generate GEnum information for enums found in these headers. We want to do that for all

Re: [libvirt] OVMF exposure in libvirt

2014-07-18 Thread Michal Privoznik
On 14.07.2014 16:12, Paolo Bonzini wrote: Il 14/07/2014 11:27, Daniel P. Berrange ha scritto: -drive file=img_1,if=pflash,format=raw,readonly \ -drive file=img_2,if=pflash,format=raw It's safer to add ,unit=0 and ,unit=1 too. We already use loader/ for specifying alternative

Re: [libvirt] OVMF exposure in libvirt

2014-07-18 Thread Paolo Bonzini
Il 18/07/2014 15:01, Michal Privoznik ha scritto: On 14.07.2014 16:12, Paolo Bonzini wrote: Il 14/07/2014 11:27, Daniel P. Berrange ha scritto: -drive file=img_1,if=pflash,format=raw,readonly \ -drive file=img_2,if=pflash,format=raw It's safer to add ,unit=0 and ,unit=1 too. We

Re: [libvirt] [PATCH 1/2] doc: domain: Clarify that disk type 'lun' works with iSCSI too

2014-07-18 Thread Eric Blake
On 07/18/2014 03:22 AM, Peter Krempa wrote: Disk type 'lun' enables SCSI command passthrough for a disk. We stated that it works only with block disks. Qemu supports it also when using the iSCSI protocol. --- docs/formatdomain.html.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [libvirt] [PATCH 2/2] qemu: snapshot: Forbid snapshots of iSCSI passthrough devices

2014-07-18 Thread Eric Blake
On 07/18/2014 03:22 AM, Peter Krempa wrote: As with the local SCSI passthrough devicesm qemu can't support snapshots on those as the block ops are handled by the device. This is also true for iSCSI backing of the disk. Remove the check for the local block device and just forbid snapshot when

Re: [libvirt] [PATCH] doc: add domain to address of hostdev pci

2014-07-18 Thread Eric Blake
On 07/18/2014 01:59 AM, Hu Tao wrote: libvirt supports pci domain already, so update the documentation. Otherwise users who lookup the documentation for how to use hostdev may miss the domain and encounter error when pass-through a pci device in a domain other than 0. Signed-off-by: Hu Tao

Re: [libvirt] [PATCH 1/2] Refactor virMutexInit virRWLockInit and virCondInit

2014-07-18 Thread Eric Blake
On 07/17/2014 10:49 PM, Jincheng Miao wrote: Implement InitInternal functions for Mutex, RWLock and Cond, these functions contain error report using virReportSystemErrorFull, it is controlled by an argument 'quite'. s/quite/quiet/ The related macros are Init and InitQuite, they call

Re: [libvirt] [PATCH 1/2] Refactor virMutexInit virRWLockInit and virCondInit

2014-07-18 Thread Eric Blake
On 07/17/2014 10:49 PM, Jincheng Miao wrote: Implement InitInternal functions for Mutex, RWLock and Cond, these functions contain error report using virReportSystemErrorFull, it is controlled by an argument 'quite'. The related macros are Init and InitQuite, they call InitInternal function by

Re: [libvirt] [PATCH v2] examples: Introduce domtop

2014-07-18 Thread Eric Blake
On 07/18/2014 03:08 AM, Michal Privoznik wrote: There's this question on the list that is asked over and over again. How do I get {cpu, memory, ...} usage in percentage? Or its modified version: How do I plot nice graphs like virt-manager does? It would be nice if we have an example to

Re: [libvirt] [REPOST 4/8] scsi_backend: Use existing LINUX_SYSFS_SCSI_HOST_PREFIX definition

2014-07-18 Thread Michal Privoznik
On 08.07.2014 13:54, John Ferlan wrote: Rather than supplying the path again in the formatting of the sysfs scsi_host directory. Signed-off-by: John Ferlan jfer...@redhat.com --- src/storage/storage_backend_scsi.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

Re: [libvirt] [REPOST 0/8] storage_scsi: Stable SCSI host addressing

2014-07-18 Thread Michal Privoznik
On 08.07.2014 13:54, John Ferlan wrote: Reposting of a series from last month changing only the span version in the docs from 1.2.6 to 1.2.7. Previous posting here: http://www.redhat.com/archives/libvir-list/2014-June/msg00448.html The concept still remains the same - rather than rely on

Re: [libvirt] [REPOST 5/8] virutil: Introduce virReadSCSIUniqueId

2014-07-18 Thread Michal Privoznik
On 08.07.2014 13:54, John Ferlan wrote: Introduce a new function to read the current scsi_host entry and return the value found in the 'unique_id' file. Add a 'scsihosttest' test (similar to the fchosttest, but incorporating some of the concepts of the mocked pci test library) in order to read

Re: [libvirt] [REPOST 1/8] getAdapterName: check for SCSI_HOST

2014-07-18 Thread Michal Privoznik
On 08.07.2014 13:54, John Ferlan wrote: Rather than assume that NOT FC_HOST is SCSI_HOST, let's call them out specifically. Makes it easier to find SCSI_HOST code/structs and ensures something isn't missed in the future Signed-off-by: John Ferlan jfer...@redhat.com ---

Re: [libvirt] [PATCH v2] examples: Introduce domtop

2014-07-18 Thread Michal Privoznik
On 18.07.2014 15:48, Eric Blake wrote: On 07/18/2014 03:08 AM, Michal Privoznik wrote: There's this question on the list that is asked over and over again. How do I get {cpu, memory, ...} usage in percentage? Or its modified version: How do I plot nice graphs like virt-manager does? It would

Re: [libvirt] [PATCH 2/2] qemu: snapshot: Forbid snapshots of iSCSI passthrough devices

2014-07-18 Thread Peter Krempa
On 07/18/14 15:24, Eric Blake wrote: On 07/18/2014 03:22 AM, Peter Krempa wrote: As with the local SCSI passthrough devicesm qemu can't support snapshots on those as the block ops are handled by the device. This is also true for iSCSI backing of the disk. Remove the check for the local block

[libvirt] [PATCH 3/7] qemu: snapshot: Convert if-else switch to switch statement

2014-07-18 Thread Peter Krempa
Convert the target snapshot state selector to a switch statement enumerating all possible values. This points out a few mistakes in the original selector. The logic of the code is preserved until later patches. --- src/qemu/qemu_driver.c | 22 -- 1 file changed, 16

[libvirt] [PATCH 0/7] Fix domain state handling when reverting snapshots in PMSUSPENDED state

2014-07-18 Thread Peter Krempa
Unfortunately qemu behaves strangely so it probably can't be fully verified :/ Peter Krempa (7): event: Add transition reason for PMSUSPENDED state from snapshot ops lib: Add reason for a domain reaching the PMSUSPENDED state qemu: snapshot: Convert if-else switch to switch statement

[libvirt] [PATCH 4/7] qemu: snapshot: Reject revertion from clearly bad states

2014-07-18 Thread Peter Krempa
Report errors on some states snapshots done by qemu should never reach --- src/qemu/qemu_driver.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7ab0f81..2d58b53 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCH 2/7] lib: Add reason for a domain reaching the PMSUSPENDED state

2014-07-18 Thread Peter Krempa
When libvirt reverts a snapshot in the PMSUSPENDED state we need to record how it entered this state. Add the from snapshot reason. --- include/libvirt/libvirt.h.in | 3 +++ src/conf/domain_conf.c | 3 ++- tools/virsh-domain-monitor.c | 3 ++- 3 files changed, 7 insertions(+), 2

[libvirt] [PATCH 6/7] qemu: snapshot: Refactor event creation when reverting snapshots

2014-07-18 Thread Peter Krempa
The internal snapshot revert code used a very unintuitive approach to create lifecycle events while doing the revert. Refactor the code to use the new automagic function to do the revertion. --- src/qemu/qemu_driver.c | 76 +- 1 file changed, 13

[libvirt] [PATCH 5/7] qemu: snapshot: Add helper to generate lifecycle events

2014-07-18 Thread Peter Krempa
Add helper that will generate domain lifecycle events regarding to snapshot revert operations and use it in a demonstration case in the code. The helper will be later used in internal snaphsot revert refactor more widely. --- src/qemu/qemu_driver.c | 142

[libvirt] [PATCH 1/7] event: Add transition reason for PMSUSPENDED state from snapshot ops

2014-07-18 Thread Peter Krempa
Add event reason to support transitions to PM suspended state from snapshot revert operations. --- examples/object-events/event-test.c | 3 +++ include/libvirt/libvirt.h.in| 3 +++ tools/virsh-domain.c| 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH 7/7] qemu: snapshot: Correctly revert snapshots in PMSUSPENDED state

2014-07-18 Thread Peter Krempa
PMSUSPENDED state implies the qemu process running, so we should treat it that way. This increases the possible state space of transitions that may happen during the snapshot revert so this patch documents them as well. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1079162 ---

Re: [libvirt] [PATCH libvirt-tck] bhyve: reconnect to domains after libvirtd restart

2014-07-18 Thread Roman Bogorodskiy
Ján Tomko wrote: On 06/29/2014 06:06 PM, Roman Bogorodskiy wrote: Try to reconnect to the running domains after libvirtd restart. To achieve that, do: ... @@ -1207,9 +1218,16 @@ bhyveStateInitialize(bool priveleged ATTRIBUTE_UNUSED, NULL,

[libvirt] [PATCH 1/2] spec: Use power64 macro

2014-07-18 Thread Cole Robinson
From: Peter Robinson pbrobin...@fedoraproject.org Covers the whole ppc64 family. Example bug for binutils: https://bugzilla.redhat.com/show_bug.cgi?id=834651 --- libvirt.spec.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index

[libvirt] [PATCH 2/2] spec: aarch64 has kvm support with F21+

2014-07-18 Thread Cole Robinson
From: Peter Robinson pbrobin...@fedoraproject.org --- libvirt.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index cac7d99..424b6e2 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -69,7 +69,7 @@ %define qemu_kvm_arches

Re: [libvirt] Enable kvm on aarch64, Cleanup F-16/18 conditionals

2014-07-18 Thread Cole Robinson
FWIW I sent patches to libvir-list for the power64 macro change and the aarch64 change. On 07/15/2014 07:29 PM, Eric Blake wrote: On 07/15/2014 04:29 PM, Peter Robinson wrote: Doing an out-of-the-box build on RHEL 5 is the oldest configuration still actively (if marginally) supported, ideally

[libvirt] [PATCH] maint: simplify some syntax check exemptions

2014-07-18 Thread Eric Blake
Commit 5028160 accidentally weakened the strtol prohibitions to skip ALL files under src/util instead of the former situation of just protecting util/virsexpr.c; even though NONE of the files in that directory need any protection. Shorten some long lines while at it. * cfg.mk

Re: [libvirt] [PATCH 1/2] spec: Use power64 macro

2014-07-18 Thread Eric Blake
On 07/18/2014 11:28 AM, Cole Robinson wrote: From: Peter Robinson pbrobin...@fedoraproject.org Covers the whole ppc64 family. Example bug for binutils: https://bugzilla.redhat.com/show_bug.cgi?id=834651 --- libvirt.spec.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

Re: [libvirt] [PATCH 2/2] spec: aarch64 has kvm support with F21+

2014-07-18 Thread Eric Blake
On 07/18/2014 11:28 AM, Cole Robinson wrote: From: Peter Robinson pbrobin...@fedoraproject.org --- libvirt.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK. diff --git a/libvirt.spec.in b/libvirt.spec.in index cac7d99..424b6e2 100644 --- a/libvirt.spec.in +++

Re: [libvirt] [PATCH 2/2] spec: aarch64 has kvm support with F21+

2014-07-18 Thread Eric Blake
On 07/18/2014 04:05 PM, Eric Blake wrote: On 07/18/2014 11:28 AM, Cole Robinson wrote: From: Peter Robinson pbrobin...@fedoraproject.org --- libvirt.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK. Spoke too soon: diff --git a/libvirt.spec.in b/libvirt.spec.in

Re: [libvirt] [PATCH 1/7] event: Add transition reason for PMSUSPENDED state from snapshot ops

2014-07-18 Thread Eric Blake
On 07/18/2014 10:11 AM, Peter Krempa wrote: Add event reason to support transitions to PM suspended state from snapshot revert operations. --- examples/object-events/event-test.c | 3 +++ include/libvirt/libvirt.h.in| 3 +++ tools/virsh-domain.c| 3 ++- 3 files

Re: [libvirt] [PATCH 2/7] lib: Add reason for a domain reaching the PMSUSPENDED state

2014-07-18 Thread Eric Blake
On 07/18/2014 10:11 AM, Peter Krempa wrote: When libvirt reverts a snapshot in the PMSUSPENDED state we need to record how it entered this state. Add the from snapshot reason. --- include/libvirt/libvirt.h.in | 3 +++ src/conf/domain_conf.c | 3 ++- tools/virsh-domain-monitor.c | 3

Re: [libvirt] [PATCH 3/7] qemu: snapshot: Convert if-else switch to switch statement

2014-07-18 Thread Eric Blake
On 07/18/2014 10:11 AM, Peter Krempa wrote: Convert the target snapshot state selector to a switch statement enumerating all possible values. This points out a few mistakes in the original selector. The logic of the code is preserved until later patches. --- src/qemu/qemu_driver.c | 22

Re: [libvirt] [PATCH 4/7] qemu: snapshot: Reject revertion from clearly bad states

2014-07-18 Thread Eric Blake
On 07/18/2014 10:11 AM, Peter Krempa wrote: Report errors on some states snapshots done by qemu should never reach --- src/qemu/qemu_driver.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) + +case VIR_DOMAIN_NOSTATE: +case VIR_DOMAIN_BLOCKED: +case

Re: [libvirt] [PATCH 7/7] qemu: snapshot: Correctly revert snapshots in PMSUSPENDED state

2014-07-18 Thread Eric Blake
On 07/18/2014 10:11 AM, Peter Krempa wrote: PMSUSPENDED state implies the qemu process running, so we should treat it that way. This increases the possible state space of transitions that may happen during the snapshot revert so this patch documents them as well. Resolves:

[libvirt] [PATCH] support vhost-scsi controller

2014-07-18 Thread Zhang Min
libvirt support vhost-scsi controller. The way to config the vhost-scsi controller is edit the xml file, Format is as follows: controller type='scsi' index='0' model='vhost-scsi' source wwpn='naa.6001405f5e3acbba' event_idx='on'/ /controller the tag of wwpn is necessary, the 'model' must