[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 https://bugzilla.redhat.com/show_bug.cgi?id

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 2

[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 expo

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 wrote: > > > > > On 05/24/2013 10:12 AM, Michael S. Tsirkin wrote: > > > > > > > > Event message con

[libvirt] [PATCH] libvirt supports Guest Panicked

2013-05-27 Thread Chen Fan
From: chenfan 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 | 14 +

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 >>>

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 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 the XML. --- examples/dom

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 @@ -3185,6 +3194,9 @@ int qemuMonitorVMStatusToPausedReason(const char *status) case QEMU_MONITOR_VM_STATUS_WATCHDOG: return VIR_DOMAIN_PAUSED_WATCHDOG; +case QEMU_MONITOR_VM_STATUS_GUEST_PANICKED: +return VIR_DOM

[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 "" while the correct name of the attribute for block disks is "dev". Correct XML: And, this patch sup

[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 c

[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 "" while the correct name of the attribute for block disks is "dev". Correct XML: And, this patch supp

[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 --- a/src/conf/domain

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 mandatory

[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, se

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 as an addnl > disk and domain booted fine > It throws the same error if u add format=qcow2 under ... > > So looks like the right way to use NBD is *not* to specify format and > let QEMU autose

[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 cp

[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 infrastruct

[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 b/src/qemu/qemu_driv

[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 +++ b/to

[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 cha

[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 of

[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 b/too

[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 inde

[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 /var/lib/jenkins/jobs/libvirt

[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 a/scripts

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,

[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 virConnectGetCapabili

[libvirt] [sandbox][PATCH] Fix nits in virt-sandbox-service when raise ValueError

2013-05-27 Thread Wayne Sun
Put error msg in list when raise ValueError. This fix is for bug: [virt-sandbox-service] execute command with unsupported URI error msg is not right https://bugzilla.redhat.com/show_bug.cgi?id=967705 Signed-off-by: Wayne Sun --- bin/virt-sandbox-service |4 ++-- 1 files changed, 2 insertio

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

2013-05-27 Thread chenfan
On Mon, 2013-05-27 at 14:28 +0200, Viktor Mihajlovski wrote: > On 05/27/2013 10:41 AM, Chen Fan wrote: > > From: chenfan > > @@ -3185,6 +3194,9 @@ int qemuMonitorVMStatusToPausedReason(const char > > *status) > > case QEMU_MONITOR_VM_STATUS_WATCHDOG: > > return VIR_DOMAIN_PAUSED_W

[libvirt] [PATCH v2] libvirt supports Guest Panicked

2013-05-27 Thread Chen Fan
From: ChenFan This patch implements qemu_driver supporting guest panicked. we crashed the guest while libvirt isn't running, then restart libvirtd, we change the domain state to 'crashed'. --- examples/domain-events/events-c/event-test.c | 10 +++ include/libvirt/libvirt.h.in

[libvirt] [PATCH 00/11] Support CHAP authentication for iscsi pool

2013-05-27 Thread Osier Yang
The XMLs like () was introduced long ago, but it's never used for any pool backend. This implements the support first (See 6/11 for details), and based on it, using "secret" object for the authentication is added too. E.g. Osier Yang (11): storage: Refactor the rng schema for s

[libvirt] [PATCH 11/11] Storage: Fix the indention of rbd test file

2013-05-27 Thread Osier Yang
--- tests/storagepoolxml2xmlin/pool-rbd.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/storagepoolxml2xmlin/pool-rbd.xml b/tests/storagepoolxml2xmlin/pool-rbd.xml index 4ee8d56..056ba6e 100644 --- a/tests/storagepoolxml2xmlin/pool-rbd.xml +++ b/tests/storagepoolxml2

[libvirt] [PATCH 01/11] storage: Refactor the rng schema for storage pool auth

2013-05-27 Thread Osier Yang
The attributes/elements for auth type "chap" and "ceph" are complete different, this separates them into groups. And add "interleave" for "login" and "passwd" attributes of "chap" type auth. --- docs/schemas/storagepool.rng | 42 ++ 1 file changed, 22 inser

[libvirt] [PATCH 04/11] storage: Introduce XMLs to use secret object for pool auth

2013-05-27 Thread Osier Yang
Using plain password is still supported for back-compat reason. Example XML: * docs/schemas/storagepool.rng (Add sourceinfoauthsecret as a choice) * src/conf/storage_conf.h (union "passwd" and virStoragePoolAuthSecret) * src/conf/storage_conf.c (s/chap\.passwd/chap\.u\.passwd/;

[libvirt] [PATCH 07/11] storage: Support to use secret object for iscsi chap "auth"

2013-05-27 Thread Osier Yang
Based on the plain password chap "auth" support, this gets the secret value (password) with the secret driver methods, and apply it for the "iscsiadm" update command. --- src/storage/storage_backend_iscsi.c | 56 + 1 file changed, 50 insertions(+), 6 deletions(-

[libvirt] [PATCH 08/11] storage: Update docs/formatsecret.html

2013-05-27 Thread Osier Yang
To mention that the secret type "iscsi" and "ceph" can be used to storage pool too. --- docs/formatsecret.html.in | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/formatsecret.html.in b/docs/formatsecret.html.in index 50c9533..3e306b5 100644 --- a/docs/formatsecr

[libvirt] [PATCH 05/11] storage: Output auth type before username

2013-05-27 Thread Osier Yang
As a habit, "type" attribute is printed first. --- src/conf/storage_conf.c | 2 +- tests/storagepoolxml2xmlout/pool-rbd.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 8f83bae..a876332 100644 --- a/

[libvirt] [PATCH 03/11] storage: Add a struct for auth secret

2013-05-27 Thread Osier Yang
This also abstracts the code for parsing the XMLs to use the secret object as a helper. --- src/conf/storage_conf.c | 68 - src/conf/storage_conf.h | 14 ++ 2 files changed, 48 insertions(+), 34 deletions(-) diff --git a/src/conf/storage_con

[libvirt] [PATCH 02/11] storage: Support "username" for "chap" type "auth"

2013-05-27 Thread Osier Yang
To be consistent with what we use in disk auth, and "ceph" type storage "auth", this supports "username". "login" is still supported for back-compat reason. --- docs/schemas/storagepool.rng | 12 +++--- src/conf/storage_conf.c| 27 +

[libvirt] [PATCH 06/11] storage: Support "chap" authentication for iscsi pool

2013-05-27 Thread Osier Yang
Though the XML for "chap" authentication with plain "password" was introduced long ago, the function was never implemented. This patch completes it. There are two types of CHAP configurations supported for iSCSI authentication: * Initiator Authentication Forward, one-way; The initiator is au

[libvirt] [PATCH 09/11] storage: Use the internal API to get the secret value instead

2013-05-27 Thread Osier Yang
Without the flag VIR_SECRET_GET_VALUE_INTERNAL_CALL, there is no way to get the value of private secret. And error out if the secret value is not found. --- src/storage/storage_backend_rbd.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/storage/storage_backe

[libvirt] [PATCH 10/11] storage: Improve the pool auth type parsing and formating

2013-05-27 Thread Osier Yang
Use the helpers Type{From,To}String instead. --- src/conf/storage_conf.c | 17 ++--- src/conf/storage_conf.h | 3 +++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index a876332..bc8ca33 100644 --- a/src/conf/storage_