[libvirt] [Issue]: Regarding client socket getting closed from the server once the lxc container is started

2016-03-18 Thread rammohan madhusudan
Hi Folks, Using libvirt python bindings we are creating an lxc container.Here is the problem that we see sometimes (say 20 % of the time) when we create a new container. 1.container gets created, and also starts.However the we are not able to enter the namepace of the container.It throws an

[libvirt] [PATCH v3 2/2] qemu: migration: new migration param for persistent destination XML

2016-03-18 Thread Dmitry Andreev
Migration API allows to specify a destination domain configuration. Offline domain has only inactive XML and it is replaced by configuration specified using VIR_MIGRATE_PARAM_DEST_XML param. In case of live migration VIR_MIGRATE_PARAM_DEST_XML param is applied for active XML. This commit

Re: [libvirt] [PATCH 2/2] nodedev: Expose PCI header type

2016-03-18 Thread Daniel P. Berrange
On Wed, Mar 16, 2016 at 10:46:10AM +0100, Martin Kletzander wrote: > On Tue, Mar 15, 2016 at 04:37:55PM +, Daniel P. Berrange wrote: > >On Tue, Mar 15, 2016 at 05:23:30PM +0100, Martin Kletzander wrote: > >>If we expose this information, which is one byte in every PCI config > >>file, we let

Re: [libvirt] [PATCH v2 0/7] vz: add disk and controller check in domainPostParse phase

2016-03-18 Thread Maxim Nestratov
16.03.2016 19:21, Mikhail Feoktistov пишет: ACK to the series, but please fix [patch 4/7] Fixed and pushed. Thank you. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 5/5] tests: Add a new test for logging outputs parser

2016-03-18 Thread Ján Tomko
On Wed, Mar 16, 2016 at 12:05:37PM +0100, Erik Skultety wrote: > Now that the logging output parser has been refactored, add a test for its > functionality. It would be nice to add the test before the refactor, if possible. > --- > tests/virlogtest.c | 49

Re: [libvirt] [PATCH v2] migration: add option to set target ndb server port

2016-03-18 Thread Jiri Denemark
On Thu, Mar 17, 2016 at 16:23:25 +0300, Nikolay Shirokovskiy wrote: > > > On 17.03.2016 16:19, Jiri Denemark wrote: ... > > So after all your solution might probably be better, just reformat it a > > bit: > > > > if (nbdPort) > > port = nbdPort; > > else if

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

2016-03-18 Thread Pavel Hrdina
ACK series but see my comments for patch 2 and 5. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [RFC PATCH] hostdev: add support for "managed='detach'"

2016-03-18 Thread Gerd Hoffmann
Hi, > For ad-hoc usage such as with desktop virt, then I think users would > typically want to use have PCI devices re-assigned to host at shutdown > for the most part. Unfortunately that tends to not work very well for some kinds of devices. I have an explicit "managed=no" in my configs,

[libvirt] [PATCH v4 2/2] qemu: migration: new migration param for persistent destination XML

2016-03-18 Thread Dmitry Andreev
Migration API allows to specify a destination domain configuration. Offline domain has only inactive XML and it is replaced by configuration specified using VIR_MIGRATE_PARAM_DEST_XML param. In case of live migration VIR_MIGRATE_PARAM_DEST_XML param is applied for active XML. This commit

[libvirt] [PATCH 2/2] hostdev: Stop early if unmanaged devices have not been detached

2016-03-18 Thread Andrea Bolognani
Unmanaged devices, as the name suggests, are not detached automatically from the host by libvirt before being attached to a guest: it's the user's responsability to detach them manually beforehand. If that preliminary step has not been performed, the attach operation can't complete successfully.

Re: [libvirt] [PATCH 22/24] hostdev: Streamline device ownership tracking

2016-03-18 Thread Andrea Bolognani
On Wed, 2016-03-16 at 15:33 -0400, John Ferlan wrote: > While writing the tomb for patch 20, I had one question/issue... You > could have already addressed in your upcoming patches, but I'll ask > anyway before I see them > > Essentially combining step5/step6 will *steal* from the

Re: [libvirt] [libvirt-sandbox PATCH] Silence PyGIWarnings

2016-03-18 Thread Guido Günther
On Fri, Mar 18, 2016 at 05:40:50PM +, Daniel P. Berrange wrote: > On Fri, Mar 18, 2016 at 06:32:21PM +0100, Guido Günther wrote: > > This fixes > > > > /usr/bin/virt-sandbox-service:22: PyGIWarning: LibvirtGObject was imported > > without specifying a version first. Use > >

Re: [libvirt] [PATCH] rpc: wait longer for session daemon to start up

2016-03-18 Thread Martin Kletzander
On Wed, Mar 16, 2016 at 09:52:31AM +, Richard W.M. Jones wrote: On Tue, Mar 15, 2016 at 05:10:48PM -0400, Cole Robinson wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1271183 We only wait .5 seconds for the session daemon to start up and present its socket, which isn't sufficient for

Re: [libvirt] [PATCH 18/21] admin: Add virAdmConnectLookupServer

2016-03-18 Thread Erik Skultety
On 10/03/16 05:54, Martin Kletzander wrote: > It does not have a suffix ByName because there are no other means of > looking up the server and since the name is known, this should be the > preferred one. > > Signed-off-by: Martin Kletzander > --- > daemon/admin_server.c

Re: [libvirt] [PATCH v3 2/2] nodedev: Expose PCI header type

2016-03-18 Thread John Ferlan
On 03/18/2016 03:28 AM, Martin Kletzander wrote: > On Thu, Mar 17, 2016 at 12:30:48PM -0400, John Ferlan wrote: >> >> >> On 03/17/2016 12:18 PM, Martin Kletzander wrote: >>> If we expose this information, which is one byte in every PCI config >>> file, we let all mgmt apps know whether the

[libvirt] [PATCH] virlog: Fix build breaker with "comparison between signed and unsigned"

2016-03-18 Thread Erik Skultety
Refactor series 0b231195 worked with virLogDestination type which, depending on the compiler, might be (and probably will be) an unsigned data type. However, virEnumFromString may return -1 in case of an error. So, when enum happens to be unsigned, some compilers will naturally complain about foo:

[libvirt] [PATCH v3 0/2] migration: add option to set target ndb server port

2016-03-18 Thread Nikolay Shirokovskiy
Current libvirt + qemu pair lacks secure migrations in case of VMs with non-shared disks. The only option to migrate securely natively is to use tunneled mode and some kind of secure destination URI. But tunelled mode does not support non-shared disks. The other way to make migration secure is to

[libvirt] [PATCH v2 5/7] vz: report correct disk format in domainGetXMLDesc

2016-03-18 Thread Maxim Nestratov
From: Mikhail Feoktistov We should report correct disk format depending on vz version and domain type. Since we support only one disk format for each domain type, we can take it from vzCapabilities structure. --- src/vz/vz_sdk.c | 29 + 1

Re: [libvirt] [PATCH v2] migration: add option to set target ndb server port

2016-03-18 Thread Nikolay Shirokovskiy
On 17.03.2016 16:19, Jiri Denemark wrote: > On Thu, Mar 17, 2016 at 15:58:50 +0300, Nikolay Shirokovskiy wrote: >> >> >> On 16.03.2016 18:59, Jiri Denemark wrote: >>> On Tue, Feb 16, 2016 at 10:31:50 +0300, Nikolay Shirokovskiy wrote: Current libvirt + qemu pair lacks secure migrations in

[libvirt] [PATCH v2 1/2] qemu: Check for qxl's max_outputs parameter

2016-03-18 Thread Martin Kletzander
There is max_outputs parameter for both qxl and qxl-vga and there is no easy way of saying that we want the capability enabled only if both are supported. So let's have two of them and only use them together. Signed-off-by: Martin Kletzander ---

[libvirt] [PATCH 5/7] qemu: Split image access revoking from qemuDomainPrepareDiskChainElement

2016-03-18 Thread Peter Krempa
Introduce qemuDomainDiskChainElementRevoke that revokes the access rather than having a flag to do so. --- src/qemu/qemu_driver.c | 71 +++--- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [libvirt-sandbox PATCH] Silence PyGIWarnings

2016-03-18 Thread Guido Günther
This fixes /usr/bin/virt-sandbox-service:22: PyGIWarning: LibvirtGObject was imported without specifying a version first. Use gi.require_version('LibvirtGObject', '1.0') before import to ensure that the right version gets loaded. from gi.repository import LibvirtGObject

[libvirt] [PATCH 2/7] qemu: monitor: Drop qemuMonitorAttachDrive and leaves in call tree

2016-03-18 Thread Peter Krempa
After the refactor in the previous patch, the functions are no longer required. --- src/qemu/qemu_hotplug.c | 1 - src/qemu/qemu_monitor.c | 16 src/qemu/qemu_monitor.h | 6 --- src/qemu/qemu_monitor_text.c | 98

Re: [libvirt] [PATCH 4/5] tests: Slightly tweak virlogtest

2016-03-18 Thread Ján Tomko
On Wed, Mar 16, 2016 at 12:05:36PM +0100, Erik Skultety wrote: > Add a generic DO_TEST_FULL macro, some PASS/FAIL macros to better visually > distinguish tests that should fail and tests that should pass > --- > tests/virlogtest.c | 35 --- > 1 file changed, 20

Re: [libvirt] [PATCH 1/5] virlog: Change virLogDestination to virLogDestinationType

2016-03-18 Thread Ján Tomko
On Wed, Mar 16, 2016 at 12:05:33PM +0100, Erik Skultety wrote: > This will later utilize our VIR_ENUM_{DECL,IMPL} macros, so stay consistent > with the rest of the library. We do not use *Type everywhere and I think it looks nicer without it. > Also, this includes adding an explicit sentinel >

Re: [libvirt] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2016-03-18 Thread Vasiliy Tolstov
2016-03-18 18:38 GMT+03:00 Vasiliy Tolstov : > f a user specify ehernet device create it via libvirt and run > script if it provided. After this commit user does not need to > run external script to create tap device or add root to qemu > process. > Also now libvirt can manage

Re: [libvirt] [PATCH] Don't warn about nonexisting connection drivers

2016-03-18 Thread Cole Robinson
On 03/17/2016 03:02 PM, Jovanka Gulicoska wrote: > --- > src/driver.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/driver.c b/src/driver.c > index 2985538..1514a3b 100644 > --- a/src/driver.c > +++ b/src/driver.c > @@ -62,7 +62,7 @@ virDriverLoadModule(const char

[libvirt] [PATCH v4 1/2] qemuMigrationCookieAddPersistent: move it out and change argument type

2016-03-18 Thread Dmitry Andreev
This changes allow to use qemuMigrationCookieAddPersistent with an XML definition that isn't assigned to any domain. --- src/qemu/qemu_migration.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

Re: [libvirt] [PATCH v4 2/2] qemu: implement setting target disks migration port

2016-03-18 Thread Jiri Denemark
On Thu, Mar 17, 2016 at 17:58:48 +0300, Nikolay Shirokovskiy wrote: > Mostly it is just passing new parameter here and there. In case > of zero value we fallback to auto selecting port and thus keep > backward compatibility. > > Also we need to fix places of auto selected port managment. > We

[libvirt] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2016-03-18 Thread Vasiliy Tolstov
If a user specify ehernet device create it via libvirt and run script if it provided. After this commit user does not need to run external script to create tap device or add root to qemu process. Also now libvirt can manage ip address and routes for this device. Signed-off-by: Vasiliy Tolstov

Re: [libvirt] [PATCH v3 05/14] qemu: Add support for VIR_MIGRATE_POSTCOPY flag

2016-03-18 Thread Pavel Hrdina
On Wed, Mar 02, 2016 at 12:42:26PM +0100, Jiri Denemark wrote: > From: Cristian Klein > > Signed-off-by: Cristian Klein > Signed-off-by: Jiri Denemark > --- [...] > +static int > +qemuMigrationSetPostCopy(virQEMUDriverPtr

[libvirt] [PATCH 0/3] virlog: Refactor logging filters parser

2016-03-18 Thread Erik Skultety
This series continues where series 0b231195 left and refactors logging filter parser. Series 0b231195 also introduced a small bug where if a specific testcase passes, but should fail, the original parser return value is returned instead of -1. That way, the virlogtest as a whole still appears as

Re: [libvirt] [PATCH v5 6/9] nss: Implement _nss_libvirt_gethostbyname3_r

2016-03-18 Thread Michal Privoznik
On 18.03.2016 15:10, Martin Kletzander wrote: > On Tue, Mar 15, 2016 at 06:05:53PM +0100, Michal Privoznik wrote: >> The implementation is pretty straightforward. Moreover, because >> of the nature of things, gethostbyname_r and gethostbyname2_r can >> be implemented at the same time too. >> >>

Re: [libvirt] [PATCH 0/2] small test additions

2016-03-18 Thread Jim Fehlig
On 03/17/2016 05:56 AM, Ján Tomko wrote: > On Mon, Mar 14, 2016 at 04:46:29PM -0600, Jim Fehlig wrote: >> Inspired by Jan's comment from another review >> >> https://www.redhat.com/archives/libvir-list/2016-March/msg00570.html >> >> Jim Fehlig (2): >> tests: add xlconfigdata to domainschematests

Re: [libvirt] [PATCH v5 0/9] NSS module for libvirt

2016-03-18 Thread Martin Kletzander
On Tue, Mar 15, 2016 at 06:05:47PM +0100, Michal Privoznik wrote: v5 of: https://www.redhat.com/archives/libvir-list/2016-February/msg00693.html diff to v4: - Dropped the virjson const correctness patch - Worked in Martin's review (small nits here and there) - Dropped libxml2 dependency

Re: [libvirt] hostdev: add support for "managed='detach'"

2016-03-18 Thread Martin Polednik
On 18/03/16 10:15 +, Daniel P. Berrange wrote: On Thu, Mar 17, 2016 at 05:37:28PM -0400, Laine Stump wrote: On 03/17/2016 02:32 PM, Daniel P. Berrange wrote: >On Thu, Mar 17, 2016 at 12:18:49PM -0600, Alex Williamson wrote: >>On Thu, 17 Mar 2016 17:59:53 + >>"Daniel P. Berrange"

Re: [libvirt] [PATCH v3 2/2] nodedev: Expose PCI header type

2016-03-18 Thread Daniel P. Berrange
On Thu, Mar 17, 2016 at 05:18:50PM +0100, Martin Kletzander wrote: > If we expose this information, which is one byte in every PCI config > file, we let all mgmt apps know whether the device itself is an endpoint > or not so it's easier for them to decide whether such device can be > passed

Re: [libvirt] [RFC PATCH] hostdev: add support for "managed='detach'"

2016-03-18 Thread Daniel P. Berrange
On Thu, Mar 17, 2016 at 11:52:14AM -0600, Alex Williamson wrote: > On Thu, 17 Mar 2016 17:32:08 + > "Daniel P. Berrange" wrote: > > > On Tue, Mar 15, 2016 at 02:21:35PM -0400, Laine Stump wrote: > > > On 03/15/2016 01:00 PM, Daniel P. Berrange wrote: > > > >On Mon, Mar

[libvirt] [PATCH] bhyve: caps: Log error message when CPU init fails

2016-03-18 Thread Cole Robinson
virBhyveCapsInitCPU will raise a libvirt error; even though we treat it as non-fatal we should log the actual message. --- src/bhyve/bhyve_capabilities.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c index

[libvirt] [PATCH v2 4/4] tests: hostdev: Add more tests

2016-03-18 Thread Andrea Bolognani
Ensure the code behaves properly even for situations that were not being considered before, such as simply detaching devices from the host without attaching them to a guest and attaching devices as managed even though they had already been manually detached from the host. ---

[libvirt] [PATCH] bhyve: process: Log error message when kill fails

2016-03-18 Thread Cole Robinson
virProcessKillPainfully will raise a libvirt error, so log it. We can drop the manual pid logging since ProcessKill always reports the pid in its error message. --- src/bhyve/bhyve_process.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/bhyve/bhyve_process.c

Re: [libvirt] [PATCH v2 2/3] qemu: Omit SPICE address if no port is specified

2016-03-18 Thread Ján Tomko
On Wed, Mar 16, 2016 at 05:45:04PM +0100, Christophe Fergeau wrote: > Currently -spice addr=127.0.0.1 is generated, but spice-server is going > to ignore this as no port is specified. > --- > src/qemu/qemu_command.c| 60 > +++--- >

[libvirt] [PATCH v2 1/4] hostdev: Streamline device ownership tracking

2016-03-18 Thread Andrea Bolognani
After this patch, ownership of virPCIDevice instances is very easy to keep track of: for each host PCI device, the only instance that actually matters is the one inside one of the bookkeeping list. Whenever some operation needs to be performed on a PCI device, the actual device is looked up

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

2016-03-18 Thread Eric Blake
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 perform the necessary lookups and > decide whether to

[libvirt] [ 3/3] assign peer address if it provided in network

2016-03-18 Thread Vasiliy Tolstov
Assign peer address if it provided Signed-off-by: Vasiliy Tolstov --- include/libvirt/libvirt-domain.h | 1 + src/conf/domain_conf.c | 14 - src/conf/domain_conf.h | 1 + src/conf/network_conf.c | 26 +++-

[libvirt] [ 2/3] allow to specify peer to ip element in domain network

2016-03-18 Thread Vasiliy Tolstov
this allows user to specify destination address for ip like tunnel Signed-off-by: Vasiliy Tolstov --- docs/schemas/interface.rng | 6 ++ 1 file changed, 6 insertions(+) diff --git a/docs/schemas/interface.rng b/docs/schemas/interface.rng index

[libvirt] [ 0/3] more useful network ethernet type devices

2016-03-18 Thread Vasiliy Tolstov
By default libvirt does not manages ethernet devices, bypass all control to qemu. This series enable creating tap devices via libvirt, assign mac, ip address and routes. Also when use specif linkstate down in xml, phisicaly down tap device. This is very useful in case of using bird, quagga or

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

2016-03-18 Thread Christophe Fergeau
On Fri, Mar 18, 2016 at 10:25:58AM +0100, Ján Tomko wrote: > > -if (graphics->data.spice.playback) > > -virBufferAsprintf(, ",playback-compression=%s", > > +} > > +if (graphics->data.spice.playback) { > > +virBufferAsprintf(, "playback-compression=%s,", > >

[libvirt] [PATCH 0/2] Some libvirt_nss cleanups

2016-03-18 Thread Martin Kletzander
*** SOME PSEUDO-RANDOM BLURB *** Martin Kletzander (2): util: Add virSocketAddrSetIPv[46]AddrNetOrder and use it nss: Make aligning look nicer src/libvirt_private.syms | 2 ++ src/nwfilter/nwfilter_dhcpsnoop.c | 4 +-- src/util/virsocketaddr.c | 45

[libvirt] [ 1/3] autocreate tap device for ethernet network type

2016-03-18 Thread Vasiliy Tolstov
If a user specify network type ethernet, then create it via libvirt and run script if it provided. After this commit user does not need to run external script to create tap device or add root permissions to qemu process. Signed-off-by: Vasiliy Tolstov ---

Re: [libvirt] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2016-03-18 Thread Vasiliy Tolstov
2016-03-18 18:50 GMT+03:00 Daniel P. Berrange : > I'm a little puzzelled why you're adding this 'peer' address in here > and throughout the code. This patch is supposedly just moving the > existing QEMU logic out into the libvirt layer, so AFAICT, this should > not require any

Re: [libvirt] [PATCH 06/10] secret: Introduce virSecretObjListNumOfSecrets

2016-03-18 Thread Eric Blake
On 03/02/2016 11:55 AM, John Ferlan wrote: > Add function to count the hashed secret obj list with filters. This > will replace the guts of secret_driver's secretConnectNumOfSecrets. > > Signed-off-by: John Ferlan > --- > src/conf/secret_conf.c | 44