Re: [libvirt] [PATCH] qemuOpenVhostNet: Decrease vhostfdSize on open failure

2013-05-27 Thread Michal Privoznik
On 24.05.2013 16:42, Laine Stump wrote: On 05/24/2013 08:50 AM, Michal Privoznik wrote: Currently, if there's an error opening /dev/vhost-net (e.g. because it doesn't exist) but it's not required we proceed with vhostfd array filled with -1 and vhostfdSize unchanged. Later, when constructing

[libvirt] [PATCH v2] qemuOpenVhostNet: Decrease vhostfdSize on open failure

2013-05-27 Thread Michal Privoznik
Currently, if there's an error opening /dev/vhost-net (e.g. because it doesn't exist) but it's not required we proceed with vhostfd array filled with -1 and vhostfdSize unchanged. Later, when constructing the qemu command line only non-negative items within vhostfd array are taken into account.

[libvirt] [test-API][PATCH] Add 2 emulatorpin cases cover config and live flags

2013-05-27 Thread Wayne Sun
- use pinEmulator to pin domain emulator to host cpu - 2 cases cover config and live flags - cpulist with '^', '-' and ',' is supported to give multiple host cpus Related bug 916493: pinEmulator and emulatorPinInfo should be simple with required params

Re: [libvirt] two hostdev devices problem

2013-05-27 Thread Dominik Mostowiec
Hi, Mabye that's the problem ? : May 27 09:13:44 on-10-177-32-62 kernel: [140204.533733] ixgbe :01:00.0 eth0: VF Reset msg received from vf 13 May 27 09:13:44 on-10-177-32-62 kernel: [140204.533970] ixgbe :01:00.0: VF 13 has no MAC address assigned, you may have to assign one manually May

[libvirt] [PATCH] qemu: Fix build without gnutls

2013-05-27 Thread Jiri Denemark
error label in qemuMigrationCookieGraphicsAlloc is now used unconditionally thanks to VIR_STRDUP. --- Pushed as a build-breaker. src/qemu/qemu_migration.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 73ced73..19b1236 100644 ---

Re: [libvirt] Issues with qemu-nbd over AF_UNIX and virDomainAttachDevice

2013-05-27 Thread Paolo Bonzini
Il 26/05/2013 15:54, Deepak C Shetty ha scritto: 3) In nbdxml, i tried removing port=.. it didn't give any error with regards to port beign mandatory.. which si good.. but the attach device still gives the same error as above Is the `nbdxml` I am using for attachign a qemu-nbd exported

Re: [libvirt] [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information

2013-05-27 Thread Stefan Hajnoczi
On Sun, May 26, 2013 at 10:38:14AM +0300, Michael S. Tsirkin wrote: On Fri, May 24, 2013 at 04:00:42PM -0400, Luiz Capitulino wrote: On Fri, 24 May 2013 12:05:12 -0600 Eric Blake ebl...@redhat.com wrote: On 05/24/2013 10:12 AM, Michael S. Tsirkin wrote: Event message contains

[libvirt] [PATCH] libvirt supports Guest Panicked

2013-05-27 Thread Chen Fan
From: chenfan chen.fan.f...@cn.fujitsu.com This patch implements qemu_driver supporting guest panicked, modified the 'on_crash' default value to 'preserve'. --- examples/domain-events/events-c/event-test.c | 10 +++ include/libvirt/libvirt.h.in | 16 + src/conf/domain_conf.c

Re: [libvirt] Issues with qemu-nbd over AF_UNIX and virDomainAttachDevice

2013-05-27 Thread Deepak C Shetty
On 05/27/2013 02:00 PM, Paolo Bonzini wrote: Il 26/05/2013 15:54, Deepak C Shetty ha scritto: 3) In nbdxml, i tried removing port=.. it didn't give any error with regards to port beign mandatory.. which si good.. but the attach device still gives the same error as above Is the `nbdxml` I

Re: [libvirt] Issues with qemu-nbd over AF_UNIX and virDomainAttachDevice

2013-05-27 Thread Paolo Bonzini
Il 27/05/2013 12:46, Deepak C Shetty ha scritto: On 05/27/2013 02:00 PM, Paolo Bonzini wrote: Il 26/05/2013 15:54, Deepak C Shetty ha scritto: 3) In nbdxml, i tried removing port=.. it didn't give any error with regards to port beign mandatory.. which si good.. but the attach device still

Re: [libvirt] [PATCH] libvirt supports Guest Panicked

2013-05-27 Thread Viktor Mihajlovski
On 05/27/2013 10:41 AM, Chen Fan wrote: From: chenfan chen.fan.f...@cn.fujitsu.com This patch implements qemu_driver supporting guest panicked, modified the 'on_crash' default value to 'preserve'. It's not good to change the default behavior, if someone wants preserve, make them specify it in

Re: [libvirt] [PATCH] libvirt supports Guest Panicked

2013-05-27 Thread Viktor Mihajlovski
On 05/27/2013 10:41 AM, Chen Fan wrote: From: chenfan chen.fan.f...@cn.fujitsu.com @@ -3185,6 +3194,9 @@ int qemuMonitorVMStatusToPausedReason(const char *status) case QEMU_MONITOR_VM_STATUS_WATCHDOG: return VIR_DOMAIN_PAUSED_WATCHDOG; +case

[libvirt] fix change-media bug on disk block type and support volume type

2013-05-27 Thread Guannan Ren
Resolves:https://bugzilla.redhat.com/show_bug.cgi?id=923053 When cdrom is block type, the virsh change-media failed to insert source info because virsh uses source block='/dev/sdb'/ while the correct name of the attribute for block disks is dev. Correct XML: disk type='block' device='cdrom'

[libvirt] [PATCH 1/3] qemu: throw original error when failing to lookup pool or volume

2013-05-27 Thread Guannan Ren
--- src/qemu/qemu_conf.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 094f9f7..d616d7a 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1466,6 +1466,7 @@ qemuTranslateDiskSourcePool(virConnectPtr

[libvirt] [PATCH 3/3] virsh: fix change-media bug on disk block type and support volume type

2013-05-27 Thread Guannan Ren
Resolves:https://bugzilla.redhat.com/show_bug.cgi?id=923053 When cdrom is block type, the virsh change-media failed to insert source info because virsh uses source block='/dev/sdb'/ while the correct name of the attribute for block disks is dev. Correct XML: disk type='block' device='cdrom'

[libvirt] [PATCH 2/3] qemu: support updating pool and volume info when disk is volume type

2013-05-27 Thread Guannan Ren
--- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 1 + src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 5 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a9656af..776c1ed 100644 ---

Re: [libvirt] Issues with qemu-nbd over AF_UNIX and virDomainAttachDevice

2013-05-27 Thread Deepak C Shetty
On 05/27/2013 04:41 PM, Paolo Bonzini wrote: Il 27/05/2013 12:46, Deepak C Shetty ha scritto: On 05/27/2013 02:00 PM, Paolo Bonzini wrote: Il 26/05/2013 15:54, Deepak C Shetty ha scritto: 3) In nbdxml, i tried removing port=.. it didn't give any error with regards to port beign

[libvirt] Entering freeze for libvirt-1.0.6

2013-05-27 Thread Daniel Veillard
As planned, I just tagged the rc1 release in git and pushed tarball and rpms to the FTP repository: ftp://libvirt.org/ So focuse should be given to bug fixes this week, and if everything goes well I will make the release on Monday 3, a week from now. I gave a bit of testing to the rc1 rpms,

Re: [libvirt] Issues with qemu-nbd over AF_UNIX and virDomainAttachDevice

2013-05-27 Thread Paolo Bonzini
Il 27/05/2013 15:41, Deepak C Shetty ha scritto: Tried putting the above nbdxml usign virsh edit domname as an addnl disk and domain booted fine It throws the same error if u add format=qcow2 under driver... So looks like the right way to use NBD is *not* to specify format and let QEMU

[libvirt] [PATCH 00/11] vCPU hotplug mega-series

2013-05-27 Thread Peter Krempa
This patch series consists of multiple parts: -patch 1,2: Two trivial cleanups -patch 3: Improve and refactor vCPU data parsing -patch 4: Add agent monitor helpers for cpu-hotplug stuff -patch 5,6,7: Implement universal guest vCPU mapping function -patch 8: Implement new qemu monitor command for

[libvirt] [PATCH 05/11] lib: Add API to map virtual cpus of a guest

2013-05-27 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] [PATCH 07/11] qemu: Implement virDomainGetVCPUMap for the qemu driver

2013-05-27 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] [PATCH 01/11] virsh-domain-monitor: Remove ATTRIBUTE_UNUSED from a argument

2013-05-27 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 5ed89d1..936fa8e 100644 --- a/tools/virsh-domain-monitor.c +++

[libvirt] [PATCH 08/11] qemu: Implement new QMP command for cpu hotplug

2013-05-27 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] [PATCH 03/11] qemu: Extract more information about vCPUs and threads

2013-05-27 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] [PATCH 11/11] qemu: Implement virDomainSetGuetVcpu in qemu driver

2013-05-27 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 70acdbb..809807f 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCH 06/11] virsh-domain-monitor: Implement command to map guest vCPUs

2013-05-27 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] [PATCH 10/11] virsh-domain: Implement command for virDomainSetGuestVcpu

2013-05-27 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] [PATCH 09/11] lib: Add API to modify vCPU state from the guest using the guest agent

2013-05-27 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] [PATCH 02/11] qemu: Use bool instead of int in qemuMonitorSetCPU APIs

2013-05-27 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] [PATCH 04/11] qemu_agent: Introduce helpers for agent based CPU hot(un)plug

2013-05-27 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] [libvirt-tck PATCH] 121-block-info.t: omit network

2013-05-27 Thread Guido Günther
qemu:///session doesn't have a default network so we fail with: ./scripts/domain/121-block-info.t .. 1/29 # Defining transient storage pool # Generic guest with pervious created vol ./scripts/domain/121-block-info.t .. 12/29 # Failed test 'Create domain' # at

[libvirt] [libvirt-tck PATCH] 121-block-info.t: allow for greater capacity/allocation

2013-05-27 Thread Guido Günther
Don't be too picky about the actual size and allocation. The size needs to be correct but it's o.k. for allocation and size to be bigger. Debian Wheezy's qemu adds 4096 bytes. --- scripts/domain/121-block-info.t |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [libvirt] [Libvirt-announce] Entering freeze for libvirt-1.0.6

2013-05-27 Thread Justin Clift
On 27/05/2013, at 11:44 PM, Daniel Veillard wrote: As planned, I just tagged the rc1 release in git and pushed tarball and rpms to the FTP repository: ftp://libvirt.org/ So focuse should be given to bug fixes this week, and if everything goes well I will make the release on Monday 3, a

[libvirt] [PATCH 1/2] util/viriptables: add/remove rules that short-circuit masquerading

2013-05-27 Thread Laszlo Ersek
The functions - iptablesAddForwardDontMasquerade(), - iptablesRemoveForwardDontMasquerade handle exceptions in the masquerading implemented in the POSTROUTING chain of the nat table. Such exceptions should be added as chronologically latest, logically top-most rules. The bridge driver will call

[libvirt] [PATCH 0/2] don't masquerade local broadcast/multicast packets

2013-05-27 Thread Laszlo Ersek
Masquerading local broadcast breaks DHCP replies for some clients. There has been a report about broken local multicast too. (See references in the patches.) Testing: since I have no idea how to test upstream libvirt on a RHEL-6.4.z virt host and guarantee nothing will be tangled up, I ported the

[libvirt] [PATCH 2/2] bridge driver: don't masquerade local subnet broadcast/multicast packets

2013-05-27 Thread Laszlo Ersek
Packets sent by guests on virbrN, *or* by dnsmasq on the same, to - 255.255.255.255/32 (netmask-independent local network broadcast address), or to - 224.0.0.0/24 (local subnetwork multicast range) are never forwarded, hence it is not necessary to masquerade them. In fact we must not masquerade

Re: [libvirt] [PATCH] Expose all CPU features in host definition

2013-05-27 Thread Don Dugger
On Sat, May 25, 2013 at 11:45:13PM +0200, Martin Kletzander wrote: On 05/25/2013 12:44 AM, Don Dugger wrote: I've opened BZ 697141 on this as I would consider it more a bug than a feature request. Anyway, to re-iterate my rationale from the BZ: The virConnectGetCapabilities API