[libvirt] [PATCH v3 0/4] support dumping guest memory in compressed format

2014-02-27 Thread qiaonuohan
dumping guest's memroy is introduced without compression supported, and this is a freature regression of 'virsh dump --memory-only'. This patchset is used to add support in libvirt side to make qemu dump guest's memory in kdump-compressed format and please refer the following address to see

[libvirt] [PATCH v3 4/4] add dump_memory_format in qemu.conf

2014-02-27 Thread qiaonuohan
This patch is used to add dump_memory_format to qemu.conf and libvirt will use it to specify the default format in which qemu dumps guest's memory. But when --compress is specified with virsh dump --memory-only, the format configured by dump_memory_format will be overrided. dump_memory_format can

[libvirt] [PATCH v3 2/4] wire up qemu agent to virDomainMemoryDump API

2014-02-27 Thread qiaonuohan
This patch makes use of the QEMU guest agent to implement the virDomainMemoryDump API. Signed-off-by: Qiao Nuohan qiaonuo...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 42 -- src/qemu/qemu_monitor.c | 7 --- src/qemu/qemu_monitor.h |

Re: [libvirt] [PATCH 1/4] qemu: export disk snapshot support in capabilities

2014-02-27 Thread Francesco Romani
Hi, thanks for the review! - Original Message - From: Eric Blake ebl...@redhat.com To: Francesco Romani from...@redhat.com, libvir-list@redhat.com Sent: Wednesday, February 26, 2014 11:30:07 PM Subject: Re: [libvirt] [PATCH 1/4] qemu: export disk snapshot support in capabilities

[libvirt] [PATCH] sanlock: Truncate domain names longer than SANLK_NAME_LEN

2014-02-27 Thread Jiri Denemark
Libvirt uses a domain name to fill in owner_name in sanlock_options in virLockManagerSanlockAcquire. Unfortunately, owner_name is limited to SANLK_NAME_LEN characters (including trailing '\0'), which means domains with longer names fail to start when sanlock is enabled. However, we can truncate

Re: [libvirt] Libvirt Java Bindings - adding domain event support - pull request

2014-02-27 Thread Daniel P. Berrange
On Thu, Feb 27, 2014 at 03:47:31AM +, Chris Ellis wrote: Hi all I'm new to this list, I've been making use of the Libvirt Java bindings recently. I wanted to make use of domain events yesterday so my application can be alerted when the state of a domain changes etc. [snip] I've put

Re: [libvirt] [PATCH] sanlock: Truncate domain names longer than SANLK_NAME_LEN

2014-02-27 Thread Daniel P. Berrange
On Thu, Feb 27, 2014 at 09:43:10AM +0100, Jiri Denemark wrote: Libvirt uses a domain name to fill in owner_name in sanlock_options in virLockManagerSanlockAcquire. Unfortunately, owner_name is limited to SANLK_NAME_LEN characters (including trailing '\0'), which means domains with longer names

Re: [libvirt] [PATCH] sanlock: Truncate domain names longer than SANLK_NAME_LEN

2014-02-27 Thread Ján Tomko
On 02/27/2014 09:43 AM, Jiri Denemark wrote: Libvirt uses a domain name to fill in owner_name in sanlock_options in virLockManagerSanlockAcquire. Unfortunately, owner_name is limited to SANLK_NAME_LEN characters (including trailing '\0'), which means domains with longer names fail to start

[libvirt] [PATCH v2] qemu: cleanup tap devices on FreeBSD

2014-02-27 Thread Roman Bogorodskiy
We have to explicitly destroy TAP devices on FreeBSD because they're not freed after being closed, otherwise we end up with orphaned TAP devices after destroying a domain. --- src/qemu/qemu_process.c | 7 +++ src/util/virnetdevtap.h | 6 ++ 2 files changed, 13 insertions(+) diff --git

Re: [libvirt] [PATCH] sanlock: Truncate domain names longer than SANLK_NAME_LEN

2014-02-27 Thread Jiri Denemark
On Thu, Feb 27, 2014 at 11:33:50 +0100, Jano Tomko wrote: On 02/27/2014 09:43 AM, Jiri Denemark wrote: Libvirt uses a domain name to fill in owner_name in sanlock_options in virLockManagerSanlockAcquire. Unfortunately, owner_name is limited to SANLK_NAME_LEN characters (including trailing

Re: [libvirt] [PATCH] virDomainGetCPUStats: fix boundary value problem of start_cpu

2014-02-27 Thread Jincheng Miao
- Original Message - This API has boundary value problem, if start_cpu is equal to the number of cpus, no error infomation will be reported. This is because the confused meaning of variable max_id, so change the comparision and rename the variable max_id to total_num.

Re: [libvirt] [PATCH v2] libvirt support to force convergence of live guest migration

2014-02-27 Thread Daniel Hansel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Chegu Vinod, I have tested your updated patch on s390x platform. My migration tests are finished successfully. On 07.02.2014 00:44, Chegu Vinod wrote: Hello, 'am sending this updated patch as an attachment (as I was having some issues with my

Re: [libvirt] [PATCH 1/2] Add tests for virUSBDeviceFind functions

2014-02-27 Thread Michal Privoznik
On 26.02.2014 17:54, Ján Tomko wrote: Mock the /sys/bus/usb directory and test the finding (and not finding) of some USB devices. --- .gitignore | 1 + cfg.mk | 3 +- tests/Makefile.am

Re: [libvirt] [PATCH 2/2] Add a test for virUSBDeviceList functions

2014-02-27 Thread Michal Privoznik
On 26.02.2014 17:54, Ján Tomko wrote: Most of them are already tested in a limited way by testing virUSBDeviceFind. --- tests/virusbtest.c | 75 ++ 1 file changed, 75 insertions(+) diff --git a/tests/virusbtest.c b/tests/virusbtest.c index

Re: [libvirt] [PATCH 1/2] Add tests for virUSBDeviceFind functions

2014-02-27 Thread Michal Privoznik
On 27.02.2014 14:27, Michal Privoznik wrote: On 26.02.2014 17:54, Ján Tomko wrote: Mock the /sys/bus/usb directory and test the finding (and not finding) of some USB devices. --- .gitignore | 1 + cfg.mk |

Re: [libvirt] [PATCH 1/2] Add tests for virUSBDeviceFind functions

2014-02-27 Thread Ján Tomko
On 02/27/2014 02:27 PM, Michal Privoznik wrote: On 26.02.2014 17:54, Ján Tomko wrote: Mock the /sys/bus/usb directory and test the finding (and not finding) of some USB devices. --- @@ -815,6 +817,16 @@ virpcimock_la_LIBADD = $(GNULIB_LIBS) \ virpcimock_la_LDFLAGS = -module -avoid-version

Re: [libvirt] [PATCH v3 1/4] add new virDomainMemoryDump API

2014-02-27 Thread Daniel P. Berrange
On Thu, Feb 27, 2014 at 03:56:42PM +0800, qiaonuohan wrote: --memory-only option is introduced without compression supported. Therefore, this is a freature regression of virsh dump. Now qemu has support dumping memory in kdump-compressed format. This patch is adding new virDomainMemoryDump

Re: [libvirt] [PATCH v3 2/4] wire up qemu agent to virDomainMemoryDump API

2014-02-27 Thread Daniel P. Berrange
On Thu, Feb 27, 2014 at 03:56:43PM +0800, qiaonuohan wrote: This patch makes use of the QEMU guest agent to implement the virDomainMemoryDump API. Unless I'm missing something this doesn't appear to involve the QEMU guest agent, at least not from libvirt's POV. This code is using the QEMU

Re: [libvirt] [PATCH v3 4/4] add dump_memory_format in qemu.conf

2014-02-27 Thread Daniel P. Berrange
On Thu, Feb 27, 2014 at 03:56:45PM +0800, qiaonuohan wrote: This patch is used to add dump_memory_format to qemu.conf and libvirt will use it to specify the default format in which qemu dumps guest's memory. But when --compress is specified with virsh dump --memory-only, the format configured

Re: [libvirt] [PATCH] virDomainGetCPUStats: fix boundary value problem of start_cpu

2014-02-27 Thread Michal Privoznik
On 26.02.2014 10:18, Jincheng Miao wrote: This API has boundary value problem, if start_cpu is equal to the number of cpus, no error infomation will be reported. This is because the confused meaning of variable max_id, so change the comparision and rename the variable max_id to total_num.

Re: [libvirt] [PATCH v3 1/4] add new virDomainMemoryDump API

2014-02-27 Thread Eric Blake
On 02/27/2014 07:43 AM, Daniel P. Berrange wrote: +/* Domain memory dump's format */ /* */ comments don't make it through to the html doc pages. Here, you want something like: /** * virDomainCoreDumpFormat: * Values for specifying different formats of domain core dumps. */ +typedef enum

Re: [libvirt] [PATCH v3 4/4] add dump_memory_format in qemu.conf

2014-02-27 Thread Daniel P. Berrange
On Thu, Feb 27, 2014 at 08:52:19AM -0700, Eric Blake wrote: On 02/27/2014 07:55 AM, Daniel P. Berrange wrote: +else { +/* when --compress option is specified, qemu.conf will not work */ +cfg = virQEMUDriverGetConfig(driver); +if

Re: [libvirt] [PATCH v3 4/4] add dump_memory_format in qemu.conf

2014-02-27 Thread Eric Blake
On 02/27/2014 08:55 AM, Daniel P. Berrange wrote: Arguably, if you support value '0' as an explicit use the default format from the .conf file, and '1' as raw, then you could set it up so that applications have explicit control over all formats when desired, but can use the .conf file default

Re: [libvirt] KVM Domain memory and disk usage

2014-02-27 Thread Martin Kletzander
On Tue, Feb 25, 2014 at 09:19:34AM -0500, Qiang Fu wrote: Hi all, I am trying to use virsh to get the memory and storage usage for KVM domain. Right now we can get domain memory statistics through the following virsh cmds: 1. dumpxml: this returns memory and currentMemory This are

Re: [libvirt] [PATCH v3 4/4] add dump_memory_format in qemu.conf

2014-02-27 Thread Eric Blake
On 02/27/2014 07:55 AM, Daniel P. Berrange wrote: +else { +/* when --compress option is specified, qemu.conf will not work */ +cfg = virQEMUDriverGetConfig(driver); +if (cfg-dumpMemoryFormat) { +dump_memory_format =

[libvirt] [PATCH] Check if systemd is the init before creating machines

2014-02-27 Thread Ján Tomko
If systemd is installed, but not the init system, systemd-machined fails with an unhelpful error message: Launch helper exited with unknown return code 1 Fall back to manual cgroup creation if systemd is installed, but it's not PID 1. [1] https://bugs.freedesktop.org/show_bug.cgi?id=69962 ---

Re: [libvirt] [PATCH 4/4] qemu: add unit tests for the capabilities xml

2014-02-27 Thread Eric Blake
On 01/17/2014 08:31 AM, Francesco Romani wrote: the test is loosely inspired from qemucapabilitiestest and qemuxml2xmltest. Added a new test instead of extending an existing one because the feature being tested don't really fits nicely in any s/don't/doesn't/ s/fits/fit/ existing place.

[libvirt] [PATCH] tests: avoid littering /tmp

2014-02-27 Thread Eric Blake
Running 'make -C tests check TESTS=qemuagenttest' left a directory /tmp/libvirt_XX/ behind. The culprit was failure to cleanup when short-circuiting an expensive test. * tests/qemuagenttest.c (testQemuAgentTimeout): Free resources when skipping expensive test. Signed-off-by: Eric Blake

Re: [libvirt] [Xen-devel] [PATCH LIBVIRT] libxl: Recognise ARM architectures

2014-02-27 Thread Ian Campbell
On Wed, 2014-02-26 at 15:01 +, Daniel P. Berrange wrote: Yep, if ARM has a PV console, then we'd need to add tiny bit to the XML to allow us to configure that explicitly, similar to how we do for KVM's virtio-console support. Do you mean I need to add something to the XML config snippet,

Re: [libvirt] [PATCH] virDomainGetCPUStats: fix boundary value problem of start_cpu

2014-02-27 Thread Jincheng Miao
On 02/27/2014 11:24 PM, Michal Privoznik wrote: On 26.02.2014 10:18, Jincheng Miao wrote: This API has boundary value problem, if start_cpu is equal to the number of cpus, no error infomation will be reported. This is because the confused meaning of variable max_id, so change the comparision