Re: [libvirt] [PATCH] Let virt-manager 1.4.0+ work to access console of VM

2017-02-28 Thread Guido Günther
On Tue, Feb 28, 2017 at 01:48:31PM -0500, Bryan Quigley wrote: > Also see Ubuntu bug > https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1668681 > First reported > https://askubuntu.com/questions/833964/virt-manager-cant-connect-to-graphical-console/888220#888220 > > --- >

Re: [libvirt] A question for external snapshots with flag“VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE”

2017-02-28 Thread Martin Kletzander
On Tue, Feb 28, 2017 at 09:22:16AM -0600, Eric Blake wrote: please don't include libvir-list-owner in your mails. Also, it would be nice if you could convince your mailer to wrap long lines. Also sending the question multiple times from multiple e-mail addresses makes bad reputation and

Re: [libvirt] [PATCH 1/3] libxl: Implement virDomainObjCheckIsActive

2017-02-28 Thread Jim Fehlig
On 02/28/2017 11:32 AM, Jim Fehlig wrote: On 02/24/2017 01:03 AM, Sagar Ghuge wrote: Add function which raises error if domain is not active Signed-off-by: Sagar Ghuge --- src/conf/domain_conf.c | 15 +++ src/conf/domain_conf.h | 1 + 2 files changed, 16

[libvirt] ANNOUNCE: libguestfs 1.36 released

2017-02-28 Thread Richard W.M. Jones
I'm please to announce libguestfs 1.36, a library and a set of tools for accessing and modifying virtual machine disk images. This release represents about 7 months of work by many contributors. I'd like to call out in particular substantial code contributions from: Pino Toscano, Tomáš

Re: [libvirt] [PATCH 3/3] libxl: Change virDomainObjIsActive to virDomainObjCheckIsActive

2017-02-28 Thread Jim Fehlig
On 02/24/2017 01:03 AM, Sagar Ghuge wrote: Replace virDomainObjIsActive with virDomainObjCheckIsActive which raises error if domain is not active Signed-off-by: Sagar Ghuge --- ...libxl-Implement-virDomainObjCheckIsActive.patch | 55

Re: [libvirt] [PATCH] Let virt-manager 1.4.0+ work to access console of VM

2017-02-28 Thread Bryan Quigley
With Jamie Strandboge's help it should be restricted a bit more by adding addr=none: unix (send, receive) type=stream addr=none peer=(label=/usr/sbin/libvirtd), On Tue, Feb 28, 2017 at 1:48 PM, Bryan Quigley wrote: > Also see Ubuntu bug >

[libvirt] [PATCH] Let virt-manager 1.4.0+ work to access console of VM

2017-02-28 Thread Bryan Quigley
Also see Ubuntu bug https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1668681 First reported https://askubuntu.com/questions/833964/virt-manager-cant-connect-to-graphical-console/888220#888220 --- examples/apparmor/libvirt-qemu | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [libvirt] [PATCH 2/3] change virDomainObjIsActive with virDomainObjCheckIsActive

2017-02-28 Thread Jim Fehlig
On 02/24/2017 01:03 AM, Sagar Ghuge wrote: Signed-off-by: Sagar Ghuge --- src/test/test_driver.c | 35 +++ 1 file changed, 7 insertions(+), 28 deletions(-) The commit summary here should be prefixed with 'test'. E.g. test: Use

Re: [libvirt] [PATCH 1/3] libxl: Implement virDomainObjCheckIsActive

2017-02-28 Thread Jim Fehlig
On 02/24/2017 01:03 AM, Sagar Ghuge wrote: Add function which raises error if domain is not active Signed-off-by: Sagar Ghuge --- src/conf/domain_conf.c | 15 +++ src/conf/domain_conf.h | 1 + 2 files changed, 16 insertions(+) This patch doesn't touch any

Re: [libvirt] [PATCH] qemuDomainAttachNetDevice: Support attach of type="user"

2017-02-28 Thread Daniel P. Berrange
On Tue, Feb 28, 2017 at 05:52:15PM +0100, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1420668 > > This has worked in previous releases. > My commit c266b60440 broke it. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_hotplug.c | 3 +++ >

[libvirt] [PATCH] qemuDomainAttachNetDevice: Support attach of type="user"

2017-02-28 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1420668 This has worked in previous releases. My commit c266b60440 broke it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_hotplug.c

Re: [libvirt] [PATCH RFC 1/9] conf: Modify gendispatch.pl to make ACL argument opaque

2017-02-28 Thread John Ferlan
On 02/28/2017 10:34 AM, Daniel P. Berrange wrote: > On Sat, Feb 11, 2017 at 11:29:37AM -0500, John Ferlan wrote: >> The various drivers each have vir*EnsureACL and vir*CheckACL API's >> which are generated on the fly by gendispatch to include the driver >> typed "def" name as the last argument

Re: [libvirt] [PATCH RFC 2/9] conf: Introduce virPoolObj and virPoolTableObj and PoolObj API's

2017-02-28 Thread Daniel P. Berrange
On Tue, Feb 28, 2017 at 04:52:31PM +0100, Pavel Hrdina wrote: > On Tue, Feb 28, 2017 at 04:15:42PM +0100, Michal Privoznik wrote: > > On 02/11/2017 05:29 PM, John Ferlan wrote: > > > +struct _virPoolDef { > > > +char *uuid; > > > +char *name; > > > +}; > > > + > > > +struct _virPoolObj { >

Re: [libvirt] [PATCH RFC 3/9] nodedev: Convert virNodeDevObj[List] to use virPoolObj[Table]

2017-02-28 Thread John Ferlan
On 02/28/2017 10:15 AM, Michal Privoznik wrote: > On 02/11/2017 05:29 PM, John Ferlan wrote: >> Use the virPoolObj[Table] object management model in order to manage the >> Node Device objects. >> >> While making the adjustments to use the new model, there are some code >> formatting adjustments

Re: [libvirt] [PATCH RFC 2/9] conf: Introduce virPoolObj and virPoolTableObj and PoolObj API's

2017-02-28 Thread John Ferlan
On 02/28/2017 10:15 AM, Michal Privoznik wrote: > On 02/11/2017 05:29 PM, John Ferlan wrote: >> Introduce a new generic virPoolObj[Ptr] and virPoolObjTable[Ptr] in order >> to generically manage driver lists of objects rather than the current >> hodgepodge of some drivers using a forward linked

[libvirt] [RFC PATCH 08/12] conf: Add 'spapr-pci-host-bridge' controller model

2017-02-28 Thread Andrea Bolognani
Adding it to the virDomainControllerPCIModelName enumeration is enough for existing code to handle it, so parsing and formatting will work without further tweaking. --- src/conf/domain_conf.c | 4 +++- src/conf/domain_conf.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git

[libvirt] [RFC PATCH 07/12] conf: Parse and format

2017-02-28 Thread Andrea Bolognani
--- src/conf/domain_conf.c | 24 src/conf/domain_conf.h | 1 + 2 files changed, 25 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index fb33e9c..93e706c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1774,6 +1774,7 @@

[libvirt] [RFC PATCH 09/12] qemu: Automatically pick index and model for pci-root controllers

2017-02-28 Thread Andrea Bolognani
pSeries guests will soon need the new information; luckily, we can figure it out automatically most of the time, so users won't have to bother with it. --- src/qemu/qemu_domain_address.c | 47 -- .../qemuargv2xmldata/qemuargv2xml-pseries-disk.xml | 5 ++-

[libvirt] [RFC PATCH 11/12] qemu: Use multiple PHBs for pSeries guests

2017-02-28 Thread Andrea Bolognani
Additional PHBs (pci-root controllers) will be created for the guest using the spapr-pci-host-bridge QEMU device, if available; the implicit default PHB, while present in the guest configuration, will be skipped. --- src/qemu/qemu_command.c | 47 --- 1

[libvirt] [RFC PATCH 05/12] schema: Allow

2017-02-28 Thread Andrea Bolognani
--- docs/schemas/domaincommon.rng | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index c64544a..f2f5c3a 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1931,6 +1931,11 @@

[libvirt] [RFC PATCH 06/12] schema: Add 'spapr-pci-host-bridge' controller model

2017-02-28 Thread Andrea Bolognani
--- docs/schemas/domaincommon.rng | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index f2f5c3a..38b4b80 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1889,6 +1889,8 @@

[libvirt] [RFC PATCH 12/12] tests: Add tests for pSeries guests with multiple PHBs

2017-02-28 Thread Andrea Bolognani
--- .../qemuxml2argv-pseries-phb-simple.args | 26 + .../qemuxml2argv-pseries-phb-simple.xml| 20 ++ tests/qemuxml2argvtest.c | 5 +++ .../qemuxml2xmlout-pseries-phb-simple.xml | 43 ++

[libvirt] [RFC PATCH 10/12] qemu: Introduce QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE

2017-02-28 Thread Andrea Bolognani
This new capability can be used to detect whether a QEMU binary supports the spapr-pci-host-bridge controller. --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 1 + 3 files

[libvirt] [RFC PATCH 04/12] qemu: Relax pci-root index requirement for pSeries guests

2017-02-28 Thread Andrea Bolognani
pSeries guests will soon be allowed to have multiple PHBs (pci-root controllers), meaning the current check on the controller index no longer applies to them. --- src/qemu/qemu_domain.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c

[libvirt] [RFC PATCH 03/12] conf: Move index number checking to drivers

2017-02-28 Thread Andrea Bolognani
pSeries guests will soon be allowed to have multiple PHBs (pci-root controllers), which of course means that all but one of them will have a non-zero index; hence, we'll need to relax the current check. However, right now the check is performed in the conf module, which is generic rather than

[libvirt] [RFC PATCH 02/12] qemu: Tweak index number checking

2017-02-28 Thread Andrea Bolognani
Moving the check and rewriting it this way doesn't alter the current behavior, but will allow us to special-case pci-root down the line. --- src/qemu/qemu_command.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [RFC PATCH 00/12] Support multiple PHBs on pSeries guests

2017-02-28 Thread Andrea Bolognani
Note: if you want to try this out, you'll need to make sure your QEMU binary includes this commit[1]; moreover, that commit is missing a way for libvirt to detect whether the new naming scheme is in place, so this will have to remain an RFC until the QEMU side has

[libvirt] [RFC PATCH 01/12] qemu: Allow qemuBuildControllerDevStr() to return NULL

2017-02-28 Thread Andrea Bolognani
We will soon need to be able to return a NULL pointer without the caller considering that an error: to make it possible, change the return type to int and use an out parameter for the string instead. Add some documentation for the function as well. --- src/qemu/qemu_command.c | 53

Re: [libvirt] [PATCH v2 00/14] Add TLS support for migration

2017-02-28 Thread John Ferlan
On 02/28/2017 08:48 AM, Jiri Denemark wrote: > On Thu, Feb 23, 2017 at 13:42:02 -0500, John Ferlan wrote: >> AFAIU - removal of the objects would remove the migration tls-creds, >> tls-hostname settings. > > This would be a very strange behavior. > >> I left the cfg->migrateTLS in for now -

Re: [libvirt] [PATCH RFC 2/9] conf: Introduce virPoolObj and virPoolTableObj and PoolObj API's

2017-02-28 Thread Pavel Hrdina
On Tue, Feb 28, 2017 at 04:15:42PM +0100, Michal Privoznik wrote: > On 02/11/2017 05:29 PM, John Ferlan wrote: > > Introduce a new generic virPoolObj[Ptr] and virPoolObjTable[Ptr] in order > > to generically manage driver lists of objects rather than the current > > hodgepodge of some drivers

Re: [libvirt] [PATCH RFC 1/9] conf: Modify gendispatch.pl to make ACL argument opaque

2017-02-28 Thread Daniel P. Berrange
On Sat, Feb 11, 2017 at 11:29:37AM -0500, John Ferlan wrote: > The various drivers each have vir*EnsureACL and vir*CheckACL API's > which are generated on the fly by gendispatch to include the driver > typed "def" name as the last argument based on the API being checked > and the driver name (e.g.

Re: [libvirt] [PATCH RFC 0/9] Introduce virPoolObj[Table]Ptr data/API's

2017-02-28 Thread Michal Privoznik
On 02/11/2017 05:29 PM, John Ferlan wrote: > Based of current top of git commit id '5620c6095'... I imagine things > will change while this is on-list, so if there is the desire to create > your own branch that's your starting point! Yeah, they had changed. Sorry for ignoring this for a long

Re: [libvirt] A question for external snapshots with flag“VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE”

2017-02-28 Thread Eric Blake
please don't include libvir-list-owner in your mails. Also, it would be nice if you could convince your mailer to wrap long lines. On 02/28/2017 06:37 AM, lizhengui wrote: > Hello, I got a question here. When we create consistent active external snapshots with flag

Re: [libvirt] [PATCH RFC 2/9] conf: Introduce virPoolObj and virPoolTableObj and PoolObj API's

2017-02-28 Thread Michal Privoznik
On 02/11/2017 05:29 PM, John Ferlan wrote: > Introduce a new generic virPoolObj[Ptr] and virPoolObjTable[Ptr] in order > to generically manage driver lists of objects rather than the current > hodgepodge of some drivers using a forward linked list and other drivers > using a single UUID only based

[libvirt] A question for external snapshots with flag“VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE”

2017-02-28 Thread lizhengui
Hello, I got a question here. When we create consistent active external snapshots with flag “VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE” , the qemuDomainSnapshotFSFreeze will be called firstly to freeze all filesystems in vm, and then create snapshots. For windows vm, freezing filesystems used by vss

Re: [libvirt] [PATCH RFC 3/9] nodedev: Convert virNodeDevObj[List] to use virPoolObj[Table]

2017-02-28 Thread Michal Privoznik
On 02/11/2017 05:29 PM, John Ferlan wrote: > Use the virPoolObj[Table] object management model in order to manage the > Node Device objects. > > While making the adjustments to use the new model, there are some code > formatting adjustments that were also made with the goal to follow more >

Re: [libvirt] [PATCH RFC 1/9] conf: Modify gendispatch.pl to make ACL argument opaque

2017-02-28 Thread Michal Privoznik
On 02/11/2017 05:29 PM, John Ferlan wrote: > The various drivers each have vir*EnsureACL and vir*CheckACL API's > which are generated on the fly by gendispatch to include the driver > typed "def" name as the last argument based on the API being checked > and the driver name (e.g. Node, Interface,

Re: [libvirt] A question for external snapshots with flag“VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE”

2017-02-28 Thread Martin Kletzander
On Sat, Feb 25, 2017 at 09:41:40AM +0800, WangJie (Captain) wrote: Hello, I got a question here. When we create consistent active external snapshots with flag “VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE” , the qemuDomainSnapshotFSFreeze will be called firstly to freeze all filesystems in vm, and then

Re: [libvirt] [PATCH] testNodeDeviceMockCreateVport: Don't call public APIs

2017-02-28 Thread John Ferlan
On 02/28/2017 07:12 AM, Michal Privoznik wrote: > This function is calling public APIs (virNodeDeviceLookupByName > etc.). That requires the driver lock to be unlocked and locked > again. If we, however, replace the public APIs calls with the > internal calls (that public APIs call anyway), we

Re: [libvirt] [PATCH v2 00/14] Add TLS support for migration

2017-02-28 Thread Daniel P. Berrange
On Tue, Feb 28, 2017 at 02:48:19PM +0100, Jiri Denemark wrote: > On Thu, Feb 23, 2017 at 13:42:02 -0500, John Ferlan wrote: > > AFAIU - removal of the objects would remove the migration tls-creds, > > tls-hostname settings. > > This would be a very strange behavior. > > > I left the

Re: [libvirt] [PATCH v2 00/14] Add TLS support for migration

2017-02-28 Thread Jiri Denemark
On Thu, Feb 23, 2017 at 13:42:02 -0500, John Ferlan wrote: > AFAIU - removal of the objects would remove the migration tls-creds, > tls-hostname settings. This would be a very strange behavior. > I left the cfg->migrateTLS in for now - it's very simple to remove, but > there would still need to

Re: [libvirt] [RFC PATCH v2 REBASE 12/18] hostdev: Introduce a reattach method for mediated devices

2017-02-28 Thread Pavel Hrdina
On Mon, Feb 20, 2017 at 03:28:25PM +0100, Erik Skultety wrote: > The name "reattach" does not really reflect the truth behind mediated > devices, since these are purely software devices that do not need to be > plugged back into the host in any way, however this patch pushes for > naming

Re: [libvirt] [RFC PATCH v2 REBASE 07/18] security: dac: Enable labeling of vfio mediated devices

2017-02-28 Thread Pavel Hrdina
On Mon, Feb 20, 2017 at 03:28:20PM +0100, Erik Skultety wrote: > Label the VFIO IOMMU devices under /dev/vfio/ referenced by the symlinks > in the sysfs (e.g. /sys/class/mdev_bus//iommu_group) which what > qemu actually gets formatted on the command line. > > Signed-off-by: Erik Skultety

Re: [libvirt] [RFC PATCH v2 REBASE 10/18] qemu: Assign PCI addresses for mediated devices as well

2017-02-28 Thread Pavel Hrdina
On Mon, Feb 20, 2017 at 03:28:23PM +0100, Erik Skultety wrote: > So far, the official support is for x86_64 arch guests so unless a > different device API than vfio-pci is available let's only turn on > support for PCI address assignment. Once a different device API is > introduced, we can enable

[libvirt] [PATCH] testNodeDeviceMockCreateVport: Don't call public APIs

2017-02-28 Thread Michal Privoznik
This function is calling public APIs (virNodeDeviceLookupByName etc.). That requires the driver lock to be unlocked and locked again. If we, however, replace the public APIs calls with the internal calls (that public APIs call anyway), we can drop the lock/unlock exercise. Signed-off-by: Michal

[libvirt] [GSoC] Libvirt accepted as GSoC 2017 mentor organization

2017-02-28 Thread Michal Privoznik
Dear all, yesterday I received great news: Libvirt has been accepted as a mentor organization for this year's Google Summer of Code [1]. That means we will have some students working on our project during the summer. Yay! If you are a student and want to participate then the best time to read

Re: [libvirt] [PATCH 1/4] Unify checking for machine1 systemd service

2017-02-28 Thread Marc Hartmayer
On Thu, Feb 23, 2017 at 12:53 PM +0100, Ján Tomko wrote: > Both virSystemdTerminateMachine and virSystemdCreateMachine > propagate the error to tell between a non-systemd system > and a hard error. > > In virSystemdGetMachineNameByPID both are treated the same, > but an error

Re: [libvirt] [PATCH 2/8] tests: Add createVHBAByStoragePool-by-parent to fchosttest

2017-02-28 Thread John Ferlan
>> >> FWIW: The lock gets easier with RFC series and of course that's in the >> back of my mind every time I touch this code... All the fun I'll have >> merging changes... >> > > Ah, which patches are that? I want to review them. > > Michal > I need to post an update since nodedev and

Re: [libvirt] [PATCH go v2] domain.go: wrong calculation of bitmask in PinVcpuFlags()

2017-02-28 Thread Daniel P. Berrange
On Mon, Feb 27, 2017 at 07:23:12PM -0500, Leonid Podolny wrote: > --- > domain.go | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/domain.go b/domain.go > index 2bd9852..7276ef8 100644 > --- a/domain.go > +++ b/domain.go > @@ -1768,7 +1768,7 @@ func (d *Domain)

Re: [libvirt] [RFC PATCH v2 REBASE 11/18] hostdev: Maintain a driver list of active mediated devices

2017-02-28 Thread Pavel Hrdina
On Mon, Feb 20, 2017 at 03:28:24PM +0100, Erik Skultety wrote: > Keep track of the assigned mediated devices the same way we do it for > the rest of hostdevs. > > Signed-off-by: Erik Skultety > --- > src/libvirt_private.syms | 1 + > src/qemu/qemu_hostdev.c | 22 ++

Re: [libvirt] [RFC PATCH v2 REBASE 02/18] conf: Introduce new hostdev device type mdev

2017-02-28 Thread Pavel Hrdina
On Mon, Feb 20, 2017 at 03:28:15PM +0100, Erik Skultety wrote: > A mediated device will be identified by a UUID of the user pre-created > mediated device. The data necessary to identify a mediated device can > be easily extended in the future, e.g. when auto-creation of mediated > devices should

Re: [libvirt] [RFC PATCH v2 REBASE 05/18] conf: Introduce virDomainHostdevDefPostParse

2017-02-28 Thread Pavel Hrdina
On Mon, Feb 20, 2017 at 03:28:18PM +0100, Erik Skultety wrote: > Just to make the code a bit cleaner, move hostdev specific post parse > code to its own function just in case it grows in the future. > > Signed-off-by: Erik Skultety > --- > src/conf/domain_conf.c | 76 >

Re: [libvirt] [RFC PATCH v2 REBASE 03/18] conf: Introduce new address type mdev

2017-02-28 Thread Pavel Hrdina
On Mon, Feb 20, 2017 at 03:28:16PM +0100, Erik Skultety wrote: > Since the address element is much easier extendible by attributes adding > more and more elements, starting with , to the element > once we find out we need more data to identify a mediated device. By > introducing a new address

Re: [libvirt] [RFC PATCH v2 REBASE 01/18] util: Introduce new module virmdev

2017-02-28 Thread Pavel Hrdina
On Mon, Feb 20, 2017 at 03:28:14PM +0100, Erik Skultety wrote: > Beside creation, disposal, getter, and setter methods the module exports > methods to work with lists of mediated devices. > > Signed-off-by: Erik Skultety > --- > po/POTFILES.in | 1 + >

Re: [libvirt] [PATCH 2/8] tests: Add createVHBAByStoragePool-by-parent to fchosttest

2017-02-28 Thread Michal Privoznik
On 02/27/2017 11:05 PM, John Ferlan wrote: > [...] > >>> Anyway, so as an adjustment at least here... I could move the hunk below >>> the pool->active = 1 and before the event. Then drop the lock entirely >>> before call the testCreateVport. Would also need to add a 'isLocked' so >>> that the