Re: [libvirt] How libvirt address qemu command line args

2016-10-18 Thread Michal Privoznik
On 18.10.2016 14:59, zhun...@gmail.com wrote: > Now I want to add some args about TPM to domain's XML,so I can start a > domain by virt-manager or other virsh command,and then ,I would like to use > sVIrt security context to label vTPM and correspondingVM,But I do not know > how to get these

Re: [libvirt] [RFC] make virDomainQemuMonitorCommand work in any libvirt state

2016-10-18 Thread Michal Privoznik
On 17.10.2016 20:46, Nikolay Shirokovskiy wrote: > Hi, all. > > We would like to use virDomainQemuMonitorCommand to query qemu independently > of > libvirt state. Currenly it is not possible. This API call takes job condition > just like any other call and thus is unavailable on any lengthy(or

Re: [libvirt] Qemu: create empty cdrom

2016-10-18 Thread Michal Privoznik
On 14.10.2016 22:16, Stefan Hajnoczi wrote: > On Fri, Feb 5, 2016 at 2:56 PM, Gromak Yuriy wrote: >> Qemu is latest from master branch. >> Tryingto start a domain, which is connected toa blankcdrom: >> >> >> >> >> >> >>

Re: [libvirt] [PATCH 1/2] util: Add function to check if string contains some chars

2016-10-18 Thread Michal Privoznik
On 19.10.2016 03:55, Sławek Kapłoński wrote: > Tue, 18 Oct 2016, Michal Privoznik wrote: >> > On 14.10.2016 04:53, Sławek Kapłoński wrote: >>> > > This new function can be used to check if e.g. name of XML node >>> > > don't contains forbidden chars like "/" or new-line. >>> > > --- >>> > >

Re: [libvirt] qemu-guest-agent windows

2016-10-18 Thread Michael Roth
Quoting Michal Privoznik (2016-08-29 04:54:13) > On 29.08.2016 11:48, Umar Draz wrote: > > Hi Michal, > > > > well after the upgrade I am still getting the old version > > > >

Re: [libvirt] [PATCH 1/1] qemu: host NUMA hugepage policy without guest NUMA

2016-10-18 Thread Martin Kletzander
On Mon, Oct 17, 2016 at 03:45:09PM +1100, Sam Bobroff wrote: On Fri, Oct 14, 2016 at 10:19:42AM +0200, Martin Kletzander wrote: On Fri, Oct 14, 2016 at 11:52:22AM +1100, Sam Bobroff wrote: >I did look at the libnuma and cgroups approaches, but I was concerned they >wouldn't work in this case,

Re: [libvirt] [PATCH 1/2] util: Add function to check if string contains some chars

2016-10-18 Thread Sławek Kapłoński
Hello, Thx for review. Please read my answear inline. -- Best regards / Pozdrawiam Sławek Kapłoński sla...@kaplonski.pl On Tue, 18 Oct 2016, Michal Privoznik wrote: > On 14.10.2016 04:53, Sławek Kapłoński wrote: > > This new function can be used to check if e.g. name of XML node > > don't

Re: [libvirt] [PATCH v2 0/3] fix hot(un)plug of chardev devices with TLS encryption

2016-10-18 Thread John Ferlan
On 10/18/2016 11:04 AM, Pavel Hrdina wrote: > Pavel Hrdina (3): > qemu_alias: introduce qemuAliasChardevFromDevAlias helper > qemu_command: create prefixed alias to separate variable > qemu: always generate the same alias for tls-creds-x509 object > > src/qemu/qemu_alias.c

[libvirt] [PATCH v2] vsh: Using VSH_REQUIRE_OPTION rather than virReportError

2016-10-18 Thread Kothapally Madhu Pavan
Correcting the error reporting method by using VSH_REQUIRE_OPTION instead of virReportError Signed-off-by: Kothapally Madhu Pavan --- tools/virsh-domain.c |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/virsh-domain.c

Re: [libvirt] [PATCH] vsh: Using vshError rather than virReportError

2016-10-18 Thread Madhu Pavan
On 10/18/2016 07:33 PM, Peter Krempa wrote: On Tue, Oct 18, 2016 at 07:39:16 -0400, Kothapally Madhu Pavan wrote: Correcting the error reporting method by using vshError instead of virReportError Signed-off-by: Kothapally Madhu Pavan --- tools/virsh-domain.c |

[libvirt] [PATCH] vz: set localhost as vnc address

2016-10-18 Thread Mikhail Feoktistov
We should set localhost as vnc address in case of empty string. Because Virtuozzo sets 0.0.0.0 as default vnc address. --- src/vz/vz_sdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index f2a5c96..7235172 100644 --- a/src/vz/vz_sdk.c +++

Re: [libvirt] [PATCH 2/2] qemu: always generate the same alias for tls-creds-x509 object

2016-10-18 Thread John Ferlan
On 10/18/2016 10:57 AM, Pavel Hrdina wrote: > On Tue, Oct 18, 2016 at 10:37:37AM -0400, John Ferlan wrote: >> >> >> On 10/18/2016 09:58 AM, Pavel Hrdina wrote: >>> There was inconsistency between alias used to create tls-creds-x509 >>> object and alias used to link that object to chardev while

[libvirt] [PATCH v2 2/3] qemu_command: create prefixed alias to separate variable

2016-10-18 Thread Pavel Hrdina
Instead of typing the prefix every time we want to append parameters to qemu command line use a variable that contains prefixed alias. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c | 35 --- 1 file changed, 20 insertions(+), 15

[libvirt] [PATCH v2 1/3] qemu_alias: introduce qemuAliasChardevFromDevAlias helper

2016-10-18 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_alias.c | 16 src/qemu/qemu_alias.h | 3 +++ src/qemu/qemu_command.c | 2 +- src/qemu/qemu_hotplug.c | 14 +++--- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_alias.c

[libvirt] [PATCH v2 3/3] qemu: always generate the same alias for tls-creds-x509 object

2016-10-18 Thread Pavel Hrdina
There was inconsistency between alias used to create tls-creds-x509 object and alias used to link that object to chardev while hotpluging. Hotplug ends with this error: error: Failed to detach device from channel-tcp.xml error: internal error: unable to execute QEMU command 'chardev-add':

[libvirt] [PATCH v2 0/3] fix hot(un)plug of chardev devices with TLS encryption

2016-10-18 Thread Pavel Hrdina
Pavel Hrdina (3): qemu_alias: introduce qemuAliasChardevFromDevAlias helper qemu_command: create prefixed alias to separate variable qemu: always generate the same alias for tls-creds-x509 object src/qemu/qemu_alias.c | 16 + src/qemu/qemu_alias.h

Re: [libvirt] [PATCH 2/2] qemu: always generate the same alias for tls-creds-x509 object

2016-10-18 Thread Pavel Hrdina
On Tue, Oct 18, 2016 at 10:37:37AM -0400, John Ferlan wrote: > > > On 10/18/2016 09:58 AM, Pavel Hrdina wrote: > > There was inconsistency between alias used to create tls-creds-x509 > > object and alias used to link that object to chardev while hotpluging. > > > > In XML we have for example

Re: [libvirt] [PATCH v2 2/2] libssh_transport: add new libssh-based transport

2016-10-18 Thread Daniel P. Berrange
On Tue, Oct 18, 2016 at 04:46:53PM +0200, Pino Toscano wrote: > On Tuesday, 18 October 2016 14:19:41 CEST Daniel P. Berrange wrote: > > On Mon, Oct 17, 2016 at 04:24:53PM +0200, Pino Toscano wrote: > > > Implement a new libssh transport, which uses libssh to communicate with > > > remote hosts,

Re: [libvirt] [PATCH v4 09/25] [ACKED] qemu: use virDomainPCIAddressReserveNextAddr in qemuDomainAssignDevicePCISlots

2016-10-18 Thread Andrea Bolognani
On Fri, 2016-10-14 at 15:54 -0400, Laine Stump wrote: > instead of calling virDomainPCIAddressGetNextSlot() (which I want to > turn into a local static in domain_addr.c). > --- > > Change: fixed line length > > src/qemu/qemu_domain_address.c | 33 +++-- > 1 file

Re: [libvirt] [PATCH v2 2/2] libssh_transport: add new libssh-based transport

2016-10-18 Thread Pino Toscano
On Tuesday, 18 October 2016 14:19:41 CEST Daniel P. Berrange wrote: > On Mon, Oct 17, 2016 at 04:24:53PM +0200, Pino Toscano wrote: > > Implement a new libssh transport, which uses libssh to communicate with > > remote hosts, and use it in virNetSockets. > > > > This new transport supports all

Re: [libvirt] [PATCH v4 10/25] [ACKED] conf: make virDomainPCIAddressGetNextSlot() a local static function

2016-10-18 Thread Andrea Bolognani
On Fri, 2016-10-14 at 15:54 -0400, Laine Stump wrote: > This function is no longer needed outside of domain_addr.c. > --- >  src/conf/domain_addr.c   | 2 +- >  src/conf/domain_addr.h   | 5 - >  src/libvirt_private.syms | 1 - >  3 files changed, 1 insertion(+), 7 deletions(-) >  > diff --git

Re: [libvirt] [PATCH 2/2] qemu: always generate the same alias for tls-creds-x509 object

2016-10-18 Thread John Ferlan
On 10/18/2016 09:58 AM, Pavel Hrdina wrote: > There was inconsistency between alias used to create tls-creds-x509 > object and alias used to link that object to chardev while hotpluging. > > In XML we have for example alias "serial0", but on qemu command line we > generate "charserial0". > >

Re: [libvirt] [PATCH v2 2/2] libssh_transport: add new libssh-based transport

2016-10-18 Thread Pino Toscano
On Tuesday, 18 October 2016 15:15:07 CEST Peter Krempa wrote: > On Mon, Oct 17, 2016 at 16:24:53 +0200, Pino Toscano wrote: > > Implement a new libssh transport, which uses libssh to communicate with > > remote hosts, and use it in virNetSockets. > > > > This new transport supports all the common

Re: [libvirt] [PATCH 1/2] qemu_command: create prefixed alias to separate variable

2016-10-18 Thread Pavel Hrdina
On Tue, Oct 18, 2016 at 10:22:50AM -0400, John Ferlan wrote: > > > On 10/18/2016 09:58 AM, Pavel Hrdina wrote: > > Instead of typing the prefix every time we want to append parameters > > to qemu command line use a variable that contains prefixed alias. > > > > Signed-off-by: Pavel Hrdina

Re: [libvirt] [PATCH v4 08/25] conf: new function virDomainPCIAddressReserveNextAddr()

2016-10-18 Thread Andrea Bolognani
On Fri, 2016-10-14 at 15:54 -0400, Laine Stump wrote: > There is an existing virDomainPCIAddressReserveNextSlot() which will > reserve all functions of the next available PCI slot. One place in the > qemu PCI address assignment code requires reserving a *single* > function of the next available

Re: [libvirt] [PATCH 1/2] qemu_command: create prefixed alias to separate variable

2016-10-18 Thread John Ferlan
On 10/18/2016 09:58 AM, Pavel Hrdina wrote: > Instead of typing the prefix every time we want to append parameters > to qemu command line use a variable that contains prefixed alias. > > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_command.c | 35

[libvirt] [PATCH 0/2] fix hot(un)plug of chardev devices with TLS encryption

2016-10-18 Thread Pavel Hrdina
Pavel Hrdina (2): qemu_command: create prefixed alias to separate variable qemu: always generate the same alias for tls-creds-x509 object src/qemu/qemu_command.c| 39 -- src/qemu/qemu_hotplug.c| 9 +++--

[libvirt] How libvirt address qemu command line args

2016-10-18 Thread zhun...@gmail.com
Now I want to add some args about TPM to domain's XML,so I can start a domain by virt-manager or other virsh command,and then ,I would like to use sVIrt security context to label vTPM and correspondingVM,But I do not know how to get these XML args in libvirt. the key problem is that how can i

Re: [libvirt] [PATCH] vsh: Using vshError rather than virReportError

2016-10-18 Thread Peter Krempa
On Tue, Oct 18, 2016 at 07:39:16 -0400, Kothapally Madhu Pavan wrote: > Correcting the error reporting method by using vshError > instead of virReportError > > Signed-off-by: Kothapally Madhu Pavan > --- > tools/virsh-domain.c |6 +++--- > 1 file changed, 3

[libvirt] [PATCH 2/2] qemu: always generate the same alias for tls-creds-x509 object

2016-10-18 Thread Pavel Hrdina
There was inconsistency between alias used to create tls-creds-x509 object and alias used to link that object to chardev while hotpluging. In XML we have for example alias "serial0", but on qemu command line we generate "charserial0". The issue was that code, that creates QMP command to hotplug

[libvirt] [PATCH 1/2] qemu_command: create prefixed alias to separate variable

2016-10-18 Thread Pavel Hrdina
Instead of typing the prefix every time we want to append parameters to qemu command line use a variable that contains prefixed alias. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c | 35 --- 1 file changed, 20 insertions(+), 15

Re: [libvirt] [PATCH] cpu_conf: add comments about sockets in cpu_conf

2016-10-18 Thread Peter Krempa
On Tue, Oct 18, 2016 at 16:18:10 +0800, Chen Hanxiao wrote: > From: Chen Hanxiao > > 'sockets' in output of `virsh capabilities' means You are talking here about virsh capabilities, while the code is about the cpu definition in the domain configuration. > the sockets per

Re: [libvirt] [PATCH v4 07/25] [NEW] qemu: change first arg of qemuDomainAttachChrDeviceAssignAddr()

2016-10-18 Thread Andrea Bolognani
On Fri, 2016-10-14 at 15:54 -0400, Laine Stump wrote: > from virDomainDefPtr to virDomainObjPtr so that the function has > access to the other parts of the virDomainObjPtr. Take advantage of > this by removing the "priv" arg and retrieving it from the > virDomainObjPtr instead. > > No functional

Re: [libvirt] [PATCH v4 06/25] [NEW] qemu: make error message in qemuDomainPCIAddressSetCreate more clear.

2016-10-18 Thread Andrea Bolognani
On Fri, 2016-10-14 at 15:54 -0400, Laine Stump wrote: > This error should only ever be seen by a developer anyway, but the > existing message made even less sense that this new version. > --- > src/qemu/qemu_domain_address.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [libvirt] [PATCH v2 2/2] libssh_transport: add new libssh-based transport

2016-10-18 Thread Daniel P. Berrange
On Mon, Oct 17, 2016 at 04:24:53PM +0200, Pino Toscano wrote: > Implement a new libssh transport, which uses libssh to communicate with > remote hosts, and use it in virNetSockets. > > This new transport supports all the common ssh authentication methods, > making use of libvirt's auth callbacks

Re: [libvirt] [PATCH v4 05/25] [NEW] qemu: remove superfluous setting of addrs->nbuses

2016-10-18 Thread Andrea Bolognani
On Fri, 2016-10-14 at 15:54 -0400, Laine Stump wrote: > This is already set by virDomainPCIAddressSetAlloc(). > --- > src/qemu/qemu_domain_address.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c > index d2a3237..3926b18

Re: [libvirt] [PATCH v2 2/2] libssh_transport: add new libssh-based transport

2016-10-18 Thread Peter Krempa
On Mon, Oct 17, 2016 at 16:24:53 +0200, Pino Toscano wrote: > Implement a new libssh transport, which uses libssh to communicate with > remote hosts, and use it in virNetSockets. > > This new transport supports all the common ssh authentication methods, > making use of libvirt's auth callbacks

Re: [libvirt] [PATCH v4 04/25] [NEW] conf: add typedef for anonymous enum used for memballoon device model

2016-10-18 Thread Andrea Bolognani
On Fri, 2016-10-14 at 15:54 -0400, Laine Stump wrote: > For some reason the values of memballoon model are set using an > anonymous enum, making it impossible to perform nice tricks like > demanding there are cases for all possible values in a switch. This > patch turns the anonymous enum into

Re: [libvirt] [PATCH v9 1/5] domain: Add optional 'tls' attribute for TCP chardev

2016-10-18 Thread John Ferlan
On 10/18/2016 07:21 AM, Daniel P. Berrange wrote: > On Tue, Oct 18, 2016 at 06:59:57AM -0400, John Ferlan wrote: >> >> >> On 10/18/2016 02:27 AM, Pavel Hrdina wrote: >> [...] >> "As default behaviour I think it is desirable that we can turn TLS on for every VM at once - I tend to

Re: [libvirt] [PATCH v4 03/25] [NEW] qemu: replace "def->nets[i]" with "net" and "def->sounds[i]" with "sound"

2016-10-18 Thread Andrea Bolognani
On Fri, 2016-10-14 at 15:53 -0400, Laine Stump wrote: > More occurences of repeatedly dereferencing the same pointer stored in > an array are replaced with the definition of a temporary pointer that > is then used directly. No functional change. > --- >  src/qemu/qemu_domain_address.c | 41

[libvirt] [PATCH] vsh: Using vshError rather than virReportError

2016-10-18 Thread Kothapally Madhu Pavan
Correcting the error reporting method by using vshError instead of virReportError Signed-off-by: Kothapally Madhu Pavan --- tools/virsh-domain.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c

Re: [libvirt] [PATCH] qemu_hotplug: fix crash in hot(un)plugging chardev devices

2016-10-18 Thread Pavel Hrdina
On Tue, Oct 18, 2016 at 01:26:55PM +0200, Peter Krempa wrote: > On Tue, Oct 18, 2016 at 13:20:01 +0200, Pavel Hrdina wrote: > > We need to make sure that the chardev is serial and TCP. > > Note that it corrupts pointers in a different part of the union. > > > > > Signed-off-by: Pavel Hrdina

Re: [libvirt] [PATCH] qemu_hotplug: fix crash in hot(un)plugging chardev devices

2016-10-18 Thread John Ferlan
On 10/18/2016 07:20 AM, Pavel Hrdina wrote: > We need to make sure that the chardev is serial and TCP. > > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_hotplug.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > ACK - although you could put a few

Re: [libvirt] [PATCH] qemu_hotplug: fix crash in hot(un)plugging chardev devices

2016-10-18 Thread Peter Krempa
On Tue, Oct 18, 2016 at 13:20:01 +0200, Pavel Hrdina wrote: > We need to make sure that the chardev is serial and TCP. Note that it corrupts pointers in a different part of the union. > > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_hotplug.c | 8 ++-- > 1 file

Re: [libvirt] [PATCH v4 02/25] [ACKED but has additions] qemu: replace a lot of "def->controllers[i]" with equivalent "cont"

2016-10-18 Thread Andrea Bolognani
On Fri, 2016-10-14 at 15:53 -0400, Laine Stump wrote: > There's no functional change here. This pointer was just used so many > times that the extra long lines became annoying. > --- >  > Change: added more instances of the same change. >  >  src/qemu/qemu_domain_address.c | 208

Re: [libvirt] [PATCH v9 1/5] domain: Add optional 'tls' attribute for TCP chardev

2016-10-18 Thread Daniel P. Berrange
On Tue, Oct 18, 2016 at 06:59:57AM -0400, John Ferlan wrote: > > > On 10/18/2016 02:27 AM, Pavel Hrdina wrote: > [...] > > >> > >> "As default behaviour I think it is desirable that we can turn TLS on > >> for every VM at once - I tend to view it as a host network integration > >> task, rather

[libvirt] [PATCH] qemu_hotplug: fix crash in hot(un)plugging chardev devices

2016-10-18 Thread Pavel Hrdina
We need to make sure that the chardev is serial and TCP. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_hotplug.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 14af4e1..1003d50 100644 ---

Re: [libvirt] [PATCH v9 1/5] domain: Add optional 'tls' attribute for TCP chardev

2016-10-18 Thread Pavel Hrdina
On Tue, Oct 18, 2016 at 06:59:57AM -0400, John Ferlan wrote: > > > On 10/18/2016 02:27 AM, Pavel Hrdina wrote: > [...] > > >> > >> "As default behaviour I think it is desirable that we can turn TLS on > >> for every VM at once - I tend to view it as a host network integration > >> task, rather

Re: [libvirt] [PATCH v9 1/5] domain: Add optional 'tls' attribute for TCP chardev

2016-10-18 Thread John Ferlan
On 10/18/2016 02:27 AM, Pavel Hrdina wrote: [...] >> >> "As default behaviour I think it is desirable that we can turn TLS on >> for every VM at once - I tend to view it as a host network integration >> task, rather than a VM configuration task. Same rationale that we use >> for TLS wth

Re: [libvirt] [PATCH v4 01/25] qemu: new functions qemuDomainMachineHasPCI[e]Root()

2016-10-18 Thread Andrea Bolognani
On Fri, 2016-10-14 at 15:53 -0400, Laine Stump wrote: > These functions provide a simple one line method of learning if the > current domain has a pci-root or pcie-root bus. > --- > > Changes: "reversed polarity" of 2nd if clause as suggested by Andrea. > > src/qemu/qemu_domain.c | 30

[libvirt] [PATCH] cpu_conf: add comments about sockets in cpu_conf

2016-10-18 Thread Chen Hanxiao
From: Chen Hanxiao 'sockets' in output of `virsh capabilities' means the sockets per NUMA node, which is a special case. discuss in: https://www.redhat.com/archives/libvir-list/2012-March/msg01123.html Signed-off-by: Chen Hanxiao ---

Re: [libvirt] [PATCH 0/3] Misc adjustments from recent code review

2016-10-18 Thread Michal Privoznik
On 18.10.2016 03:48, John Ferlan wrote: > The following were all part of the review of the TCP chardev TLS series which > were outside the realm of the specific changes for the series... > > http://www.redhat.com/archives/libvir-list/2016-October/msg00742.html > > 1. Removal of cfg from

Re: [libvirt] [PATCH v9 1/5] domain: Add optional 'tls' attribute for TCP chardev

2016-10-18 Thread Pavel Hrdina
On Mon, Oct 17, 2016 at 11:24:58AM -0400, John Ferlan wrote: > > > On 10/17/2016 10:37 AM, Pavel Hrdina wrote: > > On Mon, Oct 17, 2016 at 09:54:46AM -0400, John Ferlan wrote: > >> > >> > >> On 10/17/2016 04:09 AM, Pavel Hrdina wrote: > >>> On Fri, Oct 14, 2016 at 04:23:04PM -0400, John Ferlan

Re: [libvirt] [PATCH 0/3] Misc adjustments from recent code review

2016-10-18 Thread Pavel Hrdina
On Mon, Oct 17, 2016 at 03:48:53PM -0400, John Ferlan wrote: > The following were all part of the review of the TCP chardev TLS series which > were outside the realm of the specific changes for the series... > > http://www.redhat.com/archives/libvir-list/2016-October/msg00742.html > > 1. Removal