Re: [libvirt] [PATCH 3/9] util: storage: Store backing chain index in virStorageSource

2017-10-16 Thread Peter Krempa
On Fri, Oct 13, 2017 at 08:36:54 -0500, Eric Blake wrote: > On 10/13/2017 12:43 AM, Peter Krempa wrote: > > On Thu, Oct 12, 2017 at 14:57:36 -0500, Eric Blake wrote: > >> On 10/12/2017 02:07 PM, Peter Krempa wrote: [..] > >> When we were always regenerating the chain on the fly, there wasn't

[libvirt] [PATCH 1/2] tests: removing backend xml tag inside some test cases.

2017-10-16 Thread Julio Faracco
Some test cases have the backend tag inside wrong interfaces. The backend xml tag does not support . So this commit removes some tags inside those interfaces. Signed-off-by: Julio Faracco --- tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml | 2 --

[libvirt] [PATCH 2/2] conf: network user/direct/hostdev do not support backend tag.

2017-10-16 Thread Julio Faracco
The tag backend is not supported for user/direct/hostdev network when you try to define them inside the domain XML. So, other ways to include devices cannot be permitted too. But the attach-device command is wrongly adding unsupported features. This commit fixes this bug. After the patch: virsh

[libvirt] [PATCH 0/2] Removing backend support when net interface is user/direct/hostdev.

2017-10-16 Thread Julio Faracco
The xml tag is not supported for some interface types and the virsh command 'attach-device' permits to add settings to all of them. These commits avoid for user, direct and hostdev interface types. Julio Faracco (2): tests: removing backend xml tag inside some test cases. conf: network

Re: [libvirt] Exposing mem-path in domain XML

2017-10-16 Thread Zack Cornelius
- Original Message - > From: "Michal Privoznik" > To: "Zack Cornelius" > Cc: "libvir-list" > Sent: Friday, September 29, 2017 2:44:13 AM > Subject: Re: [libvirt] Exposing mem-path in domain XML > For this

[libvirt] [PATCH] qemu: Move qemuFreeKeywords into qemu_parse_command.c

2017-10-16 Thread Kothapally Madhu Pavan
Move qemuFreeKeywords into qemu_parse_command.c as qemuKeywordsFree and call it rather than inline code in multiple places. Signed-off-by: Kothapally Madhu Pavan --- src/qemu/qemu_monitor_json.c | 15 ++--- src/qemu/qemu_parse_command.c | 52

[libvirt] [libvirt-jenkins-ci PATCH 2/5] ansible: Introduce the 'manage' tool

2017-10-16 Thread Andrea Bolognani
This script replaces the existing Makefile, and will be extended to provide more functionality in future commits. Signed-off-by: Andrea Bolognani --- ansible/Makefile | 9 - ansible/manage | 57 2 files

[libvirt] [libvirt-jenkins-ci PATCH 0/5] Add unattended guest installation support

2017-10-16 Thread Andrea Bolognani
I, for one, welcome our new robot overlords. Andrea Bolognani (5): ansible: Remove bootstrap phase ansible: Introduce the 'manage' tool ansible: Add unattended installation support ansible: Update documentation guests: Rename from 'ansible' ansible/Makefile

[libvirt] [libvirt-jenkins-ci PATCH 3/5] ansible: Add unattended installation support

2017-10-16 Thread Andrea Bolognani
The 'manage' tool can now be used to install most known guests without requiring user interaction. Signed-off-by: Andrea Bolognani --- ansible/group_vars/all/install.yml | 10 +++ ansible/host_vars/libvirt-centos-6/install.yml | 3 +

[libvirt] [libvirt-jenkins-ci PATCH 1/5] ansible: Remove bootstrap phase

2017-10-16 Thread Andrea Bolognani
Having to bootstrap the guest as a separate phase is annoying and can be avoided by assuming the root password is well-known. Signed-off-by: Andrea Bolognani --- ansible/Makefile| 5 + ansible/bootstrap.yml | 15 ---

[libvirt] [libvirt-jenkins-ci PATCH 5/5] guests: Rename from 'ansible'

2017-10-16 Thread Andrea Bolognani
There's more than just Ansible playbooks in that directory now, so a more generic name is more appropriate. Signed-off-by: Andrea Bolognani --- {ansible => guests}/.gitignore | 0 {ansible => guests}/README.markdown

[libvirt] [libvirt-jenkins-ci PATCH 4/5] ansible: Update documentation

2017-10-16 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- ansible/README.markdown | 74 +++-- 1 file changed, 47 insertions(+), 27 deletions(-) diff --git a/ansible/README.markdown b/ansible/README.markdown index 4d464e1..b867aee 100644 ---

Re: [libvirt] [PATCH 2/4] conf: Introduce virCPUDefFindFeature

2017-10-16 Thread Pavel Hrdina
On Wed, Oct 11, 2017 at 12:11:15PM +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/conf/cpu_conf.c | 40 +++- > src/conf/cpu_conf.h | 4 > src/libvirt_private.syms | 1 + > 3 files changed, 32

Re: [libvirt] [PATCH 1/4] qemu: Separate CPU updating code from qemuProcessReconnect

2017-10-16 Thread Pavel Hrdina
On Thu, Oct 12, 2017 at 09:18:36AM +0200, Jiri Denemark wrote: > On Wed, Oct 11, 2017 at 19:42:36 +0200, Marc Hartmayer wrote: > > On Wed, Oct 11, 2017 at 12:11 PM +0200, Jiri Denemark > > wrote: > > > The new function is called qemuProcessRefreshCPU. > > > > > >

Re: [libvirt] [PATCH] qemu: Check QEMU error on failed migration

2017-10-16 Thread Pavel Hrdina
On Thu, Oct 12, 2017 at 03:48:29PM +0200, Jiri Denemark wrote: > When migration fails, QEMU may provide a description of the error in > the reply to query-migrate QMP command. We can fetch this error and use > it instead of the generic "unexpectedly failed" message. > > Signed-off-by: Jiri

Re: [libvirt] [PATCH v3] qemu: argv: parse qemu commandline memory arguments

2017-10-16 Thread John Ferlan
On 10/09/2017 01:16 PM, Kothapally Madhu Pavan wrote: > Existing qemuParseCommandLineMem() will parse "-m 4G" format string. > This patch allows it to parse "-m size=8126464k,slots=32,maxmem=33554432k" > format along with existing format. And adds a testcase to validate the > changes. > >

Re: [libvirt] [PATCH v2 3/3] hyperv: Map Limit to max_memory and VirtualQuantity to cur_balloon

2017-10-16 Thread John Ferlan
On 10/06/2017 02:47 AM, Ladi Prosek wrote: > Hyper-V uses its own specific memory management so no mapping is going to > be perfect. However, it is more correct to map Limit to max_memory (it > really is the upper limit of what the VM may potentially use) and keep > cur_balloon equal to

Re: [libvirt] [PATCH v2 2/3] hyperv: Escape WQL queries

2017-10-16 Thread John Ferlan
On 10/06/2017 02:47 AM, Ladi Prosek wrote: > The code was vulnerable to SQL injection. Likely not a security issue due to > WMI SQL and other constraints but still lame. For example: > > virsh # dominfo \" > error: failed to get domain '"' > error: internal error: SOAP fault during

Re: [libvirt] [PATCH v2 1/3] hyperv: Fix hypervInitConnection error reporting

2017-10-16 Thread John Ferlan
On 10/06/2017 02:47 AM, Ladi Prosek wrote: > "%s is not a Hyper-V server" is not a correct generalization of all possible > error conditions of hypervEnumAndPull. For example: > > $ virsh --connect hyperv://localhost/?transport=http > Enter username for localhost [administrator]: > Enter

Re: [libvirt] [PATCH 1/3] daemon: finish threads on close

2017-10-16 Thread John Ferlan
On 09/27/2017 08:45 AM, Nikolay Shirokovskiy wrote: > Current daemon shutdown can cause crashes. The problem is that threads > serving client request are joined on daemon dispose after drivers already > cleaned up. But this threads typically uses drivers and thus crashes come. > We need to join

[libvirt] LSN-2017-0002 - TLS certificate verification disabled for clients

2017-10-16 Thread Daniel P. Berrange
Libvirt Security Notice: LSN-2017-0002 == Summary: TLS certificate verification disabled for clients Reported on: 20171005 Published on: 20171016 Fixed on: 20171016 Reported by: Daniel P. Berrange <berra...@redhat.

[libvirt] [PATCH] qemu: ensure TLS clients always verify the server certificate

2017-10-16 Thread Daniel P. Berrange
The default_tls_x509_verify (and related) parameters in qemu.conf control whether the QEMU TLS servers request & verify certificates from clients. This works as a simple access control system for servers by requiring the CA to issue certs to permitted clients. This use of client certificates is

[libvirt] [PATCH 10/14] lib: introduce virDomainSetLifecycleAction() API

2017-10-16 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- docs/formatdomain.html.in| 6 + include/libvirt/libvirt-domain.h | 28 src/conf/domain_conf.h | 19 -- src/driver-hypervisor.h | 7 + src/libvirt-domain.c | 56

[libvirt] [PATCH 13/14] qemu: send allowReboot in migration cookie

2017-10-16 Thread Pavel Hrdina
We need to send allowReboot in the migration cookie to ensure the same behavior of the virDomainSetLifecycleAction() API on the destination. Consider this scenario: 1. On the source the domain is started with: destroy restart destroy 2. User calls an API to set

[libvirt] [PATCH 09/14] qemu: pass priv data instead of qemuCaps and autoNodeset

2017-10-16 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5441f5e37f..db6cc55495 100644 --- a/src/qemu/qemu_command.c

[libvirt] [PATCH 11/14] virsh: introduce set-lifecycle-action command

2017-10-16 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- tools/virsh-domain.c | 102 +++ tools/virsh.pod | 7 2 files changed, 109 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index a50713d6e4..bdafdf6f5d 100644

[libvirt] [PATCH 12/14] qemu: move detection whether to use -no-reboot to qemu_domain

2017-10-16 Thread Pavel Hrdina
This will be used later on in implementation of new API virDomainSetLifecycleAction(). In order to use it, we need to store the value in status XML to not lose the information if libvirtd is restarted. If some guest was started by old libvirt where it was not possible to change the lifecycle

[libvirt] [PATCH 00/14] introduce virDomainSetLifecycleAction() API

2017-10-16 Thread Pavel Hrdina
Pavel Hrdina (14): conf: rename lifecycle enum values to correspond with typedef keyword conf: rename virDomainLifecycleAction enum functions conf: introduce virDomainLifecycle enum to list all lifecycle types conf: merge virDomainLifecycleCrashAction with virDomainLifecycleAction

[libvirt] [PATCH 02/14] conf: rename virDomainLifecycleAction enum functions

2017-10-16 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 10 +- src/conf/domain_conf.h | 2 +- src/libvirt_private.syms | 4 ++-- src/xenconfig/xen_common.c | 8 src/xenconfig/xen_sxpr.c | 8 5 files changed, 16 insertions(+), 16

[libvirt] [PATCH 14/14] qemu: implement virDomainSetLifecycleAction() API

2017-10-16 Thread Pavel Hrdina
There is one limitation for using this API, when the guest is started with all actions set to "destroy" we put "-no-reboot" on the QEMU command line. That cannot be changed while QEMU is running and the QEMU process is always terminated no matter what is configured for any action. Resolves:

[libvirt] [PATCH 03/14] conf: introduce virDomainLifecycle enum to list all lifecycle types

2017-10-16 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 5 + src/conf/domain_conf.h | 9 + 2 files changed, 14 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 39a4c4d80f..e9d7f8911e 100644 --- a/src/conf/domain_conf.c +++

[libvirt] [PATCH 08/14] qemu: pass priv data to qemuBuildMasterKeyCommandLine

2017-10-16 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index da59a1fd63..5441f5e37f 100644 --- a/src/qemu/qemu_command.c +++

[libvirt] [PATCH 07/14] qemu: pass priv data to qemuBuildPMCommandLine

2017-10-16 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index fa70d15c43..da59a1fd63 100644 --- a/src/qemu/qemu_command.c +++

[libvirt] [PATCH 05/14] qemu: pass virDomainObjPtr to qemuBuildCommandLine

2017-10-16 Thread Pavel Hrdina
Extract the required data inside a function instead of passing it all as arguments. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c | 18 ++ src/qemu/qemu_command.h | 11 ++- src/qemu/qemu_process.c | 19 --- 3 files changed,

[libvirt] [PATCH 04/14] conf: merge virDomainLifecycleCrashAction with virDomainLifecycleAction

2017-10-16 Thread Pavel Hrdina
There is no need to have two different enums where one has the same values as the other one with some additions. Currently for on_poweroff and on_reboot we allow only subset of actions that are allowed for on_crash. This was covered in parse time using two different enums. Now to make sure that

[libvirt] [PATCH 06/14] qemu: pass priv data to qemuBuildMonitorCommandLine

2017-10-16 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 935b05226d..fa70d15c43 100644 --- a/src/qemu/qemu_command.c +++

[libvirt] [PATCH 01/14] conf: rename lifecycle enum values to correspond with typedef keyword

2017-10-16 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c| 6 +++--- src/conf/domain_conf.h| 10 +- src/libxl/libxl_conf.c| 12 ++-- src/libxl/libxl_domain.c | 20 ++-- src/lxc/lxc_native.c | 4 ++--

Re: [libvirt] [PATCH go-xml] let disk source omitempty for ejecting cdrom/floppy

2017-10-16 Thread Daniel P. Berrange
On Mon, Oct 16, 2017 at 05:36:54PM +0800, zhenwei.pi wrote: > Signed-off-by: zhenwei.pi > --- > domain.go | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/domain.go b/domain.go > index bacab11..f9d567d 100644 > --- a/domain.go > +++

[libvirt] [PATCH go-xml] let disk source omitempty for ejecting cdrom/floppy

2017-10-16 Thread zhenwei.pi
Signed-off-by: zhenwei.pi --- domain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domain.go b/domain.go index bacab11..f9d567d 100644 --- a/domain.go +++ b/domain.go @@ -117,7 +117,7 @@ type DomainDisk struct { Snapshot string

Re: [libvirt] [PATCH v2 00/22] Fix host-model if the chosen CPU model has more features in QEMU compared to our cpu_map.xml

2017-10-16 Thread Jiri Denemark
On Fri, Oct 13, 2017 at 16:46:57 -0400, John Ferlan wrote: > > > On 10/13/2017 02:14 PM, Jiri Denemark wrote: > > When decoding CPUID data to virCPUDef we need to be careful about using > > a CPU model which cannot be directly used on the current host. Normally, > > libvirt would notice the

[libvirt] [PATCH] virsh: domifaddr: clarify description of --full option

2017-10-16 Thread Chen Hanxiao
From: Chen Hanxiao Option --full will always display the name and MAC address of the interface. Both virsh help and virsh man page didn't mention that. Signed-off-by: Chen Hanxiao --- tools/virsh-domain-monitor.c | 2 +- tools/virsh.pod