[libvirt] [PATCH 2/3] virDomainVirtioSerialAddrSetFree: Fix memleak

2015-04-07 Thread Michal Privoznik
==19015== 8 bytes in 1 blocks are definitely lost in loss record 34 of 1,049 ==19015==at 0x4C29F80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19015==by 0x4C2C32F: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19015==by 0x52AD888:

[libvirt] [PATCH 0/3] Fix couple of memleaks

2015-04-07 Thread Michal Privoznik
*** BLURB HERE *** Michal Privoznik (3): qemuSetupCgroupForVcpu: Fix memleak virDomainVirtioSerialAddrSetFree: Fix memleak virQEMUDriverGetConfig: Fix memleak src/conf/domain_addr.c | 1 + src/qemu/qemu_cgroup.c | 8 --- src/qemu/qemu_command.c | 5 - src/qemu/qemu_domain.c

[libvirt] [PATCH 3/3] virQEMUDriverGetConfig: Fix memleak

2015-04-07 Thread Michal Privoznik
==19015== 968 (416 direct, 552 indirect) bytes in 1 blocks are definitely lost in loss record 999 of 1,049 ==19015==at 0x4C2C070: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19015==by 0x52ADF14: virAllocVar (viralloc.c:560) ==19015==by 0x5302FD1: virObjectNew

[libvirt] [PATCH 1/3] qemuSetupCgroupForVcpu: Fix memleak

2015-04-07 Thread Michal Privoznik
==19015== 1,064 (656 direct, 408 indirect) bytes in 2 blocks are definitely lost in loss record 1,002 of 1,049 ==19015==at 0x4C2C070: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19015==by 0x52AD74B: virAlloc (viralloc.c:144) ==19015==by 0x52B47CA: virCgroupNew

Re: [libvirt] [PATCH] virNetSocketNewConnectUNIX: Use flocks when spawning a daemon

2015-04-07 Thread Richard W.M. Jones
On Thu, Apr 02, 2015 at 06:21:01PM +0200, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1200149 Even though we have a mutex mechanism so that two clients don't spawn two daemons, it's not strong enough. It can happen that while one client is spawning the daemon, the

Re: [libvirt] [libvirt-cmdref PATCH] Adding Documentation for cd

2015-04-07 Thread Ján Tomko
On Thu, Mar 19, 2015 at 01:23:43AM +0530, Swaathi Ramesh wrote: The documentation for command cd did not have information about the command. Added the required information. --- source/cd.xml | 38 ++ 1 file changed, 34 insertions(+), 4 deletions(-) ACK

Re: [libvirt] [PATCH 1/1] virt-aa-helper: add unix channels (esp for qemu-guest-agent)

2015-04-07 Thread Ján Tomko
On Mon, Apr 06, 2015 at 04:12:03PM +, Serge Hallyn wrote: The original bug report was at https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1393842 Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com --- src/security/virt-aa-helper.c | 1 + 1 file changed, 1 insertion(+) ACK

[libvirt] [PATCH] PowerPC: Replace hardcoded values of 'pseries-2*' machine in schema

2015-04-07 Thread Prerna Saxena
From: Prerna Saxena pre...@linux.vnet.ibm.com Date: Mon, 6 Apr 2015 22:56:25 -0500 Qemu-system-ppc64 has introduced new variants of pseries machine type, such as 'pseries', 'pseries-2.1'..'pseries-2.3'. Replace the hardcoded values in the schema with a regex that captures this. Signed-off-by:

Re: [libvirt] [RFC PATCH 2/2] vbox: Implement virDomainSendKey

2015-04-07 Thread Ján Tomko
On Thu, Mar 19, 2015 at 05:43:57PM -0400, Dawid Zamirski wrote: Since the holdtime is not supported by VBOX SDK, it's being simulated by sleeping before sending the key-up codes. The key-up codes are auto-generated based on XT codeset rules (adding of 0x80 to key-down) which results in the

Re: [libvirt] [PATCH 0/4] Various bugfixes for cancelled VM migrations

2015-04-07 Thread Ján Tomko
On Mon, Mar 30, 2015 at 01:40:57PM +1100, Michael Chapman wrote: This patch series contains fixes for several bugs I encountered while deliberately forcing a VM migration to abort by killing the libvirt client. My VM has storage on local disk, which needs to be mirrored during the

Re: [libvirt] [PATCH 4/4] util: fix removal of callbacks in virCloseCallbacksRun

2015-04-07 Thread Ján Tomko
On Mon, Mar 30, 2015 at 01:41:01PM +1100, Michael Chapman wrote: The close callbacks hash are keyed by a UUID-string, but virCloseCallbacksRun was attempting to remove them by raw UUID. This patch ensures the callback entries are removed by UUID-string as well. This bug could cause problems

Re: [libvirt] [PATCH 2/2] LXC: make sure netns been enabled when trying to enable userns

2015-04-07 Thread Ján Tomko
On Sun, Mar 22, 2015 at 11:46:23PM -0400, Chen Hanxiao wrote: Discussed at: http://www.redhat.com/archives/libvir-list/2015-March/msg01023.html Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- src/lxc/lxc_container.c | 10 ++ 1 file changed, 10 insertions(+) diff

Re: [libvirt] [PATCH 1/2] Revert LXC: create a bind mount for sysfs when enable userns but disable netns

2015-04-07 Thread Ján Tomko
On Sun, Mar 22, 2015 at 11:46:22PM -0400, Chen Hanxiao wrote: This reverts commit a86b6215a74b1feb2667204e214fbfd2f7decc5c. Only partially. I think it should also revert the netns_disabled argrument, see my reply to patch 2/2. Discussed at:

Re: [libvirt] [PATCH 1/3] qemuSetupCgroupForVcpu: Fix memleak

2015-04-07 Thread Peter Krempa
On Tue, Apr 07, 2015 at 10:49:49 +0200, Michal Privoznik wrote: ==19015== 1,064 (656 direct, 408 indirect) bytes in 2 blocks are definitely lost in loss record 1,002 of 1,049 ==19015==at 0x4C2C070: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19015==by

Re: [libvirt] [PATCH 2/3] virDomainVirtioSerialAddrSetFree: Fix memleak

2015-04-07 Thread Peter Krempa
On Tue, Apr 07, 2015 at 10:49:50 +0200, Michal Privoznik wrote: ==19015== 8 bytes in 1 blocks are definitely lost in loss record 34 of 1,049 ==19015==at 0x4C29F80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19015==by 0x4C2C32F: realloc (in

Re: [libvirt] [PATCH 3/3] virQEMUDriverGetConfig: Fix memleak

2015-04-07 Thread Peter Krempa
On Tue, Apr 07, 2015 at 10:49:51 +0200, Michal Privoznik wrote: ==19015== 968 (416 direct, 552 indirect) bytes in 1 blocks are definitely lost in loss record 999 of 1,049 ==19015==at 0x4C2C070: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==19015==by 0x52ADF14:

[libvirt] [PATCH] doc: Add info (where necessary) that paths should be specified as absolute

2015-04-07 Thread Erik Skultety
We documented this almost everywhere, but missed it on several places. https://bugzilla.redhat.com/show_bug.cgi?id=1208763 --- Hopefully I didn't miss any place where it should be fixed as well. I also thought about adding a check for this issue in the code, but we probably do not want to do

Re: [libvirt] [PATCH] hostdev: Report the domain name for used hostdevs during nodedev-detach

2015-04-07 Thread Ján Tomko
On Wed, Apr 01, 2015 at 04:28:05PM +0530, Shivaprasad G Bhat wrote: The nodedev-detach can report the name of the domain using the device just the way nodedev-reattach does it. Signed-off-by: Shivaprasad G Bhat sb...@linux.vnet.ibm.com --- src/util/virhostdev.c |7 +++ 1 file

Re: [libvirt] [PATCH] hostdev: Report the domain name for used hostdevs during nodedev-detach

2015-04-07 Thread Shivaprasad bhat
Thanks Jan. Regards, Shiva On Tue, Apr 7, 2015 at 5:42 PM, Ján Tomko jto...@redhat.com wrote: On Wed, Apr 01, 2015 at 04:28:05PM +0530, Shivaprasad G Bhat wrote: The nodedev-detach can report the name of the domain using the device just the way nodedev-reattach does it. Signed-off-by:

[libvirt] [PATCH v2 2/5] cgroup: Use virCgroupNewThread

2015-04-07 Thread John Ferlan
Replace the virCgroupNew{Vcpu|Emulator|IOThread} calls with the common virCgroupNewThread API Signed-off-by: John Ferlan jfer...@redhat.com --- src/libvirt_private.syms | 3 - src/qemu/qemu_cgroup.c | 22 --- src/qemu/qemu_driver.c | 41 +++- src/util/vircgroup.c | 160

Re: [libvirt] [PATCH] lxc: create the required directories upon driver start

2015-04-07 Thread Lubomir Rintel
Hi Cedric, On Tue, 2015-04-07 at 16:18 +0200, Cedric Bosdonnat wrote: Hello Lubomir On Tue, 2015-04-07 at 15:37 +0200, Lubomir Rintel wrote: /var/run may reside on a tmpfs and we fail to create the PID file if /var/run/lxc does not exist. Just mentioning the fact that this folder may

[libvirt] [PATCH v2 0/5] Refactor cgroup and qemuDomainHotplugVcpus

2015-04-07 Thread John Ferlan
v1 here: http://www.redhat.com/archives/libvir-list/2015-April/msg00126.html John Ferlan (5): cgroup: Introduce virCgroupNewThread cgroup: Use virCgroupNewThread qemu: qemuDomainHotplugVcpus - separate out the add cgroup qemu: qemuDomainHotplugVcpus - separate out the del cgroup and pin

[libvirt] [PATCH 2/2] qemu: Enforce WWN to be unique among VM's disks

2015-04-07 Thread Peter Krempa
Operating systems use the identifier to name the disks. As the name suggests the ID should be unique. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1208009 --- docs/formatdomain.html.in | 3 ++- src/conf/domain_conf.c| 25 + src/conf/domain_conf.h| 3 +++

[libvirt] [PATCH 0/2] Fix handling of disk's WWN (world wide name)

2015-04-07 Thread Peter Krempa
Peter Krempa (2): conf: ABI: Check WWN in disk abi stability check qemu: Enforce WWN to be unique among VM's disks docs/formatdomain.html.in | 3 ++- src/conf/domain_conf.c| 33 + src/conf/domain_conf.h| 3 +++ src/libvirt_private.syms | 1 +

[libvirt] [PATCH 1/2] conf: ABI: Check WWN in disk abi stability check

2015-04-07 Thread Peter Krempa
Since the WWN influences guest behavior in naming disks we should treat this as vm ABI. --- src/conf/domain_conf.c | 8 1 file changed, 8 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1763305..27f29eb 100644 --- a/src/conf/domain_conf.c +++

[libvirt] [PATCH v2 3/5] qemu: qemuDomainHotplugVcpus - separate out the add cgroup

2015-04-07 Thread John Ferlan
Future IOThread setting patches would copy the code anyway, so create and generalize the add the vcpu to a cgroup into its own API. Signed-off-by: John Ferlan jfer...@redhat.com --- src/qemu/qemu_driver.c | 65 +- 1 file changed, 43 insertions(+),

[libvirt] [PATCH v2 5/5] qemu: qemuDomainHotplugVcpus - separate out pin adjustment code

2015-04-07 Thread John Ferlan
Future IOThread setting patches would copy the code anyway, so create and generalize the adding of pindef for the vcpu into its own API Signed-off-by: John Ferlan jfer...@redhat.com --- src/qemu/qemu_driver.c | 92 +- 1 file changed, 54

[libvirt] [PATCH v2 4/5] qemu: qemuDomainHotplugVcpus - separate out the del cgroup and pin

2015-04-07 Thread John Ferlan
Future IOThread setting patches would copy the code anyway, so create and generalize a delete cgroup and pindef for the vcpu into its own API. Signed-off-by: John Ferlan jfer...@redhat.com --- src/qemu/qemu_driver.c | 43 +-- 1 file changed, 29

[libvirt] [PATCH v2 1/5] cgroup: Introduce virCgroupNewThread

2015-04-07 Thread John Ferlan
Create a new common API to replace the virCgroupNew{Vcpu|Emulator|IOThread} API's using an emum to generate the cgroup name Signed-off-by: John Ferlan jfer...@redhat.com --- src/libvirt_private.syms | 1 + src/util/vircgroup.c | 74

[libvirt] [PATCH] lxc: create the required directories upon driver start

2015-04-07 Thread Lubomir Rintel
/var/run may reside on a tmpfs and we fail to create the PID file if /var/run/lxc does not exist. Other drivers (well, BHYVE) seem to do the same thing. Signed-off-by: Lubomir Rintel lkund...@v3.sk --- src/lxc/lxc_driver.c | 14 ++ 1 file changed, 14 insertions(+) diff --git

Re: [libvirt] [PATCH 1/1] virt-aa-helper: add unix channels (esp for qemu-guest-agent)

2015-04-07 Thread Serge Hallyn
Quoting Ján Tomko (jto...@redhat.com): On Mon, Apr 06, 2015 at 04:12:03PM +, Serge Hallyn wrote: The original bug report was at https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1393842 Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com --- src/security/virt-aa-helper.c |

Re: [libvirt] [PATCH v3] storage: Add support for storage pool state XML

2015-04-07 Thread John Ferlan
On 04/03/2015 07:03 AM, Erik Skultety wrote: This patch introduces new virStorageDriverState element stateDir. Also adds necessary changes to storageStateInitialize, so that directories initialization becomes more generic. --- src/conf/storage_conf.h | 1 +

Re: [libvirt] [PATCH] lxc: create the required directories upon driver start

2015-04-07 Thread Cedric Bosdonnat
Hello Lubomir On Tue, 2015-04-07 at 15:37 +0200, Lubomir Rintel wrote: /var/run may reside on a tmpfs and we fail to create the PID file if /var/run/lxc does not exist. Just mentioning the fact that this folder may not exist is OK. We have the same problem right after the libvirt installation

Re: [libvirt] [PATCH v3] storage: Add support for storage pool state XML

2015-04-07 Thread Erik Skultety
Thanks, fixed and pushed with remaining ACKed patches 5 and 6. Erik On 04/07/2015 03:55 PM, John Ferlan wrote: On 04/03/2015 07:03 AM, Erik Skultety wrote: This patch introduces new virStorageDriverState element stateDir. Also adds necessary changes to storageStateInitialize, so that

Re: [libvirt] [PATCH] parallels: delete old networks in prlsdkDoApplyConfig before adding new ones

2015-04-07 Thread Dmitry Guryanov
On 04/06/2015 06:53 PM, Maxim Nestratov wrote: In order to change an existing domain we delete all existing devices and add new from scratch. In case of network devices we should also delete corresponding virtual networks (if any) before removing actual devices from xml. In the patch, we do it

[libvirt] [PATCHv2 0/2] vbox: Add support for virDomainSendKey

2015-04-07 Thread Dawid Zamirski
Those patches implement support for virDomainSendKey in the VBOX driver. Since VBOX SDK does not support holdtime natively, it's being simulated by using usleep to wait for that time before key-up scancodes are sent. The key-up scancodes are automatically generated by add 0x80 to key-down

[libvirt] [PATCHv2 2/2] vbox: Implement virDomainSendKey

2015-04-07 Thread Dawid Zamirski
Since the holdtime is not supported by VBOX SDK, it's being simulated by sleeping before sending the key-up codes. The key-up codes are auto-generated based on XT codeset rules (adding of 0x80 to key-down) which results in the same behavior as for QEMU implementation. --- src/vbox/vbox_common.c |

[libvirt] [PATCHv2 1/2] vbox: Register IKeyboard with the unified API.

2015-04-07 Thread Dawid Zamirski
The IKeyboard COM object is needed to implement virDomainSendKey and is available in all supported VBOX versions. --- src/vbox/vbox_tmpl.c | 27 +++ src/vbox/vbox_uniformed_api.h | 8 2 files changed, 35 insertions(+) diff --git a/src/vbox/vbox_tmpl.c

Re: [libvirt] [RFC PATCH 2/2] vbox: Implement virDomainSendKey

2015-04-07 Thread Dawid Zamirski
On Tue, 2015-04-07 at 12:27 +0200, Ján Tomko wrote: On Thu, Mar 19, 2015 at 05:43:57PM -0400, Dawid Zamirski wrote: Since the holdtime is not supported by VBOX SDK, it's being simulated by sleeping before sending the key-up codes. The key-up codes are auto-generated based on XT codeset

Re: [libvirt] [PATCH] doc: Add info (where necessary) that paths should be specified as absolute

2015-04-07 Thread Eric Blake
On 04/07/2015 06:05 AM, Erik Skultety wrote: We documented this almost everywhere, but missed it on several places. https://bugzilla.redhat.com/show_bug.cgi?id=1208763 --- Hopefully I didn't miss any place where it should be fixed as well. I also thought about adding a check for this

[libvirt] [PATCH 0/5] Refactor vcpupin parser and fix error checking

2015-04-07 Thread Peter Krempa
Peter Krempa (5): conf: Split out parsing of emulatorpin conf: Split up virDomainVcpuPinDefParseXML conf: Error out if iothread id is missing in iothreadpin conf: Refactor virDomainVcpuPinDefParseXML qemu: Fix condition for checking vcpu when pinning vcpus src/conf/domain_conf.c | 197

[libvirt] [PATCH 2/5] conf: Split up virDomainVcpuPinDefParseXML

2015-04-07 Thread Peter Krempa
Extract part that parses iothreads into virDomainIothreadPinDefParseXML --- src/conf/domain_conf.c | 112 + 1 file changed, 66 insertions(+), 46 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ec7f9c9..10ec17a 100644

[libvirt] [PATCH 4/5] conf: Refactor virDomainVcpuPinDefParseXML

2015-04-07 Thread Peter Krempa
Refactor the code to parse the vcpupin in a similar way the iothreadpin code is now structured. This allows to get rid of some very strange conditions and error messages. Additionally since a existing bug ( https://bugzilla.redhat.com/show_bug.cgi?id=1208434 ) allows to add vcpupin definitions

[libvirt] [PATCH 1/5] conf: Split out parsing of emulatorpin

2015-04-07 Thread Peter Krempa
Split up parts of virDomainVcpuPinDefParseXML into virDomainEmulatorPinDefParseXML. --- src/conf/domain_conf.c | 50 +- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[libvirt] [PATCH 5/5] qemu: Fix condition for checking vcpu when pinning vcpus

2015-04-07 Thread Peter Krempa
Previously we checked that the vcpu we are trying to set is in range of the number of threads presented by qemu. The problem is that if the VM is offline the count is 0. Since the condition subtracted 1 from the count the number would overflow and the check would never trigger. Change the

[libvirt] [PATCH] qemu: fix index error when clean up vport profile

2015-04-07 Thread Huanle Han
1. 'last_good_net' indicates the index of last successfully configured net. so def-nets[last_good_net] should also be clean up if error occurs. 2. if error occurs in 'virNetDevMacVLanVPortProfileRegisterCallback' (second 'goto err_exit' in loop), we should also do

[libvirt] [PATCH 3/5] conf: Error out if iothread id is missing in iothreadpin

2015-04-07 Thread Peter Krempa
Defining a domain with the following config: domain ... ... iothreads1/iothreads cputune iothreadpin cpuset='1'/ will result in the following config formatted back: domain type='kvm' ... iothreads1/iothreads cputune iothreadpin iothread='0' cpuset='1'/ After restart the VM

[libvirt] [PATCH v3 07/14] parallels: don't fill net adapter model for containers

2015-04-07 Thread Dmitry Guryanov
Network adapter model has no sense for container, so we shouldn't set it to e1000 in parallelsDomainDeviceDefPostParse. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH v3 11/14] parallels: add implicit input devices

2015-04-07 Thread Dmitry Guryanov
Add implicit input devices in parallelsLoadDomains, when VNC is enabled. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_sdk.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c

[libvirt] [PATCH v3 13/14] conf: fix virDomainDefFormatInternal for parallels

2015-04-07 Thread Dmitry Guryanov
We should add input devices with proper bus, not VIR_DOMAIN_INPUT_BUS_XEN. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/conf/domain_conf.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[libvirt] [PATCH v3 12/14] conf: fix virDomainDefParseXML for parallels

2015-04-07 Thread Dmitry Guryanov
Handle input devices in virDomainDefParseXML properly in case of parallels containers and VMs. Parallels containers support only VIR_DOMAIN_INPUT_BUS_PARALLELS. And if VNC is enabled we should add implicit mouse and keyboard. For VMs we should add implicit PS/2 mouse and keyboard. BTW, is it

[libvirt] [PATCH v3 14/14] parallels: fix virDomainDefineXML for domain in saved state

2015-04-07 Thread Dmitry Guryanov
PCS doesn't store domain config in managed save state file. It's forbidden to change config for VMs in this state. It's possible to change config for containers, but after restoring domain will have that new config, not a config, which domain had at the moment of virDomainManagedSave. So we need

[libvirt] [PATCH v3 00/14] parallels: implement managed save

2015-04-07 Thread Dmitry Guryanov
This patch series is intended to implement all needed code, so that suspend/resume in openstack nova will work. It implements .domainHasManagedSaveImage, .domainManagedSave and .domainManagedSaveRemove functions. It's not possible to change VM configuration, if it is in suspended state in PCS.

[libvirt] [PATCH v3 04/14] parallels: report, that cdroms are readonly

2015-04-07 Thread Dmitry Guryanov
Set readonly flag for cdrom devices when we retrieve a list of domains from PCS. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_sdk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/parallels/parallels_sdk.c

[libvirt] [PATCH v3 01/14] parallels: fix headers in parallels_sdk.h

2015-04-07 Thread Dmitry Guryanov
Return value of functions prlsdkStart/Kill/Stop e.t.c. is PRL_RESULT in parallels_sdk.c and int in parallels_sdk.h. PRL_RESULT is int, so compiler didn't report errors. Let's fix the difference. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_sdk.h | 10

[libvirt] [PATCH v3 10/14] conf: add input device type for parallels containers

2015-04-07 Thread Dmitry Guryanov
Add VIR_DOMAIN_INPUT_BUS_PARALLELS device type to handle domain configuration properly for parallels containers, when VNC is enabled. When domain configuration has at least one 'graphics', there should be mouse and keyboard. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com ---

[libvirt] [PATCH v3 03/14] parallels: implement virDomainManagedSave

2015-04-07 Thread Dmitry Guryanov
Implement virDomainManagedSave api function. In PCS this feature called suspend. You can suspend VM or CT while it is in running or paused state. And after resuming (or starting) it will have the same state, as before suspend. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com ---

[libvirt] [PATCH v3 3/4] scsi: Adjust return value for virStorageBackendSCSINewLun

2015-04-07 Thread John Ferlan
Use virStorageBackendPoolUseDevPath API to determine whether creation of stable target path is possible for the volume. If not, then return failure. This will differentiate a failed virStorageBackendStablePath which won't need to be fatal. Thus, we'll add a -2 return value to differentiate that

[libvirt] [PATCH v3 4/4] scsi: Adjust return values from processLU

2015-04-07 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1171933 Adjust the processLU error returns to be a bit more logical. Currently, the calling code cannot determine the difference between a non disk/lun volume and a processed/found disk/lun. It can also not differentiate between perhaps real/fatal error

[libvirt] [PATCH v3 0/4] storage: handle scsi/iscsi error paths better

2015-04-07 Thread John Ferlan
Rework of unpushed patches from series: http://www.redhat.com/archives/libvir-list/2015-April/msg00050.html Details: Patch 1 - Split out the non /dev/* checks into their own to start satisfying Jan's comment in his review of the former patch 3:

[libvirt] [PATCH v3 1/4] storage: Split out the valid path check

2015-04-07 Thread John Ferlan
For virStorageBackendStablePath, in order to make decisions in other code split out the checks regarding whether the pool's target is empty, using /dev, using /dev/, or doesn't start with /dev Signed-off-by: John Ferlan jfer...@redhat.com --- src/storage/storage_backend.c | 42

[libvirt] [PATCH v3 2/4] refactor virStorageBackendSCSINewLun

2015-04-07 Thread John Ferlan
Signed-off-by: John Ferlan jfer...@redhat.com --- src/storage/storage_backend_scsi.c | 55 ++ 1 file changed, 20 insertions(+), 35 deletions(-) diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c index 2a3e1e4..b96caec 100644

[libvirt] [PATCH v3 02/14] parallels: split prlsdkDomainChangeState function

2015-04-07 Thread Dmitry Guryanov
Split function prlsdkDomainChangeState into prlsdkDomainChangeStateLocked and prlsdkDomainChangeState. So it can be used from places, where virDomainObj already found and locked. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_sdk.c | 35

[libvirt] [PATCH v3 05/14] parallels: add controllers in prlsdkLoadDomain

2015-04-07 Thread Dmitry Guryanov
Call virDomainDefAddImplicitControllers to add disk controllers, so virDomainDef, filled by this function will look exactly like the one returned by virDomainDefParseString. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_sdk.c | 3 +++ 1 file changed, 3

[libvirt] [PATCH v3 08/14] conf: add VIR_DOMAIN_VIDEO_TYPE_PARALLELS video type

2015-04-07 Thread Dmitry Guryanov
We support VNC for containers to have the same interface with VMs. At this moment it just renders linux text console. Of course we don't pass any physical devices and don't emulate virtual devices. Our VNC server renders text from terminal master and sends input events from VNC client to

[libvirt] [PATCH v3 06/14] parallels: fill adapter model in virDomainNetDef

2015-04-07 Thread Dmitry Guryanov
We handle this parameter for VMs while defining domains, so let's get this property from PCS and set corresponding field of virDomainNetDef in prlsdkLoadDomains function. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_sdk.c | 25 + 1

[libvirt] [PATCH v3 09/14] conf: return proper default video type for parallels

2015-04-07 Thread Dmitry Guryanov
Fix function virDomainVideoDefaultType for parallels VMs and containers. It should return VGA for VMs and VIR_DOMAIN_VIDEO_TYPE_PARALLELS for containers. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/conf/domain_conf.c | 10 ++ 1 file changed, 10 insertions(+) diff

Re: [libvirt] [PATCH 4/4] util: fix removal of callbacks in virCloseCallbacksRun

2015-04-07 Thread Michael Chapman
On Tue, 7 Apr 2015, Ján Tomko wrote: On Mon, Mar 30, 2015 at 01:41:01PM +1100, Michael Chapman wrote: The close callbacks hash are keyed by a UUID-string, but virCloseCallbacksRun was attempting to remove them by raw UUID. This patch ensures the callback entries are removed by UUID-string as

[libvirt] [PATCH 4/4 v2] util: fix removal of callbacks in virCloseCallbacksRun

2015-04-07 Thread Michael Chapman
The close callbacks hash are keyed by a UUID-string, but virCloseCallbacksRun was attempting to remove them by raw UUID. This patch ensures the callback entries are removed by UUID-string as well. This bug caused problems when guest migrations were abnormally aborted: # timeout --signal KILL 1