Re: [libvirt] [PATCH v5 0/5] ARM: add query-gic-capabilities SMP command

2016-03-21 Thread Peter Xu
On Mon, Mar 21, 2016 at 04:56:07PM +0100, Andrea Bolognani wrote: > On Fri, 2016-03-18 at 11:27 +0800, Peter Xu wrote: > > v5 changes: > > - patch 2: moved to target-arm/monitor.c (from target-arm/machine.c) > >    [Peter] > > - patch 3: splitted into three patches: [all from Peter's commen

[libvirt] [PATCH 1/2] qemu: Support SPICE listen over unix socket

2016-03-21 Thread Cole Robinson
Add support for SPICE listen over unix socket. This has been in qemu since v2.3. The XML is: Which matches support for VNC listen over unix socket. https://bugzilla.redhat.com/show_bug.cgi?id=1151761 --- docs/schemas/domaincommon.rng | 5 src/conf/domain_conf.c

[libvirt] [PATCH 2/2] qemu: Add qemu.conf option spice_auto_unix_socket

2016-03-21 Thread Cole Robinson
Similar to vnc_auto_unix_socket, this option tells libvirt to allocate a listening socket path for default config, taking precedence over spice_listen. https://bugzilla.redhat.com/show_bug.cgi?id=1043919 --- src/qemu/libvirtd_qemu.aug | 1 + src/qemu/qemu.conf

[libvirt] [PATCH 0/2] qemu: support SPICE+unix socket

2016-03-21 Thread Cole Robinson
qemu has supported SPICE+unix socket listening since 2.3.0. Patch #1 wires it up from domain_conf.c down to qemu, patch #2 adds qemu.conf spice_auto_unix_socket option Full disclosure: this duplicates the logic of VNC socket usage, which has some pre-existing warts: - When the VM is running with

Re: [libvirt] [PATCH 07/10] secret: Introduce virSecretObjListExport

2016-03-21 Thread Eric Blake
On 03/02/2016 11:55 AM, John Ferlan wrote: > Add function to return a "match" filtered list of secret objects. This > function replaces the guts of secretConnectListAllSecrets. > > Need to also move and make global virSecretUsageIDForDef since it'll > be used by both secret_driver.c and secret_con

Re: [libvirt] virtual machine won't autostart when using LVM with cache

2016-03-21 Thread David Hlacik
thanks, but issue remains the same vi /usr/lib/systemd/system/libvirtd.service [Unit] Description=Virtualization daemon Before=libvirt-guests.service After=network.target After=dbus.service After=iscsid.service After=apparmor.service After=local-fs.target After=remote-fs.target After=lvm2-monitor

Re: [libvirt] [PATCH v2] nss: Make aligning look nicer

2016-03-21 Thread Martin Kletzander
On Mon, Mar 21, 2016 at 02:20:21PM -0400, Cole Robinson wrote: Fixes arm32 build failures for me I though I pushed it and apparently, I didn't. Fixed now. Thanks, Cole On 03/21/2016 07:57 AM, Martin Kletzander wrote: Every aligning requires at least one cast and it's hard to read. Let's

Re: [libvirt] [PATCH 05/10] secret: Introduce virSecretObjListAdd* and virSecretObjListRemove

2016-03-21 Thread John Ferlan
On 03/18/2016 05:31 PM, Eric Blake wrote: > On 03/02/2016 11:55 AM, John Ferlan wrote: >> Add the functions to add/remove elements from the hashed secret obj list. >> These will replace secret_driver functions secretAssignDef and >> secretObjRemove. >> >> The virSecretObjListAddLocked will perfo

Re: [libvirt] [PATCH 6/8] domain: Make request address allocation

2016-03-21 Thread Cole Robinson
On 03/21/2016 02:44 PM, John Ferlan wrote: > > > On 03/08/2016 11:36 AM, Cole Robinson wrote: >> If a bare device is specified, set an internal >> flag address->auto_allocate. Individual hv drivers can then check for >> this and act on it if they want, nothing is allocated in generic code. >> >>

Re: [libvirt] [libvirt-sandbox PATCH] sandbox-builder: Don't try g_file_enumerator_next_file if enumerator is NULL

2016-03-21 Thread Guido Günther
On Mon, Mar 21, 2016 at 09:40:35AM +, Daniel P. Berrange wrote: > On Sat, Mar 19, 2016 at 02:38:00PM +0100, Guido Günther wrote: > > Passing the NULL enumerator to g_file_enumerator_next_file makes > > us overwrite error information otherwise: > > > > $ sudo bin/virt-sandbox-service create

Re: [libvirt] [PATCH 6/8] domain: Make request address allocation

2016-03-21 Thread John Ferlan
On 03/08/2016 11:36 AM, Cole Robinson wrote: > If a bare device is specified, set an internal > flag address->auto_allocate. Individual hv drivers can then check for > this and act on it if they want, nothing is allocated in generic code. > > If drivers allocate an address, they are expected to

Re: [libvirt] [PATCH 4/8] util: xml: add virXMLPropertyCount

2016-03-21 Thread John Ferlan
On 03/08/2016 11:36 AM, Cole Robinson wrote: > Returns an integer count of the number of XML properties an element > has. Will be used in future patches. > --- > src/util/virxml.c | 17 + > src/util/virxml.h | 1 + > 2 files changed, 18 insertions(+) > Sorry for not completing,

Re: [libvirt] [PATCH 5/8] tests: Add failure flags to CompareDomainXML2XML

2016-03-21 Thread John Ferlan
On 03/08/2016 11:36 AM, Cole Robinson wrote: > Will be used in future patches Could be beefed up to indicate how it's expected to be used... > --- > tests/bhyvexml2xmltest.c | 2 +- > tests/genericxml2xmltest.c | 2 +- > tests/lxcxml2xmltest.c | 2 +- > tests/qemuxml2xmltest.c| 5

[libvirt] [RFC 1/3] qemu: Create domain master key

2016-03-21 Thread John Ferlan
Add a masterKey to _qemuDomainObjPrivate to store a base64 encoded domain master key in order to support the ability to encrypt/decrypt sensitive data shared between libvirt and qemu. The base64 encoded value will be written to the domain XML file for consistency between domain restarts. Two APIs

[libvirt] [RFC 0/3] Master secret key support

2016-03-21 Thread John Ferlan
Posted as RFC primarily to make sure there's buyin for something that will become the basis for more patches to add support for using the master secret to encrypt sensitive data using objects. This work is related to the QEMU 2.6 commit 'ac1d8878' (not a libvirt commit, rather a qemu.git commit id)

[libvirt] [RFC 3/3] qemu: Introduce qemuBuildMasterKeyCommandLine

2016-03-21 Thread John Ferlan
Using the masterKey and if the capability exists build an -object secret command line to pass a masterKey file to qemu. The qemuBuildHasMasterKey is expected to be reused by other objects which would need to know not only if the masterKey has been provided, but if the secret object can be used for

[libvirt] [RFC 2/3] qemu: Add capability bit for qemu secret object

2016-03-21 Thread John Ferlan
Add a capability bit for the qemu secret object Signed-off-by: John Ferlan --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index b223837..efbbad6 100644 --- a/s

Re: [libvirt] [PATCH v2] nss: Make aligning look nicer

2016-03-21 Thread Cole Robinson
Fixes arm32 build failures for me Thanks, Cole On 03/21/2016 07:57 AM, Martin Kletzander wrote: > Every aligning requires at least one cast and it's hard to read. Let's > make a function that makes sure the pointer is moved according to the > alignment and use that to move throughout the data bu

Re: [libvirt] virtual machine won't autostart when using LVM with cache

2016-03-21 Thread Cole Robinson
On 03/21/2016 12:28 PM, David Hlacik wrote: > Hello guys, > > OS Fedora 23 with latest updates > > Recently I have switched to use LVM cache feature on logical volume > /dev/hdd/windata1 to improve it performace using 32GB partition from SSD disk. > > However, when my computer will start, my vir

Re: [libvirt] [PATCH] tests: Produce predictable results in nsstest

2016-03-21 Thread John Ferlan
On 03/21/2016 11:33 AM, Michal Privoznik wrote: > Problem is that in the test any status file matching > tests/nssdata/*.status is loaded as it contains IP addresses that > are parsed. However, there's no order specified in which the > files are loaded. Therefore on different systems the order ma

[libvirt] [RFC 4/6] conf: Expose GIC capabilities

2016-03-21 Thread Andrea Bolognani
Add information about GIC capabilities to virDomainCaps and update the formatter to include them in the XML output. --- src/conf/domain_capabilities.c | 20 src/conf/domain_capabilities.h | 10 ++ tests/domaincapsschemadata/d

[libvirt] [RFC 3/6] schema: Validate GIC capabilities

2016-03-21 Thread Andrea Bolognani
We need to expose GIC capabilities in the domain capabilities XML: update the schema to validate documents that contain the new information. --- docs/schemas/domaincaps.rng | 18 ++ 1 file changed, 18 insertions(+) diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps

[libvirt] [RFC 2/6] qemu: Probe GIC capabilities

2016-03-21 Thread Andrea Bolognani
Use the query-gic-capabilities QMP command to probe GIC capabilities for a QEMU binary. The information obtained is stored in virQEMUCaps. --- src/qemu/qemu_capabilities.c | 24 src/qemu/qemu_monitor.c | 10 + src/qemu/qemu_monitor.h | 4 ++ src/qemu/qemu_monitor_json.

[libvirt] [RFC 5/6] qemu: Fill in GIC capabilities

2016-03-21 Thread Andrea Bolognani
Take the GIC capabilities stored in a virQEMUCaps instance and update a virDomainCaps instance appropriately. --- src/qemu/qemu_capabilities.c | 38 +- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_cap

[libvirt] [RFC 0/6] Probe and expose GIC capabilities

2016-03-21 Thread Andrea Bolognani
This series implements support for asking QEMU what GIC versions can be used for guests, eg: and exposing such information to users via domain capabilities. QEMU patches that implement the query-gic-capabilities QMP command: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg

[libvirt] [RFC 6/6] qemu: Cache GIC capabilities

2016-03-21 Thread Andrea Bolognani
Implement support for saving GIC capabilities in the cache and read them back. --- src/qemu/qemu_capabilities.c | 87 1 file changed, 87 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 64007f0..23c3740 10064

[libvirt] [RFC 1/6] conf: Get rid of virDomainCapsDevice

2016-03-21 Thread Andrea Bolognani
The struct contains a single boolean field which can be applied to domain capabilities that do not represent device availability. Instead of trying to come up with a more generic name just get rid of the struct altogether. --- src/conf/domain_capabilities.c | 6 +++--- src/conf/domain_capabiliti

Re: [libvirt] nss build failure on arm32

2016-03-21 Thread Martin Kletzander
On Mon, Mar 21, 2016 at 11:52:00AM -0400, Cole Robinson wrote: Just a note, I'm getting build failures with the nss module on Fedora 23 arm 32bit: This should be fixed by now with my series about alignment. nss/libvirt_nss.c: In function '_nss_libvirt_gethostbyname3_r': nss/libvirt_nss.c:325

[libvirt] virtual machine won't autostart when using LVM with cache

2016-03-21 Thread David Hlacik
Hello guys, OS Fedora 23 with latest updates Recently I have switched to use LVM cache feature on logical volume /dev/hdd/windata1 to improve it performace using 32GB partition from SSD disk. However, when my computer will start, my virtual machine won't autostart Mar 21 10:48:57 brutus-coreos

Re: [libvirt] [PATCH v2 0/2] Fixup SCSI node devices

2016-03-21 Thread Cole Robinson
On 03/21/2016 10:49 AM, Bjoern Walk wrote: > SCSI targets seem to be missing proper treatment and it was actually not > possible to import a SCSI target nodedev device definition because of some > typo. In order to extend the test case to catch this, I found that the XML > schema was missing as wel

Re: [libvirt] [PATCH] tests: Produce predictable results in nsstest

2016-03-21 Thread Cole Robinson
On 03/21/2016 11:33 AM, Michal Privoznik wrote: > Problem is that in the test any status file matching > tests/nssdata/*.status is loaded as it contains IP addresses that > are parsed. However, there's no order specified in which the > files are loaded. Therefore on different systems the order may

[libvirt] nss build failure on arm32

2016-03-21 Thread Cole Robinson
Just a note, I'm getting build failures with the nss module on Fedora 23 arm 32bit: nss/libvirt_nss.c: In function '_nss_libvirt_gethostbyname3_r': nss/libvirt_nss.c:325:17: error: cast increases required alignment of target type [-Werror=cast-align] r_aliases = (char **) buffer + idx;

Re: [libvirt] [PATCH V2 0/4] Extend to a tristate

2016-03-21 Thread Jim Fehlig
On 03/21/2016 06:49 AM, Ján Tomko wrote: > On Mon, Feb 29, 2016 at 09:00:44PM -0700, Jim Fehlig wrote: >> An expanded V2 of >> >> https://www.redhat.com/archives/libvir-list/2016-February/msg00140.html >> >> In V2, the feature is extended with a state='on|off' attribute to >> allow differentiating

[libvirt] [PATCH] tests: Produce predictable results in nsstest

2016-03-21 Thread Michal Privoznik
Problem is that in the test any status file matching tests/nssdata/*.status is loaded as it contains IP addresses that are parsed. However, there's no order specified in which the files are loaded. Therefore on different systems the order may be different. This is then producing an unexpected resul

Re: [libvirt] [PATCH v3 00/14] Implement post-copy migration

2016-03-21 Thread Jiri Denemark
On Fri, Mar 18, 2016 at 15:05:54 +0100, Pavel Hrdina wrote: > ACK series but see my comments for patch 2 and 5. Thanks, I fixed the small issues and pushed this series. Jirka -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v2 1/2] conf: node_device: fix up SCSI target

2016-03-21 Thread Bjoern Walk
When reading in an XML definition for a SCSI target device, the name property of struct scsi_target refers to the @target element. Let's fix this obvious typo and also extend the XML schema to provide validation. Signed-off-by: Bjoern Walk --- docs/schemas/nodedev.rng| 11 +++ src/c

[libvirt] [PATCH v2 0/2] Fixup SCSI node devices

2016-03-21 Thread Bjoern Walk
SCSI targets seem to be missing proper treatment and it was actually not possible to import a SCSI target nodedev device definition because of some typo. In order to extend the test case to catch this, I found that the XML schema was missing as well. Bjoern Walk (2): conf: node_device: fix up SC

[libvirt] [PATCH v2 2/2] tests: nodedevxml2xml: add test for SCSI target

2016-03-21 Thread Bjoern Walk
Let's add a test for SCSI target nodedev devices. Signed-off-by: Bjoern Walk --- tests/nodedevschemadata/scsi_target0_0_0.xml | 7 +++ tests/nodedevxml2xmltest.c | 1 + 2 files changed, 8 insertions(+) create mode 100644 tests/nodedevschemadata/scsi_target0_0_0.xml diff -

Re: [libvirt] [PATCH] conf: node_device: fix wrong XML element reference

2016-03-21 Thread Cole Robinson
On 03/21/2016 07:55 AM, Bjoern Walk wrote: > When reading in a XML definition for a SCSI target device, the name > property of struct scsi_target refers to the @target element. > > Let's fix this obvious typo. > > Signed-off-by: Bjoern Walk > Reviewed-by: Boris Fiuczynski > --- > src/conf/node

Re: [libvirt] [PATCH V2 0/4] Extend to a tristate

2016-03-21 Thread Ján Tomko
On Mon, Feb 29, 2016 at 09:00:44PM -0700, Jim Fehlig wrote: > An expanded V2 of > > https://www.redhat.com/archives/libvir-list/2016-February/msg00140.html > > In V2, the feature is extended with a state='on|off' attribute to > allow differentiating the 'on' and 'off' states with not set (or hyp

Re: [libvirt] [PATCH v2] nss: Make aligning look nicer

2016-03-21 Thread Michal Privoznik
On 21.03.2016 12:57, Martin Kletzander wrote: > Every aligning requires at least one cast and it's hard to read. Let's > make a function that makes sure the pointer is moved according to the > alignment and use that to move throughout the data buffer. > > Signed-off-by: Martin Kletzander > --- >

[libvirt] [PATCH] conf: node_device: fix wrong XML element reference

2016-03-21 Thread Bjoern Walk
When reading in a XML definition for a SCSI target device, the name property of struct scsi_target refers to the @target element. Let's fix this obvious typo. Signed-off-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/conf/node_device_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[libvirt] [PATCH v2] nss: Make aligning look nicer

2016-03-21 Thread Martin Kletzander
Every aligning requires at least one cast and it's hard to read. Let's make a function that makes sure the pointer is moved according to the alignment and use that to move throughout the data buffer. Signed-off-by: Martin Kletzander --- v2: - Initialize @idx in _nss_libvirt_gethostbyname4_r as

[libvirt] [PATCH] tools: virt-host-validate: fix KVM check on s390

2016-03-21 Thread Bjoern Walk
Since kernel version 4.5, s390 has the 'sie' flag to declare its hardware virtualization support. Let's make virt-host-validate aware so this check is passed correctly. Signed-off-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- tools/virt-host-validate-qemu.c | 3 ++- 1 file changed, 2 insert

Re: [libvirt] RFC backup API

2016-03-21 Thread Daniel P. Berrange
On Mon, Mar 21, 2016 at 01:18:19PM +0300, Maxim Nestratov wrote: > Hi all, > > It's been already quite a long time since qemu implemented QMP > "drive-backup" command to create block devices backups. Even more, since > qemu 2.4 there is a possibility to create incremental backups. Though it is > p

[libvirt] RFC backup API

2016-03-21 Thread Maxim Nestratov
Hi all, It's been already quite a long time since qemu implemented QMP "drive-backup" command to create block devices backups. Even more, since qemu 2.4 there is a possibility to create incremental backups. Though it is possible to backup all attached to a domain disk drives by combining them

Re: [libvirt] [PATCH v2 1/3] qemu: Make all SPICE command-line args optional

2016-03-21 Thread Christophe Fergeau
On Fri, Mar 18, 2016 at 11:09:25AM +0100, Christophe Fergeau wrote: > On Fri, Mar 18, 2016 at 10:25:58AM +0100, Ján Tomko wrote: > > This breaks make syntax-check: > > > > Curly brackets around single-line body: > > src/qemu/qemu_command.c:7559-7561: > > if (graphics->data.spice.copypaste == V

Re: [libvirt] [libvirt-sandbox PATCH] sandbox-builder: Don't try g_file_enumerator_next_file if enumerator is NULL

2016-03-21 Thread Daniel P. Berrange
On Sat, Mar 19, 2016 at 02:38:00PM +0100, Guido Günther wrote: > Passing the NULL enumerator to g_file_enumerator_next_file makes > us overwrite error information otherwise: > > $ sudo bin/virt-sandbox-service create --unitfile foo.service foo > (process:18529): GLib-GIO-CRITICAL **: g_fil

Re: [libvirt] [libvirt-sandbox PATCH] tests: add file extension for host mounts

2016-03-21 Thread Daniel P. Berrange
On Sat, Mar 19, 2016 at 02:29:16PM +0100, Guido Günther wrote: > otherwise we fail in gvir_sandbox_util_guess_image_format with > > "Cannot identify file extension in '/tmp/home' > --- > libvirt-sandbox/tests/test-config.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [libvirt] [PATCH 1/2] util: Add virSocketAddrSetIPv[46]AddrNetOrder and use it

2016-03-21 Thread Peter Krempa
On Fri, Mar 18, 2016 at 17:42:28 +0100, Martin Kletzander wrote: > This allows setting the address if you already have the address in > network byte order. Some places were having the address in network > order and calling ntohl() just so the original function can call htonl() > again. Let's call

Re: [libvirt] question about rdma migration

2016-03-21 Thread Jiri Denemark
On Sat, Mar 19, 2016 at 14:53:45 +0200, Roy Shterman wrote: > Hi Jirka, > > Thanks for your answer, but I'm looking for a way to set RLIMIT_MEMLOCK > without locking all VM memory. > I'm wondering if there is a way to set RLIMIT_MEMLOCK without using the > methods you wrote above. No, libvirt doe

Re: [libvirt] [PATCH 2/2] nss: Make aligning look nicer

2016-03-21 Thread Peter Krempa
On Fri, Mar 18, 2016 at 17:42:29 +0100, Martin Kletzander wrote: > Every aligning requires at least one cast and it's hard to read. Let's > make a function that makes sure the pointer is moved according to the > alignment and use that to move throughout the data buffer. > > Signed-off-by: Martin

[libvirt] [PATCH V4 0/6] libxl: support assign VF to guest from SRIOV pool

2016-03-21 Thread Chunyan Liu
This patch series is to support assign VF to guest from SRIOV pool, including fixes to network attach/detach and fix to libxlDomainstart. Chunyan Liu (6): libxlDomainAttachNetDevice: release actual deivce and remove hostdev when fail libxlDomainDetachNetDevice: cleanup codes libxlDomainD

[libvirt] [PATCH V4 2/6] libxlDomainDetachNetDevice: cleanup codes

2016-03-21 Thread Chunyan Liu
Adjust codes to make it cleaner. Signed-off-by: Chunyan Liu --- src/libxl/libxl_driver.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 05ebe29..74ebea4 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/li

[libvirt] [PATCH V4 4/6] libxl: support creating domain with VF assignment from a pool

2016-03-21 Thread Chunyan Liu
Add codes to support creating domain with network defition of assigning SRIOV VF from a pool. Signed-off-by: Chunyan Liu --- src/libxl/libxl_domain.c | 50 tests/Makefile.am| 3 +++ 2 files changed, 53 insertions(+) diff --git a/src/libx

[libvirt] [PATCH V4 6/6] libxlDomainStart: correct cleanup after failure

2016-03-21 Thread Chunyan Liu
Functions like libxlNetworkPrepareDevices, libxlBuildDomainConfig, virHostdevPrepareDomainDevices will allocate and reserve some resources. In libxlDomainStart, after calling these functions, in case of failure, we need to call libxlDomainCleanup to check and release resoureces. Besides, since libx

[libvirt] [PATCH V4 5/6] libxl: fix hot add/remove VF from a pool

2016-03-21 Thread Chunyan Liu
For those VF allocated from a network pool, we need to set its backend to be VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN so that later work can be correct. Signed-off-by: Chunyan Liu --- src/libxl/libxl_driver.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/libxl

[libvirt] [PATCH V4 1/6] libxlDomainAttachNetDevice: release actual deivce and remove hostdev when fail

2016-03-21 Thread Chunyan Liu
When AttachNetDevice failed, should call networkReleaseActualDevice to release actual device, and if actual device is hostdev, should remove the hostdev from vm->def->hostdevs. Signed-off-by: Chunyan Liu --- src/libxl/libxl_driver.c | 18 +++--- 1 file changed, 11 insertions(+), 7 de

[libvirt] [PATCH V4 3/6] libxlDomainDetachDeviceLive: handle hostdev parent is network device

2016-03-21 Thread Chunyan Liu
When hostdev parent is network device, should call libxlDomainDetachNetDevice to detach the device from a higher level. Signed-off-by: Chunyan Liu --- src/libxl/libxl_driver.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/li