Re: [libvirt] [PATCHv2 4/7] conf: rename some labels and functions in network_conf

2012-12-10 Thread Eric Blake
On 12/10/2012 02:23 PM, Laine Stump wrote: This makes some function names and arg lists for consistent with other parse functions in network_conf.c. While modifying virNetworkIPParseXML(), also change its error label to cleanup, since the code at that label is executed on success as well as

Re: [libvirt] [PATCHv2 5/7] conf: make virNetworkIpDefClear consistent with other functions

2012-12-10 Thread Eric Blake
On 12/10/2012 02:23 PM, Laine Stump wrote: The other clear functions in network_conf.c that clear out arrays of sub-objects do so by using the n[itemname]s value as a counter going down to 0. Make this one consistent. There's no functional value, just makes the style more consistent with the

Re: [libvirt] [PATCHv2 6/7] conf: put data for network forward element into its own struct

2012-12-10 Thread Eric Blake
On 12/10/2012 02:23 PM, Laine Stump wrote: The attributes of a network element's forward element were previously stored directly in the virNetworkDef object, but virNetworkUpdateForward() needs to operate on a forward in isolation, so this patchs pulls out all those attributes into a

Re: [libvirt] [PATCH 02/23] Refactor virDomainHostdevFind method

2012-12-10 Thread Eric Blake
On 11/30/2012 01:26 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Move the code for matching hostdev instances out of virDomainHostdevFind and into virDomainHostdevMatch method, which in turn calls out to other helper methods depending on the type of hostdev.

Re: [libvirt] [PATCH 03/23] Add support for hostdev mode=capabilities

2012-12-10 Thread Eric Blake
On 11/30/2012 01:26 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The hostdev device type has long had a redundant mode attribute, which has always been subsys. This finally introduces a new mode capabilities, which will be used by the LXC driver for device

Re: [libvirt] [PATCHv2 7/7] conf: split forward parser/clear into separate functions

2012-12-10 Thread Eric Blake
On 12/10/2012 02:23 PM, Laine Stump wrote: virNetworkDefUpdateForward requires separate functions to parse and clear a virNetworkForwardDef by itself, but they were previously just inlined in the virNetworkDef parse and free functions. This patch makes them into separate functions. ---

Re: [libvirt] [PATCH v2 1/8] bandwidth: Attach sfq to leaf node

2012-12-10 Thread Laine Stump
On 12/04/2012 02:18 PM, Michal Privoznik wrote: SFQ is qdisc which doesn't really shape any traffic but 'just' re-arrange packets in sending buffer so no stream starve. The goal is to ensure fairness. There is basically only one configuration parameter (perturb) which is set to advised value

Re: [libvirt] [PATCHv4 03/17] conf: use VIR_DELETE_ELEMENT for conf object lists

2012-12-10 Thread Eric Blake
On 12/10/2012 02:20 PM, Laine Stump wrote: The volume object list is also directly manipulated in the storage driver, test storage driver, and parallels storage driver (this should probably be consolidated). --- src/conf/interface_conf.c | 13 ++--- src/conf/interface_conf.h

Re: [libvirt] [PATCH v2 2/8] bandwidth: add new 'floor' attribute

2012-12-10 Thread Laine Stump
On 12/04/2012 02:18 PM, Michal Privoznik wrote: This is however supported only on domain interfaces with type='network'. Moreover, target network needs to have at least inbound QoS set. This is required by hierarchical traffic shaping. From now on, the required attribute for inbound/ is

Re: [libvirt] [PATCH v2 3/8] bandwidth: Create hierarchical shaping classes

2012-12-10 Thread Laine Stump
On 12/04/2012 02:18 PM, Michal Privoznik wrote: These classes can borrow unused bandwidth. Basically, only egress qdsics can have classes, therefore we can do this kind of traffic shaping only on host's outgoing, that is domain's incoming traffic. --- src/lxc/lxc_process.c |3 +-

Re: [libvirt] [PATCH v2 5/8] bandwidth: Create rate update function

2012-12-10 Thread Laine Stump
On 12/04/2012 02:18 PM, Michal Privoznik wrote: This will be used whenever a NIC with guaranteed throughput is to be plugged into a bridge. It will adjust the average throughput of non guaranteed NICs (classid 1:2) to meet new requirements. --- src/util/virnetdevbandwidth.c | 49

Re: [libvirt] [PATCH 10/23] Add support for USB host device passthrough with LXC

2012-12-10 Thread Gao feng
on 2012/12/01 04:26, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This adds support for host device passthrough with the LXC driver. Since there is only a single kernel image, it doesn't make sense to pass through PCI devices, but USB devices are fine. For the

Re: [libvirt] [PATCHv4 01/17] util: add VIR_(APPEND|INSERT|DELETE)_ELEMENT

2012-12-10 Thread Doug Goldstein
On Mon, Dec 10, 2012 at 3:20 PM, Laine Stump la...@laine.org wrote: I noticed when writing the backend functions for virNetworkUpdate that I was repeating the same sequence of memmove, VIR_REALLOC, nXXX-- (and messed up the args to memmove at least once), and had seen the same sequence in a

Re: [libvirt] [PATCH 0/4] Add new APIs and virsh commands to get/set cpu mode

2012-12-10 Thread Ken ICHIKAWA
(2012/12/10 22:52), Jiri Denemark wrote: On Mon, Dec 10, 2012 at 09:28:06 +0100, Viktor Mihajlovski wrote: On 12/10/2012 06:19 AM, Ichikawa, Ken wrote: This patchset adds new APIs virDomainGetCPUMode and virDomainSetCPUMode, and adds new virsh commands cpu-getmode and cpu-setmode by using

Re: [libvirt] [PATCH v4 01/13] parallels: add info about hard disk devices

2012-12-10 Thread Daniel Veillard
On Tue, Dec 04, 2012 at 05:43:01PM +0400, Dmitry Guryanov wrote: Parse information about hard disks and fill disks array in virDomainDef structure. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_driver.c | 118 ++

Re: [libvirt] [PATCH v4 03/13] parallels: split parallelsStorageOpen function

2012-12-10 Thread Daniel Veillard
On Tue, Dec 04, 2012 at 05:43:03PM +0400, Dmitry Guryanov wrote: Move code for loading inforation about pools to a separate function - parallelsLoadPools. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_storage.c | 66

Re: [libvirt] [PATCH v4 02/13] parallels: handle disk devices in parallelsDomainDefineXML

2012-12-10 Thread Daniel Veillard
On Tue, Dec 04, 2012 at 05:43:02PM +0400, Dmitry Guryanov wrote: Allow changing some parameters of the hard disks: bus, image and drive address. Creating new disk devices and removing existing ones require changes in the storage driver, so it will be implemented later. Signed-off-by:

Re: [libvirt] [PATCH v4 04/13] parallels: remove unused code from storage driver

2012-12-10 Thread Daniel Veillard
On Tue, Dec 04, 2012 at 05:43:04PM +0400, Dmitry Guryanov wrote: We don't support unprivileged users anymore, so remove code, which selects configuration directory depending on user. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_storage.c | 22

Re: [libvirt] [PATCH 00/23] Improve device support for LXC

2012-12-10 Thread Gao feng
on 2012/12/11 01:19, Daniel P. Berrange wrote: On Fri, Nov 30, 2012 at 08:26:14PM +, Daniel P. Berrange wrote: This series makes some major improvements to the device support for LXC - USB, block and char device passthrough - Hotplug/unplug support for disk, nic, usb, block and

Re: [libvirt] [PATCH v4 05/13] parallels: create storage pools by VM list

2012-12-10 Thread Daniel Veillard
On Tue, Dec 04, 2012 at 05:43:05PM +0400, Dmitry Guryanov wrote: There are no storage pools in Parallels Cloud Server - All VM data stored in a single directory: config, snapshots, memory dump together with disk images. Let's look through list of VMs and create a storage pool for each

Re: [libvirt] [PATCH v4 06/13] parallels: fix leaks in parallelsFindVolumes

2012-12-10 Thread Daniel Veillard
On Tue, Dec 04, 2012 at 05:43:06PM +0400, Dmitry Guryanov wrote: We always have to close opened dir and free 'path'. Signed-off-by: Dmitry Guryanov dgurya...@parallels.com --- src/parallels/parallels_storage.c | 20 1 files changed, 12 insertions(+), 8 deletions(-)

Re: [libvirt] [PATCH 12/23] Add support for misc host device passthrough with LXC

2012-12-10 Thread Gao feng
on 2012/12/01 04:26, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This extends support for host device passthrough with LXC to cover misc devices. In this case all we need todo is a mknod in the container's /dev and whitelist the device in cgroups Signed-off-by:

Re: [libvirt] [PATCH 0/4] Add new APIs and virsh commands to get/set cpu mode

2012-12-10 Thread Viktor Mihajlovski
On 12/10/2012 06:19 AM, Ichikawa, Ken wrote: Hello. This patchset adds new APIs virDomainGetCPUMode and virDomainSetCPUMode, and adds new virsh commands cpu-getmode and cpu-setmode by using these APIs. virDomainGetCPUMode allows to get cpu mode of a running or persistent domain.

[libvirt] [PATCHv2 0/5] Add API to allow TCP connection tunelling

2012-12-10 Thread Peter Krempa
This series adds ability for the qemu driver to tunnel connections to TCP ports from the host. This is useful for enabling remote VNC/SPICE sessions without the need to configure SSH tunnels or portforwards and without the need to open the ports for public. There's also an advantage for tools

[libvirt] [PATCHv2 1/5] api: Add API to allow TCP tunneling through streams to the host

2012-12-10 Thread Peter Krempa
This patch adds API that will allow to use streams to connect to TCP sockets from the point of view of the host. This API is intended to allow remote display (SPICE/VNC) sessions to managed hosts that prefer not to expose the ports to outer networks and without the need to configure TCP tunneling

[libvirt] [PATCHv2 2/5] fdstream: Add support for TCP connections of streams

2012-12-10 Thread Peter Krempa
This patch adds the backend stuff to enable connecting virStreams to TCP sockets. This patch adds a helper virFDStreamConnectTCP() that does the hostname resolution and prepares the filedescriptor for the stream. --- src/fdstream.c | 73

[libvirt] [PATCHv2 3/5] qemu: Add configuration options to enable TCP tunelling

2012-12-10 Thread Peter Krempa
This patch adds configuration options for the qemu driver to control the behavior of the TCP tunelling API. The behavior can be configured separately for read-write connections and for read-only connections enabling finer granularity of control. --- src/qemu/qemu.conf | 16

[libvirt] [PATCHv2 5/5] NOT_TO_BE_APPLIED_UPSTREAM: quick and dirty virsh client to test the stuff

2012-12-10 Thread Peter Krempa
This patch adds a remote netcat functionality using for example: virsh tcp-console --host localhost --port 1234 --ipv4 --- tools/console.c | 66 tools/console.h | 9 ++- tools/virsh-domain.c | 17 +++---

[libvirt] [PATCHv2 4/5] qemu: Implement virNodeTunnelTcp for the qemu driver

2012-12-10 Thread Peter Krempa
The driver function implemented by this patch checks the configuration if the connection is allowed and opens the connection to the socked using the fdstream handler. --- src/qemu/qemu_driver.c | 48 1 file changed, 48 insertions(+) diff --git

Re: [libvirt] [PATCH] S390: Fix virSysinfoRead memory corruption

2012-12-10 Thread Viktor Mihajlovski
On 12/07/2012 06:57 PM, Eric Blake wrote: No. Don't use index(), as it is not guaranteed to exist. What we should _really_ do is provide a change in m4/virt-compile-warnings.m4 that disables -Wlogical-op if compiling with a broken gcc, now that newer gcc doesn't force its stupidity on a

[libvirt] [PATCH 2/4] conf: add optional attribte primary to video model element

2012-12-10 Thread Guannan Ren
If there are multiple video devices primary = 'yes' marks this video device as the primary one. The rest are secondary video devices. No more than one could be mark as primary. If none of them has primary attribute, the first one will be the primary by default like what it was. The reason of this

[libvirt] [PATCH 1/4] qemu: add qemu various VGA devices Caps flag

2012-12-10 Thread Guannan Ren
QEMU_CAPS_DEVICE_QXL -device qxl QEMU_CAPS_DEVICE_VGA -device VGA QEMU_CAPS_DEVICE_CIRRUS_VGA -device cirrus-vga QEMU_CAPS_DEVICE_VMWARE_SVGA -device vmware-svga Fix a typo in qemuCapsObjectTypes, the string 'qxl' here should be -device qxl rather than -vga [...|qxl|..] ---

[libvirt] [PATCH 0/4]use newer video device by -device in qemu commandline

2012-12-10 Thread Guannan Ren
This patch set aims to use qemu VGA device with -device option to replace -vga option. The mapping is as follows. '-device VGA' maps to '-vga std' '-device cirrus-vga' maps to '-vga cirrus' '-device qxl-vga' maps to '-vga qxl' (there is also '-device qxl' for secondary devices) '-device

[libvirt] [PATCH 3/4] qemu: use newer -device video device in qemu commandline

2012-12-10 Thread Guannan Ren
'-device VGA' maps to '-vga std' '-device cirrus-vga' maps to '-vga cirrus' '-device qxl-vga' maps to '-vga qxl' (there is also '-device qxl' for secondary devices) '-device vmware-svga' maps to '-vga vmware' For the primary video device, we try to use 0x2 slot for matching old qemu.

[libvirt] [PATCH 4/4] doc: add attribute primary doc to video model element

2012-12-10 Thread Guannan Ren
--- docs/formatdomain.html.in | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index c81af8a..3d1fdf4 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -3485,7 +3485,11 @@ qemu-kvm -net

Re: [libvirt] Entering freeze for 1.0.1 tomorrow

2012-12-10 Thread Viktor Mihajlovski
On 12/10/2012 06:31 AM, Daniel Veillard wrote: I'm just back from vacations without any internet access, and didn't really had time to go though the list mail yet. Is there any serious reson to not enter freeze for 1.0.1 tomorrow ? If not I will make the rc1 candidate tomorrow, thanks !

Re: [libvirt] [PATCH 0/4]use newer video device by -device in qemu commandline

2012-12-10 Thread Gerd Hoffmann
Hi, For backwards compatibility, if a certain qemu version does not support one of the above video device arguments to -device or even -device itself, the -vga will still be used. That will not work. You must check the qemu version. 1.2+ is safe, IIRC 1.1 will work too. Technical

[libvirt] [PATCH RESEND] S390: Assign default model virtio for network interfaces

2012-12-10 Thread Viktor Mihajlovski
If a network interface model is not specified, libvirt will run into an unchecked NULL pointer coredump. On the other hand if the empty model is ignored, a PCI bus address would be generated, which is not supported by S390. Since the only valid network type model for S390 is virtio, we use this as

Re: [libvirt] [PATCH] If driver startup fails, dispatch virErrors

2012-12-10 Thread Daniel P. Berrange
On Sat, Dec 08, 2012 at 08:48:55PM -0500, Cole Robinson wrote: API users won't have any way to interact with the errors since this is before a connection pointer is available, but the default error handler at calls VIR_ERROR which gives us a better chance of seeing the issue. ---

Re: [libvirt] [PATCH] If driver startup fails, dispatch virErrors

2012-12-10 Thread Daniel P. Berrange
On Mon, Dec 10, 2012 at 10:19:35AM +, Daniel P. Berrange wrote: On Sat, Dec 08, 2012 at 08:48:55PM -0500, Cole Robinson wrote: API users won't have any way to interact with the errors since this is before a connection pointer is available, but the default error handler at calls

Re: [libvirt] [PATCH 0/4]use newer video device by -device in qemu commandline

2012-12-10 Thread Guannan Ren
On 12/10/2012 05:37 PM, Gerd Hoffmann wrote: Hi, For backwards compatibility, if a certain qemu version does not support one of the above video device arguments to -device or even -device itself, the -vga will still be used. That will not work. You must check the qemu version. 1.2+ is

[libvirt] [PATCHv3 1/2] S390: Add SCLP console front end support

2012-12-10 Thread Viktor Mihajlovski
From: J.B. Joret j...@linux.vnet.ibm.com The SCLP console is the native console type for s390 and is preferred over the virtio console as it doesn't require special drivers and is more efficient. Recent versions of QEMU come with SCLP support which is hereby enabled. The new target types 'sclp'

[libvirt] [PATCHv3 2/2] S390: Enable SCLP Console in QEMU driver

2012-12-10 Thread Viktor Mihajlovski
From: J.B. Joret j...@linux.vnet.ibm.com This is the QEMU backend code for the SCLP console support. It includes SCLP capability detection, QEMU command line generation and a test case. Signed-off-by: J.B. Joret j...@linux.vnet.ibm.com Signed-off-by: Viktor Mihajlovski

[libvirt] [PATCHv3 0/2] S390: Adding support for SCLP Console

2012-12-10 Thread Viktor Mihajlovski
The S390 architecture comes with a native console type (SCLP console) which is now also supported by current QEMU. This series is enabling libvirt to configure S390 domains with SCLP consoles. The domain XML has to be extended for the new console target types 'sclp' and 'sclplm' (line mode =

Re: [libvirt] [PATCH 0/4]use newer video device by -device in qemu commandline

2012-12-10 Thread Gerd Hoffmann
Okay, if so, I prefer 1.2+ to ensure -device VGA work as expected. A question here, all of these four vga device (VGA, cirrus-vga, vmware-svga, qxl-vga) has existed and been supported since 1.2 QEMU version, is it right? Yes. qxl + qxl-vga have a compile time dependency on

[libvirt] ANNOUNCE: Release of libvirt-sandbox version 0.1.1

2012-12-10 Thread Daniel P. Berrange
I pleased to announce the a new public release of libvirt-sandbox, version 0.1.1, is now available for download ftp://libvirt.org/libvirt/sandbox/ The packages are GPG signed with Key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF (4096R) The libvirt-sandbox package

Re: [libvirt] Entering freeze for 1.0.1 tomorrow

2012-12-10 Thread Daniel Veillard
On Mon, Dec 10, 2012 at 09:43:51AM +0100, Viktor Mihajlovski wrote: On 12/10/2012 06:31 AM, Daniel Veillard wrote: I'm just back from vacations without any internet access, and didn't really had time to go though the list mail yet. Is there any serious reson to not enter freeze for 1.0.1

Re: [libvirt] [PATCH 0/4] Add new APIs and virsh commands to get/set cpu mode

2012-12-10 Thread Jiri Denemark
On Mon, Dec 10, 2012 at 09:28:06 +0100, Viktor Mihajlovski wrote: On 12/10/2012 06:19 AM, Ichikawa, Ken wrote: This patchset adds new APIs virDomainGetCPUMode and virDomainSetCPUMode, and adds new virsh commands cpu-getmode and cpu-setmode by using these APIs. virDomainGetCPUMode allows

Re: [libvirt] [PATCH 0/4] Add new APIs and virsh commands to get/set cpu mode

2012-12-10 Thread Daniel P. Berrange
On Mon, Dec 10, 2012 at 02:52:33PM +0100, Jiri Denemark wrote: On Mon, Dec 10, 2012 at 09:28:06 +0100, Viktor Mihajlovski wrote: On 12/10/2012 06:19 AM, Ichikawa, Ken wrote: This patchset adds new APIs virDomainGetCPUMode and virDomainSetCPUMode, and adds new virsh commands cpu-getmode

Re: [libvirt] [PATCH RESEND] S390: Assign default model virtio for network interfaces

2012-12-10 Thread Michal Privoznik
On 10.12.2012 11:00, Viktor Mihajlovski wrote: If a network interface model is not specified, libvirt will run into an unchecked NULL pointer coredump. On the other hand if the empty model is ignored, a PCI bus address would be generated, which is not supported by S390. Since the only valid

[libvirt] [PATCH] qemu: assume seccomp sandbox is supported since qemu 1.2

2012-12-10 Thread Ján Tomko
Currently there is no way to detect it via QMP and requesting -sandbox off works correctly even if it was compiled out, so this will work unless someone both requests the sandbox in qemu.conf and builds QEMU without the support for it. --- Relevant discussion in qemu-devel:

Re: [libvirt] [PATCH RESEND] S390: Assign default model virtio for network interfaces

2012-12-10 Thread Viktor Mihajlovski
On 12/10/2012 03:15 PM, Michal Privoznik wrote: On 10.12.2012 11:00, Viktor Mihajlovski wrote: If a network interface model is not specified, libvirt will run into an unchecked NULL pointer coredump. On the other hand if the empty model is ignored, a PCI bus address would be generated, which is

Re: [libvirt] [PATCH 00/23] Improve device support for LXC

2012-12-10 Thread Daniel P. Berrange
On Fri, Nov 30, 2012 at 08:26:14PM +, Daniel P. Berrange wrote: This series makes some major improvements to the device support for LXC - USB, block and char device passthrough - Hotplug/unplug support for disk, nic, usb, block and char devices I'd like to have this series in the

[libvirt] [PATCH] qemu: eliminate bogus error log when changing netdev's bridge

2012-12-10 Thread Laine Stump
This fixes a problem that showed up during testing of: https://bugzilla.redhat.com/show_bug.cgi?id=881480 Due to a logic error in the function that gets the name of the bridge an interface connects to, any time a bridge was specified directly (type='bridge') rather than indirectly

Re: [libvirt] [PATCH v0] qemu driver FreeBSD support

2012-12-10 Thread Eric Blake
On 12/09/2012 10:17 AM, Roman Bogorodskiy wrote: Hello, Attached an initial version of the patch providing FreeBSD support for qemu driver. Initial discussion on the topic started here: https://www.redhat.com/archives/libvir-list/2012-November/msg00841.html As I mentioned on IRC, it is

Re: [libvirt] [PATCH] qemu: eliminate bogus error log when changing netdev's bridge

2012-12-10 Thread Peter Krempa
On 12/10/12 18:45, Laine Stump wrote: This fixes a problem that showed up during testing of: https://bugzilla.redhat.com/show_bug.cgi?id=881480 Due to a logic error in the function that gets the name of the bridge an interface connects to, any time a bridge was specified directly

Re: [libvirt] [PATCH v0] qemu driver FreeBSD support

2012-12-10 Thread Daniel P. Berrange
On Sun, Dec 09, 2012 at 09:17:01PM +0400, Roman Bogorodskiy wrote: Hello, Attached an initial version of the patch providing FreeBSD support for qemu driver. Initial discussion on the topic started here: https://www.redhat.com/archives/libvir-list/2012-November/msg00841.html Roman

Re: [libvirt] [PATCH 01/23] Slightly refactor hostdev parsing / formating

2012-12-10 Thread Eric Blake
On 11/30/2012 01:26 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Rename virDomainHostdevPartsParse to virDomainHostdevDefParseSubsys to reflect the fact that it only deals with hostdevs uing the traditional mode=subsystem, and not mode=capabilities Rename

[libvirt] [PATCH v2 05/11] qemu: Introduce nbd-server-stop command

2012-12-10 Thread Michal Privoznik
This will be used after all migration work is done to stop NBD server running on destination. It doesn't take any arguments, just issues a command. --- src/qemu/qemu_monitor.c | 19 +++ src/qemu/qemu_monitor.h |1 + src/qemu/qemu_monitor_json.c | 21

[libvirt] [PATCH v2 09/11] qemu_migration: Implement qemuMigrationDriveMirror

2012-12-10 Thread Michal Privoznik
This function does the source part of NBD magic. It invokes drive-mirror on each non shared disk and wait till the mirroring process completes. When it does we can proceed with migration. Currently, an active waiting is done: every 50ms libvirt asks qemu if block-job is finished or not. However,

[libvirt] [PATCH v2 07/11] qemu_migration: Move port allocation to a separate func

2012-12-10 Thread Michal Privoznik
There's a code snippet which allocates a port for incoming migration. We will need this for allocating a port for incoming disks as well. Hence, move this snippet into a separate function called qemuMigrationNextPort(). --- src/qemu/qemu_migration.c | 19 +-- 1 files changed, 13

[libvirt] [PATCH v2 08/11] qemu_migration: Implement qemuMigrationStartNBDServer()

2012-12-10 Thread Michal Privoznik
We need to start NBD server and feed it with all non-shared/ disks. However, after qemuDomainObjEnterMonitorAsync the domain object is unlocked so we cannot touch its disk definitions. Therefore, we must prepare the list of disk IDs prior entering monitor. --- src/qemu/qemu_migration.c | 59

[libvirt] [PATCH v2 10/11] qemu_migration: Check size prerequisites

2012-12-10 Thread Michal Privoznik
With new NBD storage migration approach there are several requirements that need to be meet for successful use of the feature. One of them is - the file representing a disk, needs to have at least same size as on the source. Hence, we must transfer a list of pairs [disk source, size] and check on

[libvirt] [PATCH v2 11/11] qemu_migration: Stop NBD server at Finish phase

2012-12-10 Thread Michal Privoznik
At the end of migration, it is important to stop NBD server and thus release all allocated resources. --- src/qemu/qemu_migration.c | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

[libvirt] [PATCH v2 06/11] qemu_migration: Introduce qemuMigrationStartNBDServer

2012-12-10 Thread Michal Privoznik
This is a stub internal API just for now. Its purpose in life is to start NBD server and feed it with all domain disks. When adding a disk to NBD server, it is addressed via its alias (id= param on qemu command line). --- src/qemu/qemu_driver.c|8 +++--- src/qemu/qemu_migration.c | 59

[libvirt] [PATCH v2 02/11] Introduce NBD migration cookie

2012-12-10 Thread Michal Privoznik
This migration cookie is meant for two purposes. The first is to be sent in begin phase from source to destination to let it know we support new implementation of VIR_MIGRATE_NON_SHARED_{DISK,INC} so destination can start NBD server. Then, the second purpose is, destination can let us know, on

[libvirt] [PATCH v2 03/11] qemu: Introduce nbd-server-start command

2012-12-10 Thread Michal Privoznik
This will be used with new migration scheme. This patch creates basically just monitor stub functions. Wiring them into something useful is done in later patches. --- src/qemu/qemu_monitor.c | 22 ++ src/qemu/qemu_monitor.h |3 ++ src/qemu/qemu_monitor_json.c |

[libvirt] [PATCH v2 01/11] qemu: Introduce NBD_SERVER capability

2012-12-10 Thread Michal Privoznik
This just keeps track whether qemu knows nbd-server-* commands so we can use it during migration or not. --- src/qemu/qemu_capabilities.c |3 +++ src/qemu/qemu_capabilities.h |1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH v2 04/11] qemu: Introduce nbd-server-add command

2012-12-10 Thread Michal Privoznik
This will be used with new migration scheme. This patch creates basically just monitor stub functions. Wiring them into something useful is done in later patches. --- src/qemu/qemu_monitor.c | 22 ++ src/qemu/qemu_monitor.h |3 +++ src/qemu/qemu_monitor_json.c

[libvirt] [PATCH v2 00/11] Rework storage migration

2012-12-10 Thread Michal Privoznik
This patch set re-implements migration with storage for enough new qemu. Currently, you can migrate a domain to a host without need for shared storage. This is done by setting 'blk' or 'inc' attribute (representing VIR_MIGRATE_NON_SHARED_DISK and VIR_MIGRATE_NON_SHARED_INC flags respectively) of

Re: [libvirt] [PATCH v0] qemu driver FreeBSD support

2012-12-10 Thread Jiri Denemark
On Mon, Dec 10, 2012 at 18:23:05 +, Daniel P. Berrange wrote: On Sun, Dec 09, 2012 at 09:17:01PM +0400, Roman Bogorodskiy wrote: Hello, Attached an initial version of the patch providing FreeBSD support for qemu driver. Initial discussion on the topic started here:

[libvirt] [PATCHv4 04/17] conf: use VIR_(APPEND|DELETE)_ELEMENT for domain device lists

2012-12-10 Thread Laine Stump
The convenience macros replace manual alloc/movement except in cases where the list has been pre-allocated to the necessary size, *and* a new item is just being appended - in that case it's just as concise (and arguably easier to interpret) to leave it as is - a simple direct assignment

[libvirt] [PATCHv4 02/17] conf: use VIR_(INSERT|DELETE)_ELEMENT in virNetworkUpdate backend

2012-12-10 Thread Laine Stump
The already-written backend functions for virNetworkUpdate that add and delete items into lists within the a network were already debugged to work properly, but future such functions will use VIR_(INSERT|DELETE)_ELEMENT instead, so these are changed for uniformity. --- src/conf/network_conf.c |

[libvirt] [PATCHv4 12/17] rpc: use VIR_(APPEND|DELETE)_ELEMENT for netserver client lists

2012-12-10 Thread Laine Stump
The pointer in client continues to be used after the APPEND is done, so we must use the _COPY variant of the append macro. --- src/rpc/virnetserver.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c index

[libvirt] [PATCHv4 10/17] util: use VIR_(APPEND|DELETE)_ELEMENT for win32 waiting events list

2012-12-10 Thread Laine Stump
--- src/util/threads-win32.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/util/threads-win32.c b/src/util/threads-win32.c index 142aa4f..63d26e9 100644 --- a/src/util/threads-win32.c +++ b/src/util/threads-win32.c @@ -1,7 +1,7 @@ /* *

[libvirt] [PATCHv4 11/17] rpc: use VIR_DELETE_ELEMENT for list of netclient streams

2012-12-10 Thread Laine Stump
--- src/rpc/virnetclient.c | 21 - 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index bf2547c..0184998 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -923,25 +923,12 @@ void

[libvirt] [PATCHv4 14/17] nwfilter: use VIR_(APPEND|DELETE)_ELEMENT for lists

2012-12-10 Thread Laine Stump
There are a few lists in the nwfilter data structures that lend themselves to using the new convenience macros. Note that this patch incidentally fixes what appears to be a bug in virNWFilterUnRegisterCallbackDriver - it was finding an entry to delete, adjusting the array to get rid of it, then

[libvirt] [PATCHv4 01/17] util: add VIR_(APPEND|INSERT|DELETE)_ELEMENT

2012-12-10 Thread Laine Stump
I noticed when writing the backend functions for virNetworkUpdate that I was repeating the same sequence of memmove, VIR_REALLOC, nXXX-- (and messed up the args to memmove at least once), and had seen the same sequence in a lot of other places, so I decided to write a few utility functions/macros

[libvirt] [PATCHv4 07/17] xen: Use VIR_DELETE_ELEMENT for disk/net devices

2012-12-10 Thread Laine Stump
The stock remove functions in domain_conf.c already use VIR_DELETE_ELEMENT. This does the same in a xen file. --- src/xen/xm_internal.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c index 9da2974..aac9ec5 100644

[libvirt] [PATCHv4 08/17] xen: use VIR_DELETE_ELEMENT for xen domain and watch lists

2012-12-10 Thread Laine Stump
Replaces memmove/VIR_REALLOC_N for xenUnifiedDomainList and XenStoreWatchList. --- src/xen/xen_driver.c | 14 +- src/xen/xen_driver.h | 4 ++-- src/xen/xen_inotify.c | 16 +++- src/xen/xs_internal.c | 13 + src/xen/xs_internal.h | 2 +- 5 files changed, 8

[libvirt] [PATCHv4 06/17] conf: use VIR_(APPEND|DELETE)_ELEMENT for vcpupin list

2012-12-10 Thread Laine Stump
nvcpupin was declared as int, as were the nvcpupin args in several functions. These were all changed to size_t. virDomainVcpuPinAdd() was leaking a cpumask if VIR_REALLOC_N failed. This is completely inconsequential (since the only reason for failure was OOM, so we would already be dead at this

[libvirt] [PATCHv2 5/7] conf: make virNetworkIpDefClear consistent with other functions

2012-12-10 Thread Laine Stump
The other clear functions in network_conf.c that clear out arrays of sub-objects do so by using the n[itemname]s value as a counter going down to 0. Make this one consistent. There's no functional value, just makes the style more consistent with the rest of the file. --- src/conf/network_conf.c |

[libvirt] [PATCHv2 2/7] conf: clear and parse functions for dns host/srv/txt records

2012-12-10 Thread Laine Stump
Since there is only a single virNetworkDNSDef for any virNetworkDef, and it's trivial to determine whether or not it contains any real data, it's much simpler (and fits more uniformly with the parse function calling sequence of the parsers for many other objects that are subordinates of

[libvirt] [PATCHv4 05/17] conf: use VIR_(APPEND|DELETE)_ELEMENT for domain event lists

2012-12-10 Thread Laine Stump
--- src/conf/domain_event.c | 51 - src/qemu/qemu_domain.c | 6 ++ 2 files changed, 10 insertions(+), 47 deletions(-) diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c index cf37308..3bae1c9 100644 --- a/src/conf/domain_event.c

[libvirt] [PATCHv4 00/17] new VIR_(APPEND|INSERT|DELETE)_ELEMENT macros

2012-12-10 Thread Laine Stump
DO NOT BE SCARED OFF BY THE PATCH COUNT!! Most of these are very short, and they all follow the same pattern; beyond that, 01/17 and 02/17 are the only ones that I really want to push now; the others are so far only for informational purposes (although you can apply them locally if you want :-)

[libvirt] [PATCHv4 15/17] util: eliminate leak in ebtables

2012-12-10 Thread Laine Stump
When ebtRulesAppend failed its realloc, it was free'ing the argv it had been send, but not the rules. The caller also didn't free the rules. This is kind of a lost cause, since it's a leak that only occurs after a failure to allocate memory, but the fix also gives the ebtRuleFree function a more

[libvirt] [PATCHv2 3/7] network: backend functions for updating network dns host/srv/txt

2012-12-10 Thread Laine Stump
These three functions are very similar - none allow a MODIFY operation; you can only add or delete. The biggest difference between them (other than the data itself) is in the criteria for determining a match, and whether or not multiple matches are possible: 1) for HOST records, it's considered

[libvirt] [PATCHv2 6/7] conf: put data for network forward element into its own struct

2012-12-10 Thread Laine Stump
The attributes of a network element's forward element were previously stored directly in the virNetworkDef object, but virNetworkUpdateForward() needs to operate on a forward in isolation, so this patchs pulls out all those attributes into a separate virNetworkForwardDef struct (and shortens their

[libvirt] [PATCHv2 7/7] conf: split forward parser/clear into separate functions

2012-12-10 Thread Laine Stump
virNetworkDefUpdateForward requires separate functions to parse and clear a virNetworkForwardDef by itself, but they were previously just inlined in the virNetworkDef parse and free functions. This patch makes them into separate functions. --- src/conf/network_conf.c | 515

[libvirt] [PATCHv2 0/7] refactoring network xml parsing + net-update additions

2012-12-10 Thread Laine Stump
Patches 1,2, and 4-7 refactor the network XML parsing functions to have a more uniform calling sequence for different subelements of network. This makes it simpler to write new virNetworkUpdate*() backend functions for those bits (because they're then more similar to existing functions.) Patch 3

[libvirt] [PATCHv4 13/17] test: use VIR_(APPEND|DELETE)_ELEMENT for qemuMonitorTest list

2012-12-10 Thread Laine Stump
--- tests/qemumonitortestutils.c | 23 +++ 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index b55d867..f27fc4b 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -135,15

[libvirt] [PATCHv4 17/17] util: use VIR_(APPEND|DELETE)_ELEMENT for lock owners lists

2012-12-10 Thread Laine Stump
--- src/util/virlockspace.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/util/virlockspace.c b/src/util/virlockspace.c index 99b6182..dc156f8 100644 --- a/src/util/virlockspace.c +++ b/src/util/virlockspace.c @@ -223,11 +223,9 @@

[libvirt] [PATCHv2 4/7] conf: rename some labels and functions in network_conf

2012-12-10 Thread Laine Stump
This makes some function names and arg lists for consistent with other parse functions in network_conf.c. While modifying virNetworkIPParseXML(), also change its error label to cleanup, since the code at that label is executed on success as well as failure. --- src/conf/network_conf.c | 86

[libvirt] [PATCHv4 03/17] conf: use VIR_DELETE_ELEMENT for conf object lists

2012-12-10 Thread Laine Stump
The volume object list is also directly manipulated in the storage driver, test storage driver, and parallels storage driver (this should probably be consolidated). --- src/conf/interface_conf.c | 13 ++--- src/conf/interface_conf.h | 4 ++-- src/conf/network_conf.c

[libvirt] [PATCHv2 1/7] conf: rename network dns host/srv/txt arrays

2012-12-10 Thread Laine Stump
This shortens the name of the structs for srv and txt, and their instances in virNetworkDNSDef, to be more compact and uniform with the naming of the dns host array. --- src/conf/network_conf.c | 102 ++-- src/conf/network_conf.h | 32

[libvirt] [PATCHv4 09/17] util: use VIR_(APPEND|DELETE)_ELEMENT for pci/usb device lists

2012-12-10 Thread Laine Stump
In both pci and usb cases, the count that held the size of the list was int so it had to be changed to size_t. --- src/util/hostusb.c | 26 +++--- src/util/pci.c | 18 +++--- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/src/util/hostusb.c

[libvirt] [PATCHv4 16/17] util: use VIR_(APPEND|DELETE)_ELEMENT for ebtables rule lists

2012-12-10 Thread Laine Stump
--- src/util/ebtables.c | 10 ++ src/util/ebtables.h | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/util/ebtables.c b/src/util/ebtables.c index d3a8432..a8bbd94 100644 --- a/src/util/ebtables.c +++ b/src/util/ebtables.c @@ -114,11 +114,10 @@

Re: [libvirt] [PATCH v16] support offline migration

2012-12-10 Thread Jiri Denemark
On Fri, Dec 07, 2012 at 14:13:06 -0500, Laine Stump wrote: On 12/07/2012 10:08 AM, Jiri Denemark wrote: From: liguang lig.f...@cn.fujitsu.com original migration did not aware of offline case, so, try to support offline migration quietly (did not disturb original migration) by pass

[libvirt] virDomainSetMetadata -- qemuDomainSetMetadata

2012-12-10 Thread SHAH, Ronak (Ronak R)
Hi, I have requirement to add metadata tag into the libvirt XML from the application. While calling virDomainSetMetadata which internally call qemuDomainSetMetadata (correct me here if I am wrong), I am getting following error: qemuDomainSetMetdata:12623 : argument unsupported: QEMU driver

Re: [libvirt] [PATCHv4 02/17] conf: use VIR_(INSERT|DELETE)_ELEMENT in virNetworkUpdate backend

2012-12-10 Thread Eric Blake
On 12/10/2012 02:20 PM, Laine Stump wrote: The already-written backend functions for virNetworkUpdate that add and delete items into lists within the a network were already debugged to work properly, but future such functions will use VIR_(INSERT|DELETE)_ELEMENT instead, so these are changed

  1   2   >