Re: [libvirt] [PATCH 3/4] Allow multiple parameters for schedinfo

2013-03-21 Thread Martin Kletzander
On 03/14/2013 09:53 PM, Eric Blake wrote: On 03/14/2013 03:27 AM, Martin Kletzander wrote: virsh schedinfo was able to set only one parameter at a time (not counting the deprecated options), but it is useful to set more at once, so this patch adds the possibility to do stuff like this: virsh

[libvirt] [PATCH 2/2] make: regenerate bindings when classname.py changes

2013-03-21 Thread Guannan Ren
--- python/Makefile.am | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/Makefile.am b/python/Makefile.am index 55c5e41..18da9a2 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -26,7 +26,8 @@ CLASSES_EXTRA = \ libvirt-override-virConnect.py \

[libvirt] [PATCH 1/2] python: treat flags as default argument with value 0

2013-03-21 Thread Guannan Ren
The following four functions have not changed because default arguments have to come after positional arguments. Changing them will break the the binding APIs. migrate(self, dconn, flags, dname, uri, bandwidth): migrate2(self, dconn, dxml, flags, dname, uri, bandwidth): migrateToURI(self, duri,

Re: [libvirt] [PATCH RFC 2/5] conf: Introduce scsi hostdev

2013-03-21 Thread Han Cheng
On 03/06/2013 02:24 PM, Osier Yang wrote: On 2013年03月04日 14:01, Han Cheng wrote: @@ -2928,6 +2929,96 @@ virDomainParseLegacyDeviceAddress(char *devaddr, } static int +virDomainHostdevSubsysScsiDefParseXML(const xmlNodePtr node, +

[libvirt] [PATCH] Make virsh support '~' and '$HOME' in interactive mode

2013-03-21 Thread Zhang Xiaohe
This patch makes '~' and '$HOME' can be recognized by virsh in interactive mode. These two variables are replaced with real path. eg: virsh # pwd /home/libvirt virsh # cd ~/rpmbuild virsh # pwd /root/rpmbuild see https://bugzilla.redhat.com/show_bug.cgi?id=806793 Signed-off-by: Zhang Xiaohe

Re: [libvirt] [PATCH] qemu: s/VIR_ERR_NO_SUPPORT/VIR_ERR_OPERATION_UNSUPPORTED

2013-03-21 Thread Michal Privoznik
On 20.03.2013 18:26, Eric Blake wrote: On 03/20/2013 09:59 AM, Michal Privoznik wrote: The VIR_ERR_NO_SUPPORT error code is reserved for cases where an API is not implemented in a driver. It definitely should not be used when an API execution fails due to unsupported operation. ---

Re: [libvirt] [PATCH] Fix linkage of virt-aa-helper with numa library

2013-03-21 Thread Michal Privoznik
On 20.03.2013 17:10, Michal Privoznik wrote: On 20.03.2013 16:02, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The recent commit moved some of the use of libnuma out of the driver code, and into src/util/. It did not, however, update libvirt_util.la to link against

Re: [libvirt] [test-API][PATCH] Add nwfilter test cases and conf

2013-03-21 Thread Guannan Ren
On 03/18/2013 03:04 PM, hongming wrote: The patch covers all nwfilter api provided by libvirt.py. It includes define/undefine/list nwfilters and check them via checking ebtables rule. The following new files are added. cases/nwfilter.conf repos/nwfilter/__init__.py

Re: [libvirt] [PATCH] Fix linkage of virt-aa-helper with numa library

2013-03-21 Thread Daniel P. Berrange
On Thu, Mar 21, 2013 at 10:05:50AM +0100, Michal Privoznik wrote: On 20.03.2013 17:10, Michal Privoznik wrote: On 20.03.2013 16:02, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The recent commit moved some of the use of libnuma out of the driver code, and into

Re: [libvirt] [PATCH RFC 1/5] conf: Introduce readonly to hostdev and change helper function

2013-03-21 Thread Osier Yang
On 2013年03月06日 20:38, Han Cheng wrote: Thanks for your comments~ Please correct me if I'm wrong. As I know,source inhostdev is parsed by virDomainHostdevSubsys(Pci/Usb)DefParseXML. Everything else inhostdev is parsed by virDomainDeviceInfoParseXML. I add readonly follow this. I do think

Re: [libvirt] [PATCH 3/8] virsh-host: Refactor cmdFreecell

2013-03-21 Thread Peter Krempa
On 03/21/13 04:48, Eric Blake wrote: On 03/07/2013 05:53 AM, Peter Krempa wrote: Use the new helpers to determine mutually exclusive options and touch up some parts to simplify the code. --- tools/virsh-host.c | 55 +++--- 1 file changed, 23

Re: [libvirt] [PATCH RFC 2/5] conf: Introduce scsi hostdev

2013-03-21 Thread Osier Yang
On 2013年03月06日 21:09, Han Cheng wrote: On 03/06/2013 02:24 PM, Osier Yang wrote: On 2013年03月04日 14:01, Han Cheng wrote: Adding scsi hostdev, it should like: hostdev mode='subsystem' type='scsi' source adapter name='scsi_host0'/ address bus='0'

Re: [libvirt] [PATCH RFC 2/5] conf: Introduce scsi hostdev

2013-03-21 Thread Osier Yang
On 2013年03月21日 17:01, Han Cheng wrote: On 03/06/2013 02:24 PM, Osier Yang wrote: On 2013年03月04日 14:01, Han Cheng wrote: @@ -2928,6 +2929,96 @@ virDomainParseLegacyDeviceAddress(char *devaddr, } static int +virDomainHostdevSubsysScsiDefParseXML(const xmlNodePtr node, +

Re: [libvirt] [PATCH] Make virsh support '~' and '$HOME' in interactive mode

2013-03-21 Thread Daniel P. Berrange
On Thu, Mar 21, 2013 at 05:00:58PM +0800, Zhang Xiaohe wrote: This patch makes '~' and '$HOME' can be recognized by virsh in interactive mode. These two variables are replaced with real path. If we're going to the trouble of expanding $HOME, then we might as well just make it expand arbitrary

Re: [libvirt] [PATCH RFC 0/5] add support for scsi-generic for virtio-scsi

2013-03-21 Thread Osier Yang
On 2013年03月04日 14:01, Han Cheng wrote: This patch series tried to implement the fifth part of Paolo's proposal: http://permalink.gmane.org/gmane.comp.emulators.libvirt/50428 It is not completed. But it may for use. Needs some more works on: src/qemu/qemu_hostdev.c

[libvirt] [PATCHv4 1/2] rpc: add virNetSocketNewConnectTCPHints

2013-03-21 Thread Ján Tomko
Just like virNetSocketNewConnectTCP, but it has one extra parameter specifying the address family. --- src/libvirt_private.syms | 1 + src/rpc/virnetsocket.c | 9 + src/rpc/virnetsocket.h | 4 3 files changed, 14 insertions(+) diff --git a/src/libvirt_private.syms

[libvirt] [PATCHv4 0/2] allow migration over IPv6

2013-03-21 Thread Ján Tomko
Diff to v3: Use VIR_MIGRATE_IPV6 flag instead of trying to automagically guess if we should use IPv6 or IPv4. v3: https://www.redhat.com/archives/libvir-list/2013-February/msg01379.html Ján Tomko (2): rpc: add virNetSocketNewConnectTCPHints qemu: allow migration over IPv6

[libvirt] [PATCHv4 2/2] qemu: allow migration over IPv6

2013-03-21 Thread Ján Tomko
Add VIR_MIGRATE_IPV6 flag which allows QEMU migration over IPv6 by specifying a hostname. If this flag is specified (or the migrate URI contains a numeric v6 address), we tell QEMU to listen on [::] instead of 0.0.0.0. The same listen address is used for the NBD server. Use virURIParse in

Re: [libvirt] [PATCHv4 0/2] allow migration over IPv6

2013-03-21 Thread Daniel P. Berrange
On Thu, Mar 21, 2013 at 11:35:05AM +0100, Ján Tomko wrote: Diff to v3: Use VIR_MIGRATE_IPV6 flag instead of trying to automagically guess if we should use IPv6 or IPv4. Why ? We should figure this out ourselves for migration just as we do anywhere else we do TCP conections Daniel -- |:

[libvirt] [PATCH] security: Don't add seclabel of type none if there's already a seclabel

2013-03-21 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=923946 The seclabel type='none'/ should be added iff there is no other seclabel defined within a domain. This bug can be easily reproduced: 1) configure selinux seclabel for a domain 2) disable system's selinux and restart libvirtd 3) observe seclabel

Re: [libvirt] [PATCHv4 0/2] allow migration over IPv6

2013-03-21 Thread Jiri Denemark
On Thu, Mar 21, 2013 at 10:38:12 +, Daniel P. Berrange wrote: On Thu, Mar 21, 2013 at 11:35:05AM +0100, Ján Tomko wrote: Diff to v3: Use VIR_MIGRATE_IPV6 flag instead of trying to automagically guess if we should use IPv6 or IPv4. Why ? We should figure this out ourselves for

Re: [libvirt] [PATCH 1/2] python: treat flags as default argument with value 0

2013-03-21 Thread Osier Yang
On 2013年03月21日 16:41, Guannan Ren wrote: The following four functions have not changed because default arguments have to come after positional arguments. Changing them will break the the binding APIs. migrate(self, dconn, flags, dname, uri, bandwidth): migrate2(self, dconn, dxml, flags, dname,

Re: [libvirt] [PATCH 2/2] make: regenerate bindings when classname.py changes

2013-03-21 Thread Osier Yang
On 2013年03月21日 16:41, Guannan Ren wrote: --- python/Makefile.am | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/Makefile.am b/python/Makefile.am index 55c5e41..18da9a2 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -26,7 +26,8 @@ CLASSES_EXTRA

Re: [libvirt] IPv6 migration

2013-03-21 Thread Daniel P. Berrange
On Tue, Mar 19, 2013 at 03:21:31PM +0100, Jiri Denemark wrote: On Mon, Mar 11, 2013 at 19:40:52 +0100, Ján Tomko wrote: Hello. We can only tell QEMU on the destination to listen either on IPv6 or on IPv4. If we're supplied with a numeric v6 address, that's the only thing we need

[libvirt] [PATCH] Fix initialization of virIdentityPtr thread locals

2013-03-21 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Some code mistakenly called virIdentityOnceInit directly instead of virIdentityInitialize(). This meant that one-time initializer was run many times with predictably bad results. Pushed under trivial rule --- src/util/viridentity.c | 4 ++-- 1 file

Re: [libvirt] libvirt-tck test failure with identity patches

2013-03-21 Thread Daniel P. Berrange
On Wed, Mar 20, 2013 at 08:15:31PM +0100, Guido Günther wrote: Hi, the qemu session libvirt-tck test currently fails with: [19:58:21] scripts/domain/050-transient-lifecycle.t ok59684 ms [19:59:20] scripts/domain/051-transient-autostart.t ok 2001 ms

Re: [libvirt] [PATCH] security: Don't add seclabel of type none if there's already a seclabel

2013-03-21 Thread Daniel P. Berrange
On Thu, Mar 21, 2013 at 11:46:18AM +0100, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=923946 The seclabel type='none'/ should be added iff there is no other seclabel defined within a domain. This bug can be easily reproduced: 1) configure selinux seclabel for a domain

[libvirt] remote connection issue 'virsh -c qemu+ssh:///root@localhost/system list'

2013-03-21 Thread Yin Olivia-R63875
Hi, I'm trying remote connection with qemu hypervisor on FSL PPC board. The libvirt server is the PPC board. root@ppc:~# ifconfig eth0 10.193.20.109 root@ppc:~# libvirtd -d root@ppc:~# virsh -c qemu:///system define test.xml root@ppc:~# virsh -c qemu:///system start test root@ppc:~# virsh -c

Re: [libvirt] [PATCH] qemu: Un-mark volume as mirrored/copied if blockjob copy fails

2013-03-21 Thread Peter Krempa
On 03/20/13 18:24, Eric Blake wrote: On 03/20/2013 09:53 AM, Peter Krempa wrote: When the blockjob fails for some reason an event is emitted but the disk wasn't unmarked as being part of a active block copy operation. --- src/qemu/qemu_process.c | 3 +++ 1 file changed, 3 insertions(+) diff

Re: [libvirt] [PATCHv2] python: Fix emulatorpin API bindings

2013-03-21 Thread Peter Krempa
On 03/20/13 21:12, Eric Blake wrote: On 03/20/2013 08:48 AM, Peter Krempa wrote: The addition of emulator pinning APIs didn't think of doing the right job with python APIs for them. The default generator produced unusable code for this. This patch switches to proper code as in the case of

Re: [libvirt] [PATCH] qemu: Support setting the 'removable' flag for USB disks

2013-03-21 Thread anonym
19/03/13 12:59, Daniel P. Berrange wrote: On Tue, Mar 19, 2013 at 09:40:54AM +0100, anonym wrote: Can you use a real name instead of an anonymous psuedonym for patches. Sure. Will do in my next patch proposal. This adds an attribute named 'removable' to the 'target' element of disks, which

[libvirt] Cannot initialize thread local for current identity

2013-03-21 Thread Gao feng
When I play with the latest libvirt,my libvirtd force me out of console of domain. I find the problem is introduced by commit ebf78be4c277cffae57d99daa199a9b3c1cf9804 Set the current client identity during API call dispatch. Below is the error message Error polling connection 'qemu:///system':

[libvirt] [PATCH v2 0/6] libvirt support for userspace iSCSI initiator (libiscsi)

2013-03-21 Thread Paolo Bonzini
This series adds support for the libiscsi userspace initiator. Compared to v1, logical units are now specified with IQN/LUN syntax in the name attribute. Paolo Paolo Bonzini (6): qemu: add support for libiscsi qemu: support passthrough for iscsi disks domain: make port optional for network

[libvirt] [PATCH v2 1/6] qemu: add support for libiscsi

2013-03-21 Thread Paolo Bonzini
libiscsi provides a userspace iSCSI initiator. The main advantage over the kernel initiator is that it is very easy to provide different initiator names for VMs on the same host. Thus libiscsi supports usage of persistent reservations in the VM, which otherwise would only be possible with NPIV.

[libvirt] [PATCH v2 2/6] qemu: support passthrough for iscsi disks

2013-03-21 Thread Paolo Bonzini
This enables usage of commands like persistent reservations. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- src/libvirt_private.syms | 1 + src/qemu/qemu_command.c| 9 ++- .../qemuxml2argv-disk-drive-network-iscsi-lun.args | 1 +

[libvirt] [PATCH v2 3/6] domain: make port optional for network disks

2013-03-21 Thread Paolo Bonzini
Only sheepdog actually required it in the code, and we can use 7000 as the default---the same value that QEMU uses for the simple sheepdog:VOLUME syntax. With this change, the schema can be fixed to allow no port. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- docs/formatdomain.html.in

[libvirt] [PATCH v2 5/6] domain: parse XML for iscsi authorization credentials

2013-03-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- docs/formatdomain.html.in | 12 docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c | 33 --

[libvirt] [PATCH v2 4/6] secret: add iscsi to possible usage types

2013-03-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- docs/formatsecret.html.in| 12 docs/schemas/secret.rng | 10 ++ include/libvirt/libvirt.h.in | 1 + src/conf/secret_conf.c | 22 +- src/conf/secret_conf.h | 1 +

[libvirt] [PATCH v2 6/6] qemu: pass iscsi authorization credentials

2013-03-21 Thread Paolo Bonzini
A better way to do this would be to use a configuration file like [iscsi target-name] user = name password = pwd and pass it via -readconfig. This would remove the username and password from the ps output. For now, however, keep this solution. Signed-off-by: Paolo Bonzini

[libvirt] [PATCH v9 1/3] qdev: DEVICE_DELETED event

2013-03-21 Thread Michael S. Tsirkin
libvirt has a long-standing bug: when removing the device, it can request removal but does not know when the removal completes. Add an event so we can fix this in a robust way. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- QMP/qmp-events.txt| 16 hw/qdev.c

[libvirt] [PATCH v9 0/3] DEVICE_DELETED event

2013-03-21 Thread Michael S. Tsirkin
libvirt has a long-standing bug: when removing the device, it can request removal but does not know when the removal completes. Add an event so we can fix this in a robust way. First patch only adds the event with ID, second patch adds a path field. Split this way for ease of backport (stable

[libvirt] [PATCH v9 2/3] qom: call class destructor before unparent

2013-03-21 Thread Michael S. Tsirkin
Make sure object is valid when destructor is called. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- qom/object.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qom/object.c b/qom/object.c index 3d638ff..a0e3cbe 100644 --- a/qom/object.c +++ b/qom/object.c @@

[libvirt] [PATCH v9 3/3] qmp: add path to device_deleted event

2013-03-21 Thread Michael S. Tsirkin
Add QOM path to device deleted event. It now becomes useful to report it for devices which don't have an ID assigned. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- QMP/qmp-events.txt | 4 +++- hw/qdev.c | 7 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] libvirt-tck test failure with identity patches

2013-03-21 Thread Guido Günther
Hi, On Wed, Mar 20, 2013 at 08:15:31PM +0100, Guido Günther wrote: Hi, the qemu session libvirt-tck test currently fails with: [19:58:21] scripts/domain/050-transient-lifecycle.t ok59684 ms [19:59:20] scripts/domain/051-transient-autostart.t ok 2001 ms

Re: [libvirt] IPv6 migration

2013-03-21 Thread Ján Tomko
On 03/21/2013 11:52 AM, Daniel P. Berrange wrote: On Tue, Mar 19, 2013 at 03:21:31PM +0100, Jiri Denemark wrote: On Mon, Mar 11, 2013 at 19:40:52 +0100, Ján Tomko wrote: ... Yeah, I think using an explicit flag would be the best approach. As we learnt several times, implementing automagic

Re: [libvirt] [Qemu-devel] [PATCH v9 1/3] qdev: DEVICE_DELETED event

2013-03-21 Thread Markus Armbruster
Michael S. Tsirkin m...@redhat.com writes: libvirt has a long-standing bug: when removing the device, it can request removal but does not know when the removal completes. Add an event so we can fix this in a robust way. Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Markus

Re: [libvirt] [Qemu-devel] [PATCH v9 3/3] qmp: add path to device_deleted event

2013-03-21 Thread Markus Armbruster
Michael S. Tsirkin m...@redhat.com writes: Add QOM path to device deleted event. It now becomes useful to report it for devices which don't have an ID assigned. Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Markus Armbruster arm...@redhat.com -- libvir-list mailing list

Re: [libvirt] [PATCH v9 2/3] qom: call class destructor before unparent

2013-03-21 Thread Paolo Bonzini
Il 21/03/2013 13:07, Michael S. Tsirkin ha scritto: Make sure object is valid when destructor is called. Make sure the object still has a canonical path while the unparent callback is running. Otherwise, the series looks good. Paolo Signed-off-by: Michael S. Tsirkin m...@redhat.com ---

Re: [libvirt] IPv6 migration

2013-03-21 Thread Daniel P. Berrange
On Thu, Mar 21, 2013 at 01:16:35PM +0100, Ján Tomko wrote: On 03/21/2013 11:52 AM, Daniel P. Berrange wrote: On Tue, Mar 19, 2013 at 03:21:31PM +0100, Jiri Denemark wrote: On Mon, Mar 11, 2013 at 19:40:52 +0100, Ján Tomko wrote: ... Yeah, I think using an explicit flag would be the best

Re: [libvirt] [PATCH v9 2/3] qom: call class destructor before unparent

2013-03-21 Thread Michael S. Tsirkin
On Thu, Mar 21, 2013 at 01:25:50PM +0100, Paolo Bonzini wrote: Il 21/03/2013 13:07, Michael S. Tsirkin ha scritto: Make sure object is valid when destructor is called. Make sure the object still has a canonical path while the unparent callback is running. Otherwise, the series looks

Re: [libvirt] [PATCH v2 0/6] libvirt support for userspace iSCSI initiator (libiscsi)

2013-03-21 Thread Daniel P. Berrange
On Thu, Mar 21, 2013 at 12:53:48PM +0100, Paolo Bonzini wrote: This series adds support for the libiscsi userspace initiator. Compared to v1, logical units are now specified with IQN/LUN syntax in the name attribute. ACK to all 6 Daniel -- |: http://berrange.com -o-

Re: [libvirt] [PATCH v9 2/3] qom: call class destructor before unparent

2013-03-21 Thread Paolo Bonzini
Il 21/03/2013 13:30, Michael S. Tsirkin ha scritto: On Thu, Mar 21, 2013 at 01:25:50PM +0100, Paolo Bonzini wrote: Il 21/03/2013 13:07, Michael S. Tsirkin ha scritto: Make sure object is valid when destructor is called. Make sure the object still has a canonical path while the unparent

Re: [libvirt] [PATCH v9 0/3] DEVICE_DELETED event

2013-03-21 Thread Andreas Färber
Am 21.03.2013 13:07, schrieb Michael S. Tsirkin: Changes from v8: - reorder qom destruction so no need to change unparent Changes from v7: - none, v7 was malformed series sent by mistake Changes from v6: - make empty event use data: {}, Markus prefers this Changes from

Re: [libvirt] [PATCH] Make virsh support '~' and '$HOME' in interactive mode

2013-03-21 Thread Eric Blake
On 03/21/2013 04:20 AM, Daniel P. Berrange wrote: On Thu, Mar 21, 2013 at 05:00:58PM +0800, Zhang Xiaohe wrote: This patch makes '~' and '$HOME' can be recognized by virsh in interactive mode. These two variables are replaced with real path. If we're going to the trouble of expanding $HOME,

Re: [libvirt] [PATCH RFC] virsh: Fix semantics of --config for update-device command

2013-03-21 Thread Laine Stump
On 03/15/2013 12:37 PM, Peter Krempa wrote: The man page states that with --config the next boot is affected. This can be understood as if _only_ the next bood was affected. This isn't true if the machine is running. This patch adds the full --live, --config, --current infrastructure and

[libvirt] [PATCH] qemu: add support for LSI MegaRAID SAS1078 (aka megasas) SCSI controller

2013-03-21 Thread Paolo Bonzini
This does nothing more than adding the new device and capability. The device is present since QEMU 1.2.0. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- docs/formatdomain.html.in | 6 ++-- docs/schemas/domaincommon.rng | 1 +

[libvirt] [PATCHv2] virsh-domain: Simplify usage of --current, --live and --config flags

2013-03-21 Thread Peter Krempa
This patch uses the new helper to avoid the more complex check for domain state modification flags. --- Notes: Version 2: - remove unecessary usage of if (current) - fix cmdSetmaxmem - convert cmdMemtune too tools/virsh-domain.c | 300

Re: [libvirt] [PATCH v2 1/6] qemu: add support for libiscsi

2013-03-21 Thread Osier Yang
On 2013年03月21日 19:53, Paolo Bonzini wrote: libiscsi provides a userspace iSCSI initiator. The main advantage over the kernel initiator is that it is very easy to provide different initiator names for VMs on the same host. Thus libiscsi supports usage of persistent reservations in the VM, which

Re: [libvirt] [PATCH v2 2/6] qemu: support passthrough for iscsi disks

2013-03-21 Thread Osier Yang
On 2013年03月21日 19:53, Paolo Bonzini wrote: This enables usage of commands like persistent reservations. Signed-off-by: Paolo Bonzinipbonz...@redhat.com --- src/libvirt_private.syms | 1 + src/qemu/qemu_command.c| 9 ++-

Re: [libvirt] [PATCH v2 3/6] domain: make port optional for network disks

2013-03-21 Thread Osier Yang
On 2013年03月21日 19:53, Paolo Bonzini wrote: Only sheepdog actually required it in the code, and we can use 7000 as the default---the same value that QEMU uses for the simple sheepdog:VOLUME syntax. With this change, the schema can be fixed to allow no port. Signed-off-by: Paolo

Re: [libvirt] [PATCH v2 4/6] secret: add iscsi to possible usage types

2013-03-21 Thread Osier Yang
On 2013年03月21日 19:53, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzinipbonz...@redhat.com --- docs/formatsecret.html.in| 12 docs/schemas/secret.rng | 10 ++ include/libvirt/libvirt.h.in | 1 + src/conf/secret_conf.c | 22 +-

Re: [libvirt] [PATCH v2 5/6] domain: parse XML for iscsi authorization credentials

2013-03-21 Thread Osier Yang
On 2013年03月21日 19:53, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzinipbonz...@redhat.com --- docs/formatdomain.html.in | 12 docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c | 33

Re: [libvirt] [PATCH v2 6/6] qemu: pass iscsi authorization credentials

2013-03-21 Thread Osier Yang
On 2013年03月21日 19:53, Paolo Bonzini wrote: A better way to do this would be to use a configuration file like [iscsi target-name] user = name password = pwd and pass it via -readconfig. This would remove the username and password from the ps output. For now, however, keep

Re: [libvirt] [PATCH v2 0/6] libvirt support for userspace iSCSI initiator (libiscsi)

2013-03-21 Thread Osier Yang
On 2013年03月21日 20:46, Daniel P. Berrange wrote: On Thu, Mar 21, 2013 at 12:53:48PM +0100, Paolo Bonzini wrote: This series adds support for the libiscsi userspace initiator. Compared to v1, logical units are now specified with IQN/LUN syntax in the name attribute. ACK to all 6 Daniel Got

[libvirt] [PATCH] lxc: Prevent shutting down the host

2013-03-21 Thread Martin Kletzander
When the container has the same '/dev' mount as host (no chroot), calling domainShutdown(WithFlags) shouldn't shutdown the host it is running on. Signed-off-by: Martin Kletzander mklet...@redhat.com --- This is also valid for 1.0.[23]-maint branches, so in case this gets ACK'd I'll either send a

[libvirt] [PATCH] Correct invalid RNG schemas.

2013-03-21 Thread Martin Kletzander
The 'trang' utility, which is able to transform '.rng' files into '.rnc' files, reported some errors in our schemas that weren't caught by the tools we use in the build. I haven't added a test for this, but the validity can be checked by the following command: trang -I rng -O rnc domain.rng

[libvirt] [PATCH v2 0/2] Correctly treat seclabel of type none

2013-03-21 Thread Michal Privoznik
Don't forget other seclabels when adding a seclabel type='none'/. Michal Privoznik (2): security_manager: Don't manipulate domain XML in virDomainDefGetSecurityLabelDef security: Don't add seclabel of type none if there's already a seclabel src/conf/domain_conf.c | 56

[libvirt] [PATCH v2 1/2] security_manager: Don't manipulate domain XML in virDomainDefGetSecurityLabelDef

2013-03-21 Thread Michal Privoznik
The virDomainDefGetSecurityLabelDef was modifying the domain XML. It tried to find a seclabel corresponding to given sec driver. If the label wasn't found, the function created one which is wrong. In fact it's security manager which should modify this part of domain XML. ---

[libvirt] [PATCH v2 2/2] security: Don't add seclabel of type none if there's already a seclabel

2013-03-21 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=923946 The seclabel type='none'/ should be added iff there is no other seclabel defined within a domain. This bug can be easily reproduced: 1) configure selinux seclabel for a domain 2) disable system's selinux and restart libvirtd 3) observe seclabel

[libvirt] [PATCH v3 10/11] TPM support for QEMU command line

2013-03-21 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- src/qemu/qemu_command.c | 217 1 file changed, 217 insertions(+) Index: libvirt/src/qemu/qemu_command.c === ---

[libvirt] [PATCH v3 01/11] Add QMP probing for TPM

2013-03-21 Thread Stefan Berger
Probe for QEMU's QMP TPM support by querying the lists of supported TPM models (query-tpm-models) and backend types (query-tpm-types). The setting of the capability flags following the strings returned from the commands above is only provided in the patch where domain_conf.c gets TPM support due

[libvirt] [PATCH v3 02/11] Add function to find a needle in a string array

2013-03-21 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- src/libvirt_private.syms |1 + src/util/virstring.c | 14 ++ src/util/virstring.h |2 ++ 3 files changed, 17 insertions(+) Index: libvirt/src/util/virstring.c

[libvirt] [PATCH v3 09/11] QEMU Cgroup support for TPM passthrough

2013-03-21 Thread Stefan Berger
Some refactoring for virDomainChrSourceDef type of devices so we can use common code. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- src/qemu/qemu_cgroup.c | 53 +++-- 1 file changed, 43 insertions(+), 10 deletions(-) Index:

[libvirt] [PATCH v3 07/11] Add SELinux and DAC labeling support for TPM passthrough

2013-03-21 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- src/security/security_dac.c | 53 ++ src/security/security_selinux.c | 96 2 files changed, 149 insertions(+) Index: libvirt/src/security/security_selinux.c

[libvirt] [PATCH v3 11/11] Add test case for TPM passthrough

2013-03-21 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- tests/qemuxml2argvdata/qemuxml2argv-tpm-passthrough.args |6 +++ tests/qemuxml2argvdata/qemuxml2argv-tpm-passthrough.xml | 29 +++ tests/qemuxml2argvtest.c |3 +

[libvirt] [PATCH v3 08/11] Audit the starting of a guest using TPM passthrough

2013-03-21 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- src/conf/domain_audit.c | 55 1 file changed, 55 insertions(+) Index: libvirt/src/conf/domain_audit.c === ---

[libvirt] [PATCH v3 04/11] Helper functions for host TPM support

2013-03-21 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- po/POTFILES.in |1 src/Makefile.am |1 src/libvirt_private.syms |4 + src/util/virtpm.c| 124 +++ src/util/virtpm.h| 27 ++ 5 files

[libvirt] [PATCH v3 06/11] Convert QMP strings into QEMU capabilty bits

2013-03-21 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- src/qemu/qemu_capabilities.c | 56 +++ 1 file changed, 56 insertions(+) Index: libvirt/src/qemu/qemu_capabilities.c === ---

[libvirt] [PATCH v3 05/11] Parse TPM passthrough XML in the domain XML

2013-03-21 Thread Stefan Berger
Parse the domain XML with TPM passthrough support. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- src/conf/domain_conf.c | 179 +++ src/conf/domain_conf.h | 33 src/libvirt_private.syms |5 + 3 files changed, 217

[libvirt] [PATCH v3 03/11] Add documentation and schema for TPM passthrough

2013-03-21 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- docs/formatdomain.html.in | 57 ++ docs/schemas/domaincommon.rng | 43 +++ 2 files changed, 100 insertions(+) Index: libvirt/docs/formatdomain.html.in

[libvirt] [PATCH v3 00/11] Add support for guests with TPM passthrough device

2013-03-21 Thread Stefan Berger
Hello! The following set of patches adds support to libvirt for adding a TPM passthrough device to a QEMU guest. Support for this was recently accepted into QEMU. This set of patches borrows a lot from the recently added support for rng's. Regards, Stefan --- v2-v3: - followed tree to

Re: [libvirt] [PATCH] Correct invalid RNG schemas.

2013-03-21 Thread Ján Tomko
On 03/21/2013 04:28 PM, Martin Kletzander wrote: The 'trang' utility, which is able to transform '.rng' files into '.rnc' files, reported some errors in our schemas that weren't caught by the tools we use in the build. I haven't added a test for this, but the validity can be checked by the

[libvirt] [PATCH v2] Allow multiple parameters for schedinfo

2013-03-21 Thread Martin Kletzander
virsh schedinfo was able to set only one parameter at a time (not counting the deprecated options), but it is useful to set more at once, so this patch adds the possibility to do stuff like this: virsh schedinfo domain cpu_shares=0 vcpu_period=0 vcpu_quota=0 \ emulator_period=0 emulator_quota=0

Re: [libvirt] [PATCH] Correct invalid RNG schemas.

2013-03-21 Thread Martin Kletzander
On 03/21/2013 05:00 PM, Ján Tomko wrote: On 03/21/2013 04:28 PM, Martin Kletzander wrote: The 'trang' utility, which is able to transform '.rng' files into '.rnc' files, reported some errors in our schemas that weren't caught by the tools we use in the build. I haven't added a test for this,

[libvirt] [PATCH 4/5] virsh-domain: Add --live, --config, --current logic to cmdDetachDevice

2013-03-21 Thread Peter Krempa
Use the established approach to improve this function too. --- tools/virsh-domain.c | 46 +- tools/virsh.pod | 15 +++ 2 files changed, 48 insertions(+), 13 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index

[libvirt] [PATCH 5/5] virsh-domain: Add --live, --config, --current logic to cmdDetachDisk

2013-03-21 Thread Peter Krempa
Use the established approach to improve this function too. --- tools/virsh-domain.c | 59 +--- tools/virsh.pod | 15 + 2 files changed, 53 insertions(+), 21 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c

[libvirt] [PATCH 3/5] virsh-domain: Add --live, --config, --current logic to cmdDetachInterface

2013-03-21 Thread Peter Krempa
Use the established approach to improve this function too. --- tools/virsh-domain.c | 52 +++- tools/virsh.pod | 15 +++ 2 files changed, 50 insertions(+), 17 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c

[libvirt] [PATCH 0/5] Add domain modification impact flags to hot-management commands

2013-03-21 Thread Peter Krempa
As promised in the RFC, this series adds the --live, --config, --current and --persistent flags to virsh commands that were lacking them. Peter Krempa (5): virsh-domain: Fix declarations of flag variables in cmdChangeMedia virsh: Fix semantics of --config for update-device command

[libvirt] [PATCH 1/5] virsh-domain: Fix declarations of flag variables in cmdChangeMedia

2013-03-21 Thread Peter Krempa
flags were declared as signed and the parameter options can be declared directly. Also use macros for mutual exclusion on some of the incompatible parameter variables. --- tools/virsh-domain.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git

Re: [libvirt] [PATCHv4 0/9] Introduce driver specific callbacks and get rid of irrelevant data in virCaps

2013-03-21 Thread Peter Krempa
On 03/15/13 16:26, Peter Krempa wrote: This series now splits out almost everything from the virCaps object (except for the defaultConsoleTargetType callback that I will post later as It requires more tweaking). See notes in individual patches for change summary. Ping? Anybody that could

[libvirt] [PATCH 2/5] virsh: Fix semantics of --config for update-device command

2013-03-21 Thread Peter Krempa
The man page states that with --config the next boot is affected. This can be understood as if _only_ the next bood was affected. This isn't true if the machine is running. This patch adds the full --live, --config, --current infrastructure and tweaks stuff to correctly support the obsolete

[libvirt] [PATCH v5 1/3] virFile: Add APIs for extended attributes handling

2013-03-21 Thread Michal Privoznik
Currently, only three wrappers are being implemented: virFileSetAttr for setting attributes virFileGetAttr for querying attributes (note we need to call it twice, first time to get length of attribute value, second to get actual value) virFileRemoveAttr for removing attributes --- diff to v4:

[libvirt] [PATCH v5 3/3] security_dac: Favour ACLs over chown()

2013-03-21 Thread Michal Privoznik
On filesystems supporting ACLs we don't need to do a chown but we can just set ACLs to gain access for qemu. However, since we are setting these on too low level, where we don't know if disk is just a read only or read write, we set read write access unconditionally. From implementation POV, a

[libvirt] [PATCH v5 0/3] Keep original file label

2013-03-21 Thread Michal Privoznik
Yet another rework of $subj. I am still not solving atomicity problem for now. See diff to the patches if you want to know what's changed. Michal Privoznik (3): virFile: Add APIs for extended attributes handling virfile: Introduce internal API for managing ACL security_dac: Favour ACLs

[libvirt] [PATCH v5 2/3] virfile: Introduce internal API for managing ACL

2013-03-21 Thread Michal Privoznik
For now, only three APIs are implemented: virFileGetACL to retrieve permission for a specific user virFileSetACL for setting requested permissions for a specific user, virFileRemoveACL to remove those permissions. --- diff to v4: -drop errno setting diff to v3: -set errno=ENOSYS when building

Re: [libvirt] [PATCHv4 7/9] virCaps: remove defaultDiskDriverType from the struct

2013-03-21 Thread Peter Krempa
On 03/15/13 16:26, Peter Krempa wrote: Use the qemu specific callback to fill this data in the qemu driver as it's the only place where it was used and fix tests as the qemu test capability object didn't configure the defaults for the tests. --- Notes: Version 4: - new in series

Re: [libvirt] [PATCHv4 7/9] virCaps: remove defaultDiskDriverType from the struct

2013-03-21 Thread Peter Krempa
On 03/21/13 18:07, Peter Krempa wrote: On 03/15/13 16:26, Peter Krempa wrote: Use the qemu specific callback to fill this data in the qemu driver as it's the only place where it was used and fix tests as the qemu test capability object didn't configure the defaults for the tests. --- Notes:

Re: [libvirt] remote connection issue 'virsh -c qemu+ssh:///root@localhost/system list'

2013-03-21 Thread Doug Goldstein
On Thu, Mar 21, 2013 at 6:23 AM, Yin Olivia-R63875 r63...@freescale.com wrote: Hi, I'm trying remote connection with qemu hypervisor on FSL PPC board. The libvirt server is the PPC board. root@ppc:~# ifconfig eth0 10.193.20.109 root@ppc:~# libvirtd -d root@ppc:~# virsh -c qemu:///system

[libvirt] [PATCH] Fix parsing of bond interface XML

2013-03-21 Thread Jim Fehlig
Noticed that parsing bond interface XML containing the miimon element fails interface type=bond name=bond0 ... bond mode=active-backup miimon freq=100 carrier=netif/ ... /bond /interface This configuration does not contain the optional updelay and downdelay

[libvirt] [PATCH] nwfilter: probe for inverted ctdir

2013-03-21 Thread Stefan Berger
Linux netfilter at some point inverted the meaning of the '--ctdir reply' and newer netfilter implementations now expect '--ctdir original' instread and vice-versa. We probe for this netfilter change via a UDP message over loopback and 3 filtering rules applied to INPUT. If the sent byte arrives,

  1   2   >