[libvirt] [PATCH 0/5 v2] parallels: Better bridged network interfaces support and some fixes

2015-02-12 Thread Maxim Nestratov
v2 changes: - syntax check fixed - patches reordered and split - dealing with failed bridged network information fixed Maxim Nestratov (4): parallels: don't forget to unlock domain if unregister fails parallels: better bridge network interface support parallels: fix home directory for VMs

[libvirt] [PATCH 1/5] parallels: set cpu mode when applying xml configuration

2015-02-12 Thread Maxim Nestratov
From: Mikhail Feoktistov mfeoktis...@parallels.com Otherwise exporting existing domain config and defining a new one like this: virsh -c parallels:///system dumpxml instance01 my.xml virsh -c parallels:///system define my.xml leads to an error because PCS default x64 mode turns to x32. Thus, we

[libvirt] [PATCH 2/5] parallels: don't forget to unlock domain if unregister fails

2015-02-12 Thread Maxim Nestratov
Signed-off-by: Maxim Nestratov mnestra...@parallels.com --- src/parallels/parallels_driver.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index c9338b5..90b8b0a 100644 ---

[libvirt] [PATCH 3/5] parallels: better bridge network interface support

2015-02-12 Thread Maxim Nestratov
In order to support 'bridge' network adapters in parallels driver we need to plug our veth devices into corresponding linux bridges. We are going to do this by reusing our abstraction of Virtual Networks in terms of PCS. On a domain creation, we create a new Virtual Network naming it with the same

Re: [libvirt] QEMU capabilities vs machine types

2015-02-12 Thread Eduardo Habkost
On Wed, Feb 11, 2015 at 05:09:01PM +0100, Michal Privoznik wrote: On 11.02.2015 16:47, Daniel P. Berrange wrote: On Wed, Feb 11, 2015 at 04:31:53PM +0100, Michal Privoznik wrote: There are two reasons why we query check the supported capabilities from QEMU 1. There are multiple

[libvirt] [PATCH 4/5] parallels: fix home directory for VMs

2015-02-12 Thread Maxim Nestratov
Failures of parallelsStorageOpen occured because we incorrectly treated path to VM' configuration file as a directory. Now initialization of parallels VM domains home directory is fixed. --- src/parallels/parallels_sdk.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff

[libvirt] [PATCH 5/5] parallels: fix initialization of parallels driver

2015-02-12 Thread Maxim Nestratov
Don't fail initialization of parallels driver even if parallelsGetBridgedNetInfo fails. This can happen when it is unconfigured (which is a common case on developers hosts for instance) or configured incompletely. In any case it is not a severe error and we can ignore it and use only Routed

Re: [libvirt] [RFC PATCH v2 00/12] qemu: add support to hot-plug/unplug cpu device

2015-02-12 Thread Zhu Guihua
Hi all, Any comments about this series? I'm not sure whether this series' method to support cpu hotplug in libvirt is reasonable, so could anyone give more suggestions about this function? Thanks. Regards, Zhu On Wed, 2015-02-04 at 17:18 +0800, Zhu Guihua wrote: If you apply the folowing

[libvirt] [PATCH] util: make use of VIR_LOCK_SPACE_ACQUIRE_AUTOCREATE in virLockSpaceAcquireResource

2015-02-12 Thread Shanzhi Yu
When create external disk snapshot with virtlock enabled, libvirtd will hang if flag VIR_LOCK_SPACE_ACQUIRE_AUTOCREATE is missed in virLockSpaceAcquireResource. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1191901 Signed-off-by: Shanzhi Yu s...@redhat.com --- src/util/virlockspace.c | 6

Re: [libvirt] [PATCH] util: make use of VIR_LOCK_SPACE_ACQUIRE_AUTOCREATE in virLockSpaceAcquireResource

2015-02-12 Thread Daniel P. Berrange
On Thu, Feb 12, 2015 at 07:12:57PM +0800, Shanzhi Yu wrote: When create external disk snapshot with virtlock enabled, libvirtd will hang if flag VIR_LOCK_SPACE_ACQUIRE_AUTOCREATE is missed in virLockSpaceAcquireResource. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1191901

Re: [libvirt] [PATCH v3] lxc: fix show the wrong xml when guest start failed

2015-02-12 Thread John Ferlan
On 02/04/2015 08:42 AM, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1176503 When guest start failed, libvirt will keep the current vm-def, this will make a issue that we cannot get a right xml after guest start failed. And don't call the stop/release hook to do some

Re: [libvirt] [PATCH v2 0/4] attach-interface: Learn net type='direct'

2015-02-12 Thread John Ferlan
On 02/09/2015 10:20 AM, Michal Privoznik wrote: v2 Michal Privoznik (4): libvirt_private.syms: Expose virDomainNetTypeFromString virsh attach-interface: Use enum instead of arbitrary integers virsh attach-interface: Use virDomainNetType{From,To}String() virsh attach-interface:

[libvirt] [PATCH v4 0/3] lxc: fix show the wrong xml when guest start failed

2015-02-12 Thread John Ferlan
This is a rework of the patch Luyao Huang sent to resolve a couple of issues found in virLXCStartProcess. See explanation here: http://www.redhat.com/archives/libvir-list/2015-February/msg00433.html John Ferlan (1): lxc: Modify/add some debug messages Luyao Huang (2): lxc: Move console

Re: [libvirt] [PATCH 0/2] Support mrg_rxbuf attribute for virtio-net devices

2015-02-12 Thread John Ferlan
On 02/06/2015 09:51 AM, Ján Tomko wrote: For https://bugzilla.redhat.com/show_bug.cgi?id=1186886 Ján Tomko (2): Add mrg_rxbuf option to virtio interfaces Wire up mrg_rxbuf option for qemu docs/formatdomain.html.in | 6 +-

[libvirt] [PATCH v4 1/3] lxc: Move console checks in LXCProcessStart

2015-02-12 Thread John Ferlan
From: Luyao Huang lhu...@redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1176503 Move the two console checks - one for zero nconsoles present and the other for an invalid console type to earlier in the processing rather than getting after performing some setup that has to be undone for

[libvirt] [PATCH v4 3/3] lxc: Fix container cleanup for LXCProcessStart

2015-02-12 Thread John Ferlan
From: Luyao Huang lhu...@redhat.com Jumping to the cleanup label prior to starting the container failed to properly clean everything up that is handled by the virLXCProcessCleanup which is called if virLXCProcessStop is called on failure after the container properly starts. Most importantly is

[libvirt] [PATCH v4 2/3] lxc: Modify/add some debug messages

2015-02-12 Thread John Ferlan
Modify the VIR_DEBUG message in virLXCProcessCleanup to make it clearer about the path. Also add some more VIR_DEBUG messages in virLXCProcessStart in order to help debug error flow. Signed-off-by: John Ferlan jfer...@redhat.com --- src/lxc/lxc_process.c | 6 +- 1 file changed, 5

Re: [libvirt] [PATCH v8 1/4] domifaddr: Implement the public APIs

2015-02-12 Thread John Ferlan
On 01/25/2015 01:38 PM, Nehal J Wani wrote: Define helper function virDomainInterfaceFree, which allows the upper layer application to free the domain interface object conveniently. ...snip... diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms index 4ea5cff..ab86543 100644

Re: [libvirt] [PATCH v2 1/3] util: Add virProcessSetScheduler() function for scheduler settings

2015-02-12 Thread Michal Privoznik
On 11.02.2015 18:34, Eric Blake wrote: On 02/11/2015 07:04 AM, Michal Privoznik wrote: On 10.02.2015 16:35, Martin Kletzander wrote: snip/ + +typedef enum { +VIR_PROC_POLICY_NONE, +VIR_PROC_POLICY_BATCH, +VIR_PROC_POLICY_IDLE, +VIR_PROC_POLICY_FIFO, +

[libvirt] Google Summer of Code application submitted

2015-02-12 Thread Stefan Hajnoczi
Hi, I have submitted our Google Summer of Code application for QEMU, libvirt, and KVM. Accepted organizations will be announced on March 2nd at 19:00 UTC on http://google-melange.com/. You can still add project ideas if you wish to mentor: http://qemu-project.org/Google_Summer_of_Code_2015

Re: [libvirt] [PATCH v2 3/3] qemuMigrationDriveMirror: Listen to events

2015-02-12 Thread Peter Krempa
On Wed, Feb 11, 2015 at 13:51:11 +0100, Michal Privoznik wrote: When migrating with storage, libvirt iterates over domain disks and instruct qemu to migrate the ones we are interested in (shared, RO and source-less disks are skipped). The disks are migrated in series. No new disk is

[libvirt] [PATCH] util: do not resotre the VF that is in use by another active guest

2015-02-12 Thread Zhang Bo
If we assign a VF, which has already been used by an active guest, to another guest, and try to start the 2nd guest later on, the 2nd guest would not start, and the VF won't work anymore. Steps to reproduce the problem: 1 Assign a VF to guest A, and start the guest. The VF works fine. 2 Assign

Re: [libvirt] [PATCH v2 1/3] util: Add virProcessSetScheduler() function for scheduler settings

2015-02-12 Thread Peter Krempa
On Tue, Feb 10, 2015 at 16:35:19 +0100, Martin Kletzander wrote: This function uses sched_setscheduler() function so it works with processes and threads as well (even threads not created by us, which is what we'll need in the future). Signed-off-by: Martin Kletzander mklet...@redhat.com ---

Re: [libvirt] [PATCH v3] lxc: fix show the wrong xml when guest start failed

2015-02-12 Thread lhuang
On 02/13/2015 04:45 AM, John Ferlan wrote: On 02/04/2015 08:42 AM, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1176503 When guest start failed, libvirt will keep the current vm-def, this will make a issue that we cannot get a right xml after guest start failed. And don't

[libvirt] [PATCH 1/4] util: introduce a new helper for get interface IPv6 address

2015-02-12 Thread Luyao Huang
Introduce a new function to help to get interface IPv6 address. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms | 1 + src/util/virnetdev.c | 70 src/util/virnetdev.h | 2 ++ 3 files changed, 73 insertions(+)

[libvirt] [PATCH 2/4] conf: introduce new family attribute in graphics listen for chose IP family

2015-02-12 Thread Luyao Huang
If a interface or network have both ipv6 and ipv4 address which can be used, we do not know use which be a listen address. So introduce a new attribute to help us chose this. graphics XML will like this after this commit: graphics type='spice' port='5900' autoport='yes' listen

[libvirt] [PATCH 0/4] add support for graphics to get a IPv6 address

2015-02-12 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1192318 We already support add a IPv6 address to graphics listen address and xml like this: graphics type='spice' port='5900' autoport='yes' listen='2001b8:ca2:2::1' keymap='en-us' listen type='address' address='2001b8:ca2:2::1'/

[libvirt] [PATCH 3/4] network: rework networkGetNetworkAddress to make it can get IPv6 address

2015-02-12 Thread Luyao Huang
Export the required helpers and rework networkGetNetworkAddress to make it can get IPv6 address. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/network_conf.c | 2 +- src/conf/network_conf.h | 1 + src/libvirt_private.syms| 1 + src/network/bridge_driver.c | 50

[libvirt] [PATCH 4/4] qemu: fix a error coverd issue in 2 place

2015-02-12 Thread Luyao Huang
we already set a more clearly error in networkGetNetworkAddress, so this error will cover our error in networkGetNetworkAddress. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git

Re: [libvirt] [PATCH 1/4] Implement public API for virDomainGetIOThreadsInfo

2015-02-12 Thread John Ferlan
On 02/12/2015 08:12 AM, Daniel P. Berrange wrote: On Thu, Feb 12, 2015 at 08:03:44AM -0500, John Ferlan wrote: Add virDomainGetIOThreadsInfo in order to returned a list of virDomainIOThreadsInfoPtr structures which list the IOThread ID, the thread_id, and the CPU Affinity map for each

Re: [libvirt] [PATCH] util: make use of VIR_LOCK_SPACE_ACQUIRE_AUTOCREATE in virLockSpaceAcquireResource

2015-02-12 Thread Shanzhi Yu
On 02/12/2015 07:17 PM, Daniel P. Berrange wrote: On Thu, Feb 12, 2015 at 07:12:57PM +0800, Shanzhi Yu wrote: When create external disk snapshot with virtlock enabled, libvirtd will hang if flag VIR_LOCK_SPACE_ACQUIRE_AUTOCREATE is missed in virLockSpaceAcquireResource. Resolves:

Re: [libvirt] [PATCH v2 1/4] security: Refactor virSecurityManagerGenLabel

2015-02-12 Thread Erik Skultety
-if (mgr == NULL || mgr-drv == NULL) -return ret; - Can either of these conditions be true here? If so, we should leave the check here (possibly add an error message), because GetNested will dereference them. If not, they should be cleaned up in a separate patch. Jan

Re: [libvirt] [PATCH 1/4] Implement public API for virDomainGetIOThreadsInfo

2015-02-12 Thread Daniel P. Berrange
On Thu, Feb 12, 2015 at 08:03:44AM -0500, John Ferlan wrote: Add virDomainGetIOThreadsInfo in order to returned a list of virDomainIOThreadsInfoPtr structures which list the IOThread ID, the thread_id, and the CPU Affinity map for each IOThread for the active domain. Also added

[libvirt] [PATCH 0/4] Introduce display of IOThreads Information

2015-02-12 Thread John Ferlan
These patches satisfy part of: https://bugzilla.redhat.com/show_bug.cgi?id=1135491 Patches 1 and 2 are fairly straightforward adding a new API type patches although they were implemented with the thought of how patch 3 works. Also rather than implement a get iothreads and a get iothreadspin API,

[libvirt] [PATCH 2/4] remote: Implement the remote plumbing for virDomainGetIOThreads

2015-02-12 Thread John Ferlan
Implement the remote plumbing for virDomainGetIOThreads Signed-off-by: John Ferlan jfer...@redhat.com --- daemon/remote.c | 75 +++- src/remote/remote_driver.c | 82 +++- src/remote/remote_protocol.x | 29

[libvirt] [PATCH 3/4] qemu: Implement the qemu driver fetch for IOThreads

2015-02-12 Thread John Ferlan
Make necessary checks for active domain and IOThread capability before calling the monitor to fetch IOThread data for a domain. If there are threads, then also return the processor affinity maps - this is similar to existing GetVcpuPin, GetVcpuInfo, and GetEmulatorPin fetches of the processor

[libvirt] [PATCH 1/4] Implement public API for virDomainGetIOThreadsInfo

2015-02-12 Thread John Ferlan
Add virDomainGetIOThreadsInfo in order to returned a list of virDomainIOThreadsInfoPtr structures which list the IOThread ID, the thread_id, and the CPU Affinity map for each IOThread for the active domain. Also added virDomainIOThreadsInfoFree in order to free the cpumap and the array entry

[libvirt] [PATCH 4/4] virsh: Add 'iothreads' command

2015-02-12 Thread John Ferlan
Add the 'iothreads' command to display live IOThread Info data $ virsh iothreads $dom IOThread ID Thread ID CPU Affinity 1 31983 2 2 31984 3 3 31985

Re: [libvirt] [PATCH v2 2/3] docs, schema, conf: Add support for setting scheduler parameters of guest threads

2015-02-12 Thread Martin Kletzander
On Wed, Feb 11, 2015 at 10:37:46AM -0700, Eric Blake wrote: On 02/10/2015 08:35 AM, Martin Kletzander wrote: In order for QEMU vCPU (and other) threads to run with RT scheduler, libvirt needs to take care of that so QEMU doesn't have to run privileged. Resolves:

Re: [libvirt] [PATCH] Fix a syntax error in the description text of libvirtd.conf

2015-02-12 Thread Eric Blake
On 02/11/2015 09:22 PM, Zhang Bo wrote: not yet not - not yet. Signed-off-by: Zhang Bo oscar.zhan...@huawei.com --- daemon/libvirtd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK and pushed. diff --git a/daemon/libvirtd.conf b/daemon/libvirtd.conf index

[libvirt] [PATCH 1/3] virQEMUCapsCacheLookupCopy: Pass machine type

2015-02-12 Thread Michal Privoznik
It will come handy in the near future when we will filter some capabilities based on it. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_capabilities.c | 4 +++- src/qemu/qemu_capabilities.h | 3 ++- src/qemu/qemu_migration.c| 3 ++- src/qemu/qemu_process.c | 9

[libvirt] [PATCH 2/3] virQEMUCapsCacheLookupCopy: Filter qemuCaps based on machineType

2015-02-12 Thread Michal Privoznik
Not all machine types support all devices, device properties, backends, etc. So until we create a matrix of [machineType, qemuCaps], lets just filter out some capabilities before we return them to the consumer (which is going to make decisions based on them straight away). Currently, as qemu is

[libvirt] [PATCH 3/3] qemuCaps: Disable memdev for rhel6.5.0 machine type

2015-02-12 Thread Michal Privoznik
Well, after [1] qemu doesn't understand '-object memory-backend-ram' nor '-object memory-backend-file'. Make sure we remove that capabilities from our internal list temporarily, so the qemu command line is constructed in correct way. 1: https://bugzilla.redhat.com/show_bug.cgi?id=1170093

[libvirt] [PATCH 0/3] Introduce machine type based capabilities filtering

2015-02-12 Thread Michal Privoznik
Well, here's an alternative approach to my question here [1]. 1: https://www.redhat.com/archives/libvir-list/2015-February/msg00369.html Michal Privoznik (3): virQEMUCapsCacheLookupCopy: Pass machine type virQEMUCapsCacheLookupCopy: Filter qemuCaps based on machineType qemuCaps: Disable

[libvirt] [PATCH 1/3] numatune_conf: Expose virDomainNumatuneNodeSpecified

2015-02-12 Thread Michal Privoznik
This function is going to be needed in the near future. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/conf/numatune_conf.c | 2 +- src/conf/numatune_conf.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH 3/3] qemuBuildMemoryBackendStr: Report backend requirement more appropriately

2015-02-12 Thread Michal Privoznik
So, when building the '-numa' command line, the qemuBuildMemoryBackendStr() function does quite a lot of checks to chose the best backend, or to check if one is in fact needed. However, it returned that backend is needed even for this little fella: numatune memory mode=strict nodeset=0,2 /

[libvirt] [PATCH 2/3] qemuxml2argvtest: Fake response from numad

2015-02-12 Thread Michal Privoznik
Well, we can pretend that we've asked numad for its suggestion and let qemu command line be built with that respect. Again, this alone has no big value, but see later commits which build on the top of this. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemuxml2argvtest.c | 7

[libvirt] [PATCH 0/3] numatune: Prefer old approach

2015-02-12 Thread Michal Privoznik
Consider the following part of domain XML: numatune memory mode='static' nodeset=0,2/ /numatune cpu numa cell id='0' cpus='0' memory='65536' unit='KiB'/ /numa /cpu Yes, this have a great potential of breaking things. Especially, this will break migration between previous

Re: [libvirt] [PATCH] virprocess: fix MinGW build and RHEL-5 build

2015-02-12 Thread Eric Blake
On 02/12/2015 10:01 AM, Pavel Hrdina wrote: Commit b6a2828e introduced new functions to set process scheduler. There is a small typo in ELSE path for systems where scheduler is not available. Also some of the definitions were introduced later in kernel. For example RHEL-5 is running on

Re: [libvirt] [PATCHv2] libxl: set IP address when creating NIC

2015-02-12 Thread Jim Fehlig
Jim Fehlig wrote: Jihoon Kim wrote: From: Ji-hoon Kim re...@me.com Currently libxlMakeNic() does not set ip address when creating NIC, this patch makes it to set ip address. FYI, Marek recently sent a patch to do the same

Re: [libvirt] [RFC PATCH v2 00/12] qemu: add support to hot-plug/unplug cpu device

2015-02-12 Thread Peter Krempa
On Thu, Feb 12, 2015 at 19:53:13 +0800, Zhu Guihua wrote: Hi all, Any comments about this series? I'm not sure whether this series' method to support cpu hotplug in libvirt is reasonable, so could anyone give more suggestions about this function? Thanks. Well, as Dan pointed out in his

[libvirt] [PATCH] virprocess: fix MinGW build and RHEL-5 build

2015-02-12 Thread Pavel Hrdina
Commit b6a2828e introduced new functions to set process scheduler. There is a small typo in ELSE path for systems where scheduler is not available. Also some of the definitions were introduced later in kernel. For example RHEL-5 is running on kernel 2.6.18, but SCHED_IDLE was introduces in 2.6.23

Re: [libvirt] [PATCH v2 1/3] util: Add virProcessSetScheduler() function for scheduler settings

2015-02-12 Thread Peter Krempa
On Thu, Feb 12, 2015 at 09:14:29 +0100, Michal Privoznik wrote: On 11.02.2015 18:34, Eric Blake wrote: On 02/11/2015 07:04 AM, Michal Privoznik wrote: On 10.02.2015 16:35, Martin Kletzander wrote: ... If it is so, is it worth bothering with cleanup patch(es)? There's Worth? I don't think

Re: [libvirt] [PATCH] virprocess: fix MinGW build and RHEL-5 build

2015-02-12 Thread Pavel Hrdina
On Thu, Feb 12, 2015 at 10:16:04AM -0700, Eric Blake wrote: On 02/12/2015 10:01 AM, Pavel Hrdina wrote: Commit b6a2828e introduced new functions to set process scheduler. There is a small typo in ELSE path for systems where scheduler is not available. Also some of the definitions were

[libvirt] [PATCH v3 2/2] security: Refactor virSecurityManagerGenLabel

2015-02-12 Thread Erik Skultety
if (mgr == NULL || mgr-drv == NULL) return ret; This check isn't really necessary, security manager cannot be a NULL pointer as it is either selinux (by default) or 'none', if no other driver is set in the config. Even with no config file driver name yields 'none'. The other hunk checks for

[libvirt] [PATCH v3 1/2] security: introduce virSecurityManagerCheckAllLabel function

2015-02-12 Thread Erik Skultety
We do have a check for valid per-domain security model, however we still do permit an invalid security model for a domain's device (those which are specified with source element). This patch introduces a new function virSecurityManagerCheckAllLabel which compares user specified security model