Re: [libvirt] [PATCH v3 04/12] LXC: introduce virLXCControllerSetupUserns and lxcContainerSetID

2013-06-05 Thread Gao feng
On 06/04/2013 09:35 PM, Daniel P. Berrange wrote: On Thu, May 23, 2013 at 12:06:48PM +0800, Gao feng wrote: This patch introduces new helper function virLXCControllerSetupUserns, in this function, we set the files uid_map and gid_map of the init task of container. lxcContainerSetID is used

Re: [libvirt] [PATCH] virtlockd: fix socket path

2013-06-05 Thread Ján Tomko
On 06/04/2013 04:40 PM, Eric Blake wrote: On 06/04/2013 05:40 AM, Ján Tomko wrote: Change the socket path to match the one used by lockd driver. https://bugzilla.redhat.com/show_bug.cgi?id=968128 --- src/locking/virtlockd.socket.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [libvirt] [libvirt-glib 1/6] gconfig: Allow not found child in gvir_config_object_get_child_with_type

2013-06-05 Thread Christophe Fergeau
On Tue, Jun 04, 2013 at 08:03:51PM +0200, Michal Privoznik wrote: On 04.06.2013 18:50, Christophe Fergeau wrote: This will be useful when implementing gvir_domain_snapshot_get_parent() as the child node 'parent' is not always present in the XML. ---

Re: [libvirt] [libvirt-glib 2/6] gconfig: Add GVirConfigDomainDiskFormat enum

2013-06-05 Thread Christophe Fergeau
On Tue, Jun 04, 2013 at 08:03:53PM +0200, Michal Privoznik wrote: On 04.06.2013 18:50, Christophe Fergeau wrote: --- libvirt-gconfig/libvirt-gconfig-domain-disk.h | 20 libvirt-gconfig/libvirt-gconfig.sym | 2 ++ 2 files changed, 22 insertions(+) diff

Re: [libvirt] [PATCH v4 1/5] libvirt: Define domain crash event types

2013-06-05 Thread Daniel Hansel
Applied and tested successfully on s390x platform (as expected by me). Eric mentioned already the few points that should be corrected (indentation of comments). Mit freundlichen Grüßen / Kind regards Daniel Hansel IBM Deutschland Research Development GmbH Vorsitzende des Aufsichtsrats:

[libvirt] [PATCH 0/4] Cleanup storage volume creation and tests and provide better error messages

2013-06-05 Thread Peter Krempa
This series cleans up a few aspects when creating storage volumes and adds error messages if the metadata preallocation flag is not supported. Peter Krempa (4): storagevolxml2argvtest: Report better error messages on test failure storage: Clean up function header and reflow error message

[libvirt] [PATCH 3/4] storage: Avoid unnecessary ternary operators and refactor the code

2013-06-05 Thread Peter Krempa
Setting of local variables in virStorageBackendCreateQemuImgCmd was unnecessarily cluttered with ternary operators and repeated testing of of conditions. This patch refactors the function to use if statements and optimizes the code flow resulting in a line count reduction. ---

[libvirt] [PATCH 4/4] storage: Provide better error message if metadata pre-alloc is unsupported

2013-06-05 Thread Peter Krempa
Instead of a unknown flag error report that metadata pre-allocation is not supported with the requested volume creation method. --- src/storage/storage_backend.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/storage/storage_backend.c

[libvirt] [PATCH 1/4] storagevolxml2argvtest: Report better error messages on test failure

2013-06-05 Thread Peter Krempa
If the creation of the commandline failed, libvirt always reported out of memory from the virCommandToString function rather than the proper error that happened in virStorageBackendCreateQemuImgCmd. Error out earlier. --- tests/storagevolxml2argvtest.c | 7 --- 1 file changed, 4

[libvirt] [PATCH 2/4] storage: Clean up function header and reflow error message

2013-06-05 Thread Peter Krempa
Comply with the coding standard and save a few lines. --- src/storage/storage_backend.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c index 66b3ff7..ace9cae 100644 ---

Re: [libvirt] [PATCH v4 1/5] libvirt: Define domain crash event types

2013-06-05 Thread chenfan
On Wed, 2013-06-05 at 10:49 +0200, Daniel Hansel wrote: Applied and tested successfully on s390x platform (as expected by me). Eric mentioned already the few points that should be corrected (indentation of comments). It's right. Mit freundlichen Grüßen / Kind regards Daniel Hansel

Re: [libvirt] [PATCH v5 4/5] libvirt: Define crash dumpcore events in watchdogAction

2013-06-05 Thread Daniel P. Berrange
On Wed, Jun 05, 2013 at 05:54:59PM +0800, Chen Fan wrote: We want to implement the oncrash actions through the thread Pool. so need to define several types for Implementing that options in watchdogAction. --- src/conf/domain_conf.c | 4 src/conf/domain_conf.h | 4 2 files

Re: [libvirt] [PATCH 3/4] storage: Avoid unnecessary ternary operators and refactor the code

2013-06-05 Thread Ján Tomko
On 06/05/2013 10:59 AM, Peter Krempa wrote: Setting of local variables in virStorageBackendCreateQemuImgCmd was unnecessarily cluttered with ternary operators and repeated testing of of conditions. This patch refactors the function to use if statements and optimizes the code flow resulting

Re: [libvirt] [PATCH 4/4] storage: Provide better error message if metadata pre-alloc is unsupported

2013-06-05 Thread Ján Tomko
On 06/05/2013 10:59 AM, Peter Krempa wrote: Instead of a unknown flag error report that metadata pre-allocation is not supported with the requested volume creation method. --- src/storage/storage_backend.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-)

Re: [libvirt] [PATCH 1/4] storagevolxml2argvtest: Report better error messages on test failure

2013-06-05 Thread Ján Tomko
On 06/05/2013 10:59 AM, Peter Krempa wrote: If the creation of the commandline failed, libvirt always reported out of memory from the virCommandToString function rather than the proper error that happened in virStorageBackendCreateQemuImgCmd. Error out earlier. ---

Re: [libvirt] [PATCH 2/4] storage: Clean up function header and reflow error message

2013-06-05 Thread Ján Tomko
On 06/05/2013 10:59 AM, Peter Krempa wrote: Comply with the coding standard and save a few lines. --- src/storage/storage_backend.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) ACK Jan -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH v2] qemu: Report the offset from host UTC for RTC_CHANGE event

2013-06-05 Thread Osier Yang
https://bugzilla.redhat.com/show_bug.cgi?id=964177 Though both libvirt and QEMU's document say RTC_CHANGE returns the offset from the host UTC, qemu actually returns the offset from the specified date instead when specific date is provided (-rtc base=$date). It's not safe for qemu to fix it in

Re: [libvirt] [libvirt-designer PATCHv3 5/9] Automatically add SPICE channel with SPICE graphics

2013-06-05 Thread Christophe Fergeau
On Tue, Jun 04, 2013 at 07:11:23PM +0200, Michal Privoznik wrote: +static gboolean +gvir_designer_domain_has_spice_channel(GVirDesignerDomain *design) +{ +GList *devices; +GList *it; +gboolean has_spice = FALSE; + +devices =

Re: [libvirt] [libvirt-designer PATCHv3 6/9] Check for vioserial availability before adding a SPICE agent

2013-06-05 Thread Christophe Fergeau
On Tue, Jun 04, 2013 at 07:10:57PM +0200, Michal Privoznik wrote: On 04.06.2013 16:33, Christophe Fergeau wrote: This makes use of the new gvir_designer_domain_get_supported_devices() method. --- libvirt-designer/libvirt-designer-domain.c | 42 +++--- 1 file

[libvirt] [PATCH v2] storage: Allow --shrink for raw type volume of fs pool

2013-06-05 Thread Osier Yang
There is no need to use posix_fallocate or SYS_fallocate to shrink the volume, ftruncate can do the work. qemu-img/kvm-img supports to shrink the volume itself. And instead of bool arguments, this introduces virStorageFileResizeFlags enum. --- src/storage/storage_backend_fs.c | 18

Re: [libvirt] [PATCH 3/3] storage: Allow --shrink for raw type volume of fs pool

2013-06-05 Thread Osier Yang
On 04/06/13 23:19, Michal Privoznik wrote: On 31.05.2013 07:16, Osier Yang wrote: There is no need to use posix_fallocate or SYS_fallocate to shrink the volume, ftruncate can do the work. qemu-img/kvm-img supports to shrink the volume itself. --- src/storage/storage_backend_fs.c | 7 +--

Re: [libvirt] [PATCH 1/3] qemu: Abstract code for the cpu controller setting into a helper

2013-06-05 Thread Osier Yang
On 04/06/13 22:23, Martin Kletzander wrote: On 05/24/2013 11:08 AM, Osier Yang wrote: --- src/qemu/qemu_cgroup.c | 55 +- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index

Re: [libvirt] [libvirt-designer PATCHv3 7/9] Implement gvir_designer_domain_add_usb_redir()

2013-06-05 Thread Christophe Fergeau
On Tue, Jun 04, 2013 at 07:11:05PM +0200, Michal Privoznik wrote: diff --git a/examples/virtxml.c b/examples/virtxml.c index 46fb551..bd3bfb3 100644 --- a/examples/virtxml.c +++ b/examples/virtxml.c @@ -566,6 +566,7 @@ main(int argc, char *argv[]) static char *resources_str =

Re: [libvirt] [PATCH] build: only install examples when nwfilter is defined

2013-06-05 Thread Laine Stump
On 06/04/2013 07:02 PM, Eric Blake wrote: On the other hand; WITH_NWFILTER controlls what libvirtd provides, not what the client can do. Technically, even on a machine where the client was built without nwfilter support, that client can still talk to a libvirtd with nwfilter enabled, at which

Re: [libvirt] [PATCH] build: only install examples when nwfilter is defined

2013-06-05 Thread Eric Blake
On 06/05/2013 05:38 AM, Laine Stump wrote: On 06/04/2013 07:02 PM, Eric Blake wrote: On the other hand; WITH_NWFILTER controlls what libvirtd provides, not what the client can do. Technically, even on a machine where the client was built without nwfilter support, that client can still talk to

Re: [libvirt] [PATCH] maint: don't use config.h in .h files

2013-06-05 Thread Eric Blake
On 06/04/2013 09:11 PM, Guannan Ren wrote: On 06/05/2013 10:54 AM, Eric Blake wrote: On 05/31/2013 11:54 AM, Eric Blake wrote: Enforce the rule that .h files don't need to (redundantly) include config.h. * cfg.mk (sc_prohibit_config_h_in_headers): New rule. ACK Thanks; pushed. --

[libvirt] [libvirt-designer PATCHv4 3/9] Update copyright notice

2013-06-05 Thread Christophe Fergeau
--- libvirt-designer/libvirt-designer-domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libvirt-designer/libvirt-designer-domain.c b/libvirt-designer/libvirt-designer-domain.c index f329e89..98b30d5 100644 --- a/libvirt-designer/libvirt-designer-domain.c +++

[libvirt] [libvirt-designer PATCHv4 0/9] Handle more devices in GVirDesignerDomain

2013-06-05 Thread Christophe Fergeau
Hey, Here is a new version of that series with the issues raised by Michal addressed. Changes since v3: - don't automatically add USB/smartcard/graphics devices, but add options to virtxml to explicitly request those - return an error when gvir_designer_domain_add_graphics() fails to

[libvirt] [libvirt-designer PATCHv4 6/9] Check for vioserial availability before adding a SPICE agent

2013-06-05 Thread Christophe Fergeau
This makes use of the new gvir_designer_domain_get_supported_devices() method. --- libvirt-designer/libvirt-designer-domain.c | 49 -- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/libvirt-designer/libvirt-designer-domain.c

[libvirt] [libvirt-designer PATCHv4 8/9] Implement gvir_designer_domain_add_smartcard()

2013-06-05 Thread Christophe Fergeau
This setups smartcard redirection to the guest. I'm not yet fully sure what users could want to tweak there (there are various ways of setting up the smartcard redirection), so this code may need to be made more flexible. The current code is also not checking whether the hypervisor supports this

[libvirt] [libvirt-designer PATCHv4 5/9] Automatically add SPICE channel with SPICE graphics

2013-06-05 Thread Christophe Fergeau
When the user sets up the graphical framebuffer to use SPICE, we now add automatically the SPICE agent channel if it's not present already. --- libvirt-designer/libvirt-designer-domain.c | 85 ++ 1 file changed, 85 insertions(+) diff --git

[libvirt] [libvirt-designer PATCHv4 7/9] Implement gvir_designer_domain_add_usb_redir()

2013-06-05 Thread Christophe Fergeau
This will add an USB redirection channel to the VM. This can be called multiple times to redirect several USB devices at once. This will also add the needed controllers if they are not already present in the VM. The current code has 2 shortcomings: - USB redirection is only supported with SPICE,

[libvirt] [libvirt-designer PATCHv4 9/9] Implement gvir_designer_domain_add_video()

2013-06-05 Thread Christophe Fergeau
This takes into account the devices specified by the deployment, if this fails, consider the intersection of devices supported by the OS and by the platform, and if this still fails, falls back to a hardcoded hypervisor type - video model mapping. --- examples/virtxml.c |

[libvirt] [libvirt-designer PATCHv4 4/9] Implement gvir_designer_domain_add_graphics()

2013-06-05 Thread Christophe Fergeau
This allows to choose between SPICE, VNC or a local display, which will go through SDL or 'desktop' depending on the hypervisor. --- configure.ac | 2 +- examples/virtxml.c | 25 +++ libvirt-designer/libvirt-designer-domain.c | 111

[libvirt] [libvirt-designer PATCHv4 1/9] Improve VM skeleton created by gvir_designer_domain_setup_guest()

2013-06-05 Thread Christophe Fergeau
Add various devices/configuration to libvirt XML config when creating the VM. This configuration is generic enough that it should be useful on all created VMs, that's why no public API is added to set them up. However, they are split in several helpers that can easily be exported if needed. What

[libvirt] [libvirt-designer PATCHv4 2/9] Implement gvir_designer_domain_add_sound()

2013-06-05 Thread Christophe Fergeau
--- examples/virtxml.c | 3 + libvirt-designer/libvirt-designer-domain.c | 133 + libvirt-designer/libvirt-designer-domain.h | 2 + libvirt-designer/libvirt-designer.sym | 1 + 4 files changed, 139 insertions(+) diff --git

Re: [libvirt] [PATCH 4/4] storage: Provide better error message if metadata pre-alloc is unsupported

2013-06-05 Thread Peter Krempa
On 06/05/13 12:09, Ján Tomko wrote: On 06/05/2013 10:59 AM, Peter Krempa wrote: Instead of a unknown flag error report that metadata pre-allocation is not supported with the requested volume creation method. --- src/storage/storage_backend.c | 27 --- 1 file

Re: [libvirt] [PATCH v3 04/12] LXC: introduce virLXCControllerSetupUserns and lxcContainerSetID

2013-06-05 Thread Daniel P. Berrange
On Wed, Jun 05, 2013 at 02:43:41PM +0800, Gao feng wrote: On 06/04/2013 09:35 PM, Daniel P. Berrange wrote: On Thu, May 23, 2013 at 12:06:48PM +0800, Gao feng wrote: This patch introduces new helper function virLXCControllerSetupUserns, in this function, we set the files uid_map and

Re: [libvirt] [PATCH] qemu.conf: update vnc_password docs

2013-06-05 Thread Daniel P. Berrange
On Wed, Jun 05, 2013 at 03:09:54PM +0200, Ján Tomko wrote: QEMU does accept empty VNC passwords now and allows anyone to connect with an empty password. https://bugzilla.redhat.com/show_bug.cgi?id=969542 --- src/qemu/qemu.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[libvirt] [PATCH] qemu.conf: update vnc_password docs

2013-06-05 Thread Ján Tomko
QEMU does accept empty VNC passwords now and allows anyone to connect with an empty password. https://bugzilla.redhat.com/show_bug.cgi?id=969542 --- src/qemu/qemu.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf index

Re: [libvirt] [PATCH] qemu.conf: update vnc_password docs

2013-06-05 Thread Eric Blake
On 06/05/2013 07:11 AM, Daniel P. Berrange wrote: On Wed, Jun 05, 2013 at 03:09:54PM +0200, Ján Tomko wrote: QEMU does accept empty VNC passwords now and allows anyone to connect with an empty password. https://bugzilla.redhat.com/show_bug.cgi?id=969542 --- src/qemu/qemu.conf | 6 +++---

[libvirt] [PATCHv2 01/14] virsh-domain-monitor: Remove ATTRIBUTE_UNUSED from a argument

2013-06-05 Thread Peter Krempa
The cmd argument in cmdList is now used. Unmark it as unused. --- tools/virsh-domain-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index b284154..3ba829c 100644 --- a/tools/virsh-domain-monitor.c +++

[libvirt] [PATCHv2 02/14] qemu: Use bool instead of int in qemuMonitorSetCPU APIs

2013-06-05 Thread Peter Krempa
The 'online' parameter has only two possible values. Use a bool for it. --- src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_monitor.c | 2 +- src/qemu/qemu_monitor.h | 2 +- src/qemu/qemu_monitor_json.c | 2 +- src/qemu/qemu_monitor_json.h | 2 +- src/qemu/qemu_monitor_text.c | 2

[libvirt] [PATCHv2 07/14] qemu: Implement support for VIR_DOMAIN_VCPU in qemuDomainSetVcpusFlags

2013-06-05 Thread Peter Krempa
This patch adds support for agent-based cpu disabling and enabling to qemuDomainSetVcpusFlags() API. --- src/qemu/qemu_driver.c | 129 - 1 file changed, 116 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c

[libvirt] [PATCHv2 04/14] qemu_agent: Introduce helpers for agent based CPU hot(un)plug

2013-06-05 Thread Peter Krempa
The qemu guest agent allows to online and offline CPUs from the perspective of the guest. This patch adds helpers that call 'guest-get-vcpus' and 'guest-set-vcpus' guest agent functions and convert the data for internal libvirt usage. --- src/qemu/qemu_agent.c | 148

[libvirt] [PATCHv2 03/14] qemu: Extract more information about vCPUs and threads

2013-06-05 Thread Peter Krempa
The qemu monitor provides more information about vCPUs of a guest than we needed currently. This patch upgrades the extraction function to easily extract new data about the vCPUs and fixes code to cope with the new structure. The information extracted here will be later used for mapping of vCPUs

[libvirt] [PATCHv2 14/14] qemu: Implement virDomainSetGuestVcpu in qemu driver

2013-06-05 Thread Peter Krempa
Use the helper added earlier to implement this new API. --- src/qemu/qemu_driver.c | 65 ++ 1 file changed, 65 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ba3a6e1..19a86bf 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCHv2 09/14] virsh-domain-monitor: Implement command to map guest vCPUs

2013-06-05 Thread Peter Krempa
Add support for the virDomainGetVCPUMap API. The code is based on node vcpu mapping. --- tools/virsh-domain-monitor.c | 110 +++ tools/virsh.pod | 23 + 2 files changed, 133 insertions(+) diff --git a/tools/virsh-domain-monitor.c

[libvirt] [PATCHv2 06/14] qemu: Implement request of vCPU state using the guest agent

2013-06-05 Thread Peter Krempa
This patch implements the VIR_DOMAIN_VCPU_AGENT flag for the qemuDomainGetVcpusFlags() libvirt API implementation. --- src/qemu/qemu_driver.c | 60 ++ 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCHv2 13/14] virsh-domain: Implement command for virDomainSetGuestVcpu

2013-06-05 Thread Peter Krempa
Add a virsh command called setguestvcpu to excercise the virDomainSetGuestVcpu API. --- tools/virsh-domain.c | 77 tools/virsh.pod | 6 2 files changed, 83 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index

[libvirt] [PATCHv2 08/14] lib: Add API to map virtual cpus of a guest

2013-06-05 Thread Peter Krempa
QEMU recently added support for cpu hotplug upstream that will support plugging arbitrary cpus. Additionally guest-agent-based cpu state modification from the guest point of view was added recently. This API will help monitoring the state of vCPUs using the two apporoaches as a support

[libvirt] [PATCHv2 11/14] qemu: Implement new QMP command for cpu hotplug

2013-06-05 Thread Peter Krempa
This patch implements support for the cpu-add QMP command that plugs CPUs into a live guest. The cpu-add command was introduced in QEMU 1.5. For the hotplug to work machine type pc-i440fx-1.5 is required. --- src/qemu/qemu_monitor_json.c | 37 +++-- 1 file changed,

[libvirt] [PATCHv2 10/14] qemu: Implement virDomainGetVCPUMap for the qemu driver

2013-06-05 Thread Peter Krempa
Use the agent cpu state code and the upgraded hypervisor vcpu state retrieval code to implement virDomainGetVCPUMap() api. --- src/qemu/qemu_driver.c | 179 + 1 file changed, 179 insertions(+) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCHv2 12/14] lib: Add API to modify vCPU state from the guest using the guest agent

2013-06-05 Thread Peter Krempa
This patch introduces API virDomainSetGuestVcpus that will be used to work with vCPU state from the point of view of the guest using the guest agent. --- include/libvirt/libvirt.h.in | 4 src/driver.h | 8 +++ src/libvirt.c| 55

[libvirt] [PATCHv2 05/14] API: Introduce VIR_DOMAIN_VCPU_AGENT, for agent based CPU hot(un)plug

2013-06-05 Thread Peter Krempa
This flag will allow to use qemu guest agent commands to disable (offline) and enable (online) processors in a live guest that has the guest agent running. --- include/libvirt/libvirt.h.in | 1 + src/libvirt.c| 24 ++-- tools/virsh-domain.c | 25

Re: [libvirt] [PATCH] Fix a invalid usage of virDomainNetDef in OpenVZ driver

2013-06-05 Thread John Ferlan
On 06/04/2013 03:44 AM, Alvaro Polo wrote: OpenVZ was accessing ethernet data to obtain the guest iface name regardless the domain is configured to use ethernet or bridged networking. This prevented the guest network interface to be rightly named for bridged networking. ---

[libvirt] [PATCHv2] storage: Avoid unnecessary ternary operators and refactor the code

2013-06-05 Thread Peter Krempa
Setting of local variables in virStorageBackendCreateQemuImgCmd was unnecessarily cluttered with ternary operators and repeated testing of of conditions. This patch refactors the function to use if statements and improves error reporting in case inputvol is specified but does not contain target

[libvirt] [PATCH v3 0/2] Add new HyperV features

2013-06-05 Thread Ján Tomko
v1: https://www.redhat.com/archives/libvir-list/2013-May/msg00173.html v2: https://www.redhat.com/archives/libvir-list/2013-May/msg00184.html uses virStringSplit instead of strsep added a missing break to virDomainDefParseXML v3: rebased to use VIR_STRDUP fixed a crash on parsing '-cpu qemu32,hv_'

[libvirt] [PATCH v3 2/2] qemu: add hv_vapic and hv_spinlocks support

2013-06-05 Thread Ján Tomko
Add new CPU flags for HyperV: hv_vapic for virtual APIC support hv_spinlocks for spinlock support XML: features hyperv vapic state='on'/ spinlocks0x/spinlocks /hyperv /features results in the following QEMU command line: qemu -cpu cpu_model,hv_vapic,hv_spinlocks=0x

[libvirt] [PATCH v3 1/2] qemu: simplify CPU command line parsing

2013-06-05 Thread Ján Tomko
Use virStringSplit. Change the 'error' label to 'cleanup' to prevent memory leaks on error. --- src/qemu/qemu_command.c | 117 +--- 1 file changed, 52 insertions(+), 65 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index

Re: [libvirt] [PATCH] Fix a invalid usage of virDomainNetDef in OpenVZ driver

2013-06-05 Thread ALVARO POLO VALDENEBRO
You're right! I missed that line, but it should use guest_interface indeed. How do we proceed? Could you fix it or do you need me to send a new patch? Best, Alvaro Polo Valdenebro Product Development Innovation / Telefónica Digital C/ Don Ramón de la Cruz 82-84 Madrid 28006 (+34) 609 087 054

[libvirt] [PATCH] qemu: Reformat listen address prior checking

2013-06-05 Thread Michal Privoznik
Currently, a listen address for a SPICE server can be specified. Later, when the domain is migrated, we need to relocate the graphics which involves telling new destination to the SPICE server. However, we can't just assume the listen address is the new location, because the listen address can be

Re: [libvirt] [PATCH] Fix a invalid usage of virDomainNetDef in OpenVZ driver

2013-06-05 Thread John Ferlan
On 06/05/2013 11:53 AM, ALVARO POLO VALDENEBRO wrote: You're right! I missed that line, but it should use guest_interface indeed. How do we proceed? Could you fix it or do you need me to send a new patch? If you post the patch difference I can ACK and push for you. I still haven't really

[libvirt] Serial port creation issue

2013-06-05 Thread arvind viswanathan
Hi, I have a serial port defined in vm config file. However after I create the vm using virsh, I notice that the serial ports I have specified translate to -chardev when kvm-quemu is called. I am having trouble accessing the vm if it is configured as a chardev with isserial option. If i can

Re: [libvirt] [PATCH v2] qemu: Report the offset from host UTC for RTC_CHANGE event

2013-06-05 Thread Eric Blake
On 06/05/2013 04:32 AM, Osier Yang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=964177 Though both libvirt and QEMU's document say RTC_CHANGE returns the offset from the host UTC, qemu actually returns the offset from the specified date instead when specific date is provided (-rtc

[libvirt] [PATCH] LXC: fix order in virProcessGetNamespaces

2013-06-05 Thread Richard Weinberger
virProcessGetNamespaces() opens files in /proc/XXX/ns/ which will later be passed to setns(). We have to make sure that the file descriptors in the array are in the correct order. Otherwise setns() may fail. The order has been taken from util-linux's sys-utils/nsenter.c Signed-off-by: Richard

Re: [libvirt] [PATCH v5 2/5] qemu: Supports guest panicked

2013-06-05 Thread Eric Blake
On 06/05/2013 03:54 AM, Chen Fan wrote: Add monitor callback API domainGUESTPanicked, that implements the 'on_crash' behavior in the XML when domain crashed. --- src/qemu/qemu_monitor.c | 14 +- src/qemu/qemu_monitor.h | 5 +++ src/qemu/qemu_monitor_json.c | 7 +++

Re: [libvirt] [PATCH v5 3/5] virsh: supports guest panicked

2013-06-05 Thread Eric Blake
On 06/05/2013 03:54 AM, Chen Fan wrote: Add 'virsh domstate --reason' command is effective when domain crashed. --- tools/virsh-domain-monitor.c | 8 1 file changed, 8 insertions(+) This should probably be squashed in with your 1/5 patch that introduces the new enum values in the

Re: [libvirt] [PATCH v5 5/5] qemu: Implement the oncrash events in processWatchdogEvent

2013-06-05 Thread Eric Blake
On 06/05/2013 03:55 AM, Chen Fan wrote: Through the watchdog actions, we can implement the docoredump func, we rewrite the processWatchdogEvent function to serval independent functions, so we move the previous implementation of the destroy and restart code to here. then the code looks like

Re: [libvirt] [PATCH v2 1/2] Make virNetDevSetupControl() public.

2013-06-05 Thread Eric Blake
On 05/25/2013 09:24 AM, Roman Bogorodskiy wrote: This method is useful not only in virnetdev.c. --- src/libvirt_private.syms | 1 + src/util/virnetdev.c | 15 +-- src/util/virnetdev.h | 11 +++ src/util/virnetdevmacvlan.c | 2 +-

Re: [libvirt] [PATCH v5 5/5] qemu: Implement the oncrash events in processWatchdogEvent

2013-06-05 Thread chenfan
Thx for your detailed reviewer, I will make correction as you pointed out. On Wed, 2013-06-05 at 16:54 -0600, Eric Blake wrote: On 06/05/2013 03:55 AM, Chen Fan wrote: Through the watchdog actions, we can implement the docoredump func, we rewrite the processWatchdogEvent function to serval

Re: [libvirt] [PATCH v2 2/2] BSD: implement virNetDevTapCreate() and virNetDevTapDelete()

2013-06-05 Thread Eric Blake
On 05/25/2013 09:24 AM, Roman Bogorodskiy wrote: Implementation uses SIOCIFCREATE2 and SIOCIFDESTROY ioctls. --- src/util/virnetdevtap.c | 116 +++- 1 file changed, 114 insertions(+), 2 deletions(-) +/* In case we were given exact

[libvirt] [PATCH] build: fix build without posix_fallocate

2013-06-05 Thread Eric Blake
Such as on FreeBSD. Broken in commit aa2a4cff7 * src/util/virstoragefile.c (virStorageFileResize): Add missing ';'. Signed-off-by: Eric Blake ebl...@redhat.com --- Pushing under the build-breaker rule. src/util/virstoragefile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [libvirt] [PATCH] build: fix build without posix_fallocate

2013-06-05 Thread Eric Blake
On 06/05/2013 08:34 PM, Eric Blake wrote: Such as on FreeBSD. Broken in commit aa2a4cff7 * src/util/virstoragefile.c (virStorageFileResize): Add missing ';'. Signed-off-by: Eric Blake ebl...@redhat.com --- Pushing under the build-breaker rule. src/util/virstoragefile.c | 2 +- 1

Re: [libvirt] [PATCH v2] qemu: Report the offset from host UTC for RTC_CHANGE event

2013-06-05 Thread Osier Yang
On 06/06/13 05:28, Eric Blake wrote: On 06/05/2013 04:32 AM, Osier Yang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=964177 Though both libvirt and QEMU's document say RTC_CHANGE returns the offset from the host UTC, qemu actually returns the offset from the specified date instead when