Re: [libvirt] Downloading and wiping assumes volume is a device or file

2012-03-02 Thread Wido den Hollander
Hi, On 02/09/2012 09:27 PM, Eric Blake wrote: On 02/09/2012 01:04 PM, Wido den Hollander wrote: Hi, I'm still working on the RBD (RADOS / Ceph) storage driver for libvirt and I noticed the virStorageVolDownload and virStorageVolWipe methods. I assumed those would be passed on to the storage

Re: [libvirt] [PATCH] util: combine three bools in virNetDevTapCreateInBridgePort into one flags

2012-03-02 Thread Laine Stump
On 03/01/2012 03:59 PM, Eric Blake wrote: On 03/01/2012 01:48 PM, Laine Stump wrote: With an additional new bool added to determine whether or not to discourage the use of the supplied MAC address by the bridge itself, virNetDevTapCreateInBridgePort had three booleans (well, 2 bools and an

Re: [libvirt] [PATCH] Use the same MAC address that is defined in domain XML for attached-mac field.

2012-03-02 Thread Laine Stump
On 02/16/2012 06:49 PM, Ansis Atteka wrote: Currently libvirt sets the attached-mac to altered MAC address that has first byte set to FE. This patch will change that behavior by using the original (unaltered) MAC address from the domain XML configuration file. Okay, after much discussion, and

Re: [libvirt] [Patch]: spice agent-mouse support

2012-03-02 Thread Daniel P. Berrange
On Fri, Mar 02, 2012 at 09:06:20AM +0800, Zhou Peng wrote: On Thu, Mar 1, 2012 at 5:32 PM, Daniel P. Berrange berra...@redhat.com wrote: On Thu, Mar 01, 2012 at 11:54:30AM +0800, Zhou Peng wrote: Signed-off-by: Zhou Peng zhoup...@nfs.iscas.ac.cn spice agent-mouse support diff --git

Re: [libvirt] [PATCH] build: prohibit cross-inclusion

2012-03-02 Thread Daniel P. Berrange
On Thu, Mar 01, 2012 at 05:40:19PM -0700, Eric Blake wrote: Make it easier to detect invalid cross-directory includes, by adding a syntax check. The check is designed to be extensible: the default case lists only the non-driver directories, and specific directories can list a different set

Re: [libvirt] [Patch]: spice agent-mouse support

2012-03-02 Thread Zhou Peng
On Fri, Mar 2, 2012 at 5:58 PM, Daniel P. Berrange berra...@redhat.com wrote: On Fri, Mar 02, 2012 at 09:06:20AM +0800, Zhou Peng wrote: On Thu, Mar 1, 2012 at 5:32 PM, Daniel P. Berrange berra...@redhat.com wrote: On Thu, Mar 01, 2012 at 11:54:30AM +0800, Zhou Peng wrote: Signed-off-by:

Re: [libvirt] [PATCH 1/2] build: use correct type for pid and similar types

2012-03-02 Thread Peter Krempa
On 02/11/2012 12:55 AM, Eric Blake wrote: No thanks to 64-bit windows, with 64-bit pid_t, we have to avoid constructs like 'int pid'. Our API in libvirt-qemu cannot be changed without breaking ABI; but then again, libvirt-qemu can only be used on systems that support UNIX sockets, which rules

Re: [libvirt] [PATCH 1/2] build: use correct type for pid and similar types

2012-03-02 Thread Eric Blake
On 03/02/2012 05:42 AM, Peter Krempa wrote: Sorry for remembering really late to review your patch. No problem. There's still some work to do to get things happy now that F17 has switched cross toolchains to mingw64. diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index

Re: [libvirt] [PATCH 2/2] build: fix output of pid values

2012-03-02 Thread Peter Krempa
On 02/11/2012 12:55 AM, Eric Blake wrote: Nuke the last vestiges of printing pid_t values with the wrong types, at least in code compiled on mingw64. There may be other places, but for now they are only compiled on systems where the existing %d doesn't trigger gcc warnings. *

Re: [libvirt] [PATCH] build: prohibit cross-inclusion

2012-03-02 Thread Eric Blake
On 03/02/2012 03:01 AM, Daniel P. Berrange wrote: On Thu, Mar 01, 2012 at 05:40:19PM -0700, Eric Blake wrote: Make it easier to detect invalid cross-directory includes, by adding a syntax check. The check is designed to be extensible: the default case lists only the non-driver directories,

Re: [libvirt] [PATCH] build: prohibit cross-inclusion

2012-03-02 Thread Daniel P. Berrange
On Fri, Mar 02, 2012 at 06:40:57AM -0700, Eric Blake wrote: On 03/02/2012 03:01 AM, Daniel P. Berrange wrote: On Thu, Mar 01, 2012 at 05:40:19PM -0700, Eric Blake wrote: Make it easier to detect invalid cross-directory includes, by adding a syntax check. The check is designed to be

Re: [libvirt] [PATCH] build: prohibit cross-inclusion

2012-03-02 Thread Laine Stump
On 03/01/2012 07:40 PM, Eric Blake wrote: Make it easier to detect invalid cross-directory includes, by adding a syntax check. The check is designed to be extensible: the default case lists only the non-driver directories, and specific directories can list a different set (for example, util/

Re: [libvirt] [PATCH 2/2] build: fix output of pid values

2012-03-02 Thread Eric Blake
On 03/02/2012 06:00 AM, Peter Krempa wrote: On 02/11/2012 12:55 AM, Eric Blake wrote: Nuke the last vestiges of printing pid_t values with the wrong types, at least in code compiled on mingw64. There may be other places, but for now they are only compiled on systems where the existing %d

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Gerhard Stenzel
On Thu, 2012-03-01 at 13:02 -0500, Laine Stump wrote: In the case of hostdev though, there is not necessarily any netdev driver at all in the host (and thus no linkdev to attach a macvtap to), certainly not after it's attached to the guest - control of the PCI device is given over to the

[libvirt] [PATCH] daemon: Remove deprecated HAL from init script dependencies

2012-03-02 Thread Peter Krempa
The init script for the daemon requests to start HAL although it has been deprecated long time ago. This patch removes the dependency. --- daemon/libvirtd.init.in |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/daemon/libvirtd.init.in b/daemon/libvirtd.init.in index

Re: [libvirt] [PATCH] daemon: Remove deprecated HAL from init script dependencies

2012-03-02 Thread Eric Blake
On 03/02/2012 08:33 AM, Peter Krempa wrote: The init script for the daemon requests to start HAL although it has been deprecated long time ago. This patch removes the dependency. --- daemon/libvirtd.init.in |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [PATCH] daemon: Remove deprecated HAL from init script dependencies

2012-03-02 Thread Peter Krempa
On 03/02/2012 04:38 PM, Eric Blake wrote: On 03/02/2012 08:33 AM, Peter Krempa wrote: The init script for the daemon requests to start HAL although it has been deprecated long time ago. This patch removes the dependency. --- daemon/libvirtd.init.in |1 - 1 files changed, 0 insertions(+),

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Laine Stump
On 03/02/2012 09:12 AM, Gerhard Stenzel wrote: On Thu, 2012-03-01 at 13:02 -0500, Laine Stump wrote: In the case of hostdev though, there is not necessarily any netdev driver at all in the host (and thus no linkdev to attach a macvtap to), certainly not after it's attached to the guest -

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Stefan Berger
On 03/02/2012 10:52 AM, Laine Stump wrote: On 03/02/2012 09:12 AM, Gerhard Stenzel wrote: On Thu, 2012-03-01 at 13:02 -0500, Laine Stump wrote: In the case of hostdev though, there is not necessarily any netdev driver at all in the host (and thus no linkdev to attach a macvtap to), certainly

Re: [libvirt] [PATCH] Attach vm-uuid to Open vSwitch interfaces.

2012-03-02 Thread Kyle Mestery (kmestery)
On Mar 1, 2012, at 11:51 PM, Ansis Atteka wrote: This patch will allow OpenFlow controllers to identify which interface belongs to a particular VM by using the Domain UUID. ovs-vsctl get Interface vnet0 external_ids {attached-mac=52:54:00:8C:55:2C,

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Gerhard Stenzel
On Fri, 2012-03-02 at 10:52 -0500, Laine Stump wrote: Again, my knowledge is insufficient to understand - why was a vlanid not necessary before when we were dealing with a hostside macvtap tied to a guest-side emulated netdev, and why is it necessary now that we want to just passthrough the

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Stefan Berger
On 03/02/2012 11:37 AM, Gerhard Stenzel wrote: Letting the guest do the association is an option, which should work already (even if noone probably tested it yet), but the question is really how much control should the host have vs the guest. There are definitely scenarios thinkable where the

Re: [libvirt] [PATCH 0/4] Support mac and port profile for interface type='hostdev'

2012-03-02 Thread Laine Stump
On 03/01/2012 04:02 AM, Roopa Prabhu wrote: This patch series is based on laines patches to support interface type='hostdev'. https://www.redhat.com/archives/libvir-list/2012-February/msg01126.html It support to set mac and port profile on an interface of type hostdev. * If virtualport is

[libvirt] Rebélate by self-management, first project of free software by which we bet all / Rebélate por la autogestión, primer proyecto de software libre por el que apostamos todas

2012-03-02 Thread Orquidea Salt mas
Inglés : Many already we have contributed to the first project of free software dedicated to self-management in this campaign of collective financing, it collaborates and it spreads!/ Beginning campaign collective financing

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Laine Stump
On 03/02/2012 11:58 AM, Stefan Berger wrote: On 03/02/2012 11:37 AM, Gerhard Stenzel wrote: Letting the guest do the association is an option, which should work already (even if noone probably tested it yet), but the question is really how much control should the host have vs the guest. There

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Gerhard Stenzel
On Fri, 2012-03-02 at 10:52 -0500, Laine Stump wrote: 1) Currently it requires a PCI address (although I plan to add the ability to accept a netdev name and automatically convert it to a PCI address): source address type='pci' domain='0' bus='0' slot='6' function='0'/ /source

Re: [libvirt] [PATCH 0/4] Support mac and port profile for interface type='hostdev'

2012-03-02 Thread Roopa Prabhu
On 3/2/12 11:04 AM, Laine Stump la...@laine.org wrote: On 03/01/2012 04:02 AM, Roopa Prabhu wrote: This patch series is based on laines patches to support interface type='hostdev'. https://www.redhat.com/archives/libvir-list/2012-February/msg01126.html It support to set mac and port

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Roopa Prabhu
On 3/2/12 11:27 AM, Laine Stump la...@laine.org wrote: On 03/02/2012 11:58 AM, Stefan Berger wrote: On 03/02/2012 11:37 AM, Gerhard Stenzel wrote: Letting the guest do the association is an option, which should work already (even if noone probably tested it yet), but the question is

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Gerhard Stenzel
On Fri, 2012-03-02 at 14:27 -0500, Laine Stump wrote: So, at the end of this, is there *any* 802.1QbX mode that can work using PCI passthrough without at least one of the following things: 1) a macvtap interface on the host. (what about my idea of attaching a macvtap interface to the PF?

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Roopa Prabhu
On 3/2/12 9:21 AM, Gerhard Stenzel gsten...@linux.vnet.ibm.com wrote: On Fri, 2012-03-02 at 14:27 -0500, Laine Stump wrote: So, at the end of this, is there *any* 802.1QbX mode that can work using PCI passthrough without at least one of the following things: 1) a macvtap interface on

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Stefan Berger
On 03/02/2012 12:05 PM, Gerhard Stenzel wrote: On Fri, 2012-03-02 at 10:52 -0500, Laine Stump wrote: 1) Currently it requires a PCI address (although I plan to add the ability to accept a netdev name and automatically convert it to a PCI address): source address type='pci' domain='0'

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Laine Stump
On 03/02/2012 03:16 PM, Roopa Prabhu wrote: On 3/2/12 11:27 AM, Laine Stump la...@laine.org wrote: On 03/02/2012 11:58 AM, Stefan Berger wrote: On 03/02/2012 11:37 AM, Gerhard Stenzel wrote: Letting the guest do the association is an option, which should work already (even if noone probably

[libvirt] [PATCH] rpc: Fix client crash on connection close

2012-03-02 Thread Jiri Denemark
A multi-threaded client with event loop may crash if one of its threads closes a connection while event loop is in the middle of sending keep-alive message (either request or response). The right place for it is inside virNetClientIOEventLoop() between poll() and virNetClientLock(). We should only

Re: [libvirt] [PATCH 0/4] Support mac and port profile for interface type='hostdev'

2012-03-02 Thread Laine Stump
On 03/02/2012 03:03 PM, Roopa Prabhu wrote: On 3/2/12 11:04 AM, Laine Stump la...@laine.org wrote: On 03/01/2012 04:02 AM, Roopa Prabhu wrote: This patch series is based on laines patches to support interface type='hostdev'.

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Roopa Prabhu
On 3/2/12 12:45 PM, Laine Stump la...@laine.org wrote: On 03/02/2012 03:16 PM, Roopa Prabhu wrote: On 3/2/12 11:27 AM, Laine Stump la...@laine.org wrote: On 03/02/2012 11:58 AM, Stefan Berger wrote: On 03/02/2012 11:37 AM, Gerhard Stenzel wrote: Letting the guest do the association is an

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Gerhard Stenzel
On Fri, 2012-03-02 at 15:45 -0500, Laine Stump wrote: Okay, then in the end these patches will support 802.1Qbh virtualport setting, as well as setting the MAC address (but only for SRIOV-capable devices). And any future support for 802.1Qbg would require both some extra support outside

Re: [libvirt] [PATCH] rpc: Fix client crash on connection close

2012-03-02 Thread Eric Blake
On 03/02/2012 01:49 PM, Jiri Denemark wrote: A multi-threaded client with event loop may crash if one of its threads closes a connection while event loop is in the middle of sending keep-alive message (either request or response). The right place for it is inside virNetClientIOEventLoop()

Re: [libvirt] [PATCH 0/4] Support mac and port profile for interface type='hostdev'

2012-03-02 Thread Roopa Prabhu
On 3/2/12 12:54 PM, Laine Stump la...@laine.org wrote: On 03/02/2012 03:03 PM, Roopa Prabhu wrote: On 3/2/12 11:04 AM, Laine Stump la...@laine.org wrote: On 03/01/2012 04:02 AM, Roopa Prabhu wrote: This patch series is based on laines patches to support interface type='hostdev'.

[libvirt] [PATCH 1/3] virsh: add option aliases

2012-03-02 Thread Eric Blake
In the past, we have created some virsh options with less-than-stellar names. For back-compat reasons, those names must continue to parse, but we don't want to document them in help output. This introduces a new option type, an alias, which points to a canonical option name later in the option

[libvirt] [PATCH 0/3] virsh: add command and option aliases

2012-03-02 Thread Eric Blake
I'm tired of publicizing typos. These patches preserve full back-compat (scripts that used the old spelling will continue to work), we just don't document the old spellings. I started this patch because we have the memory commands that take a --kilobyte argument when they really mean KiB

[libvirt] [PATCH 2/3] virsh: use option aliases

2012-03-02 Thread Eric Blake
Command line interfaces should use dash, not underscore, as many keyboard layouts allow that to be typed with fewer shift key presses. Also, the US spelling of --tunneled gets more google hits than the UK spelling of --tunnelled. * tools/virsh.c (opts_migrate): Allow US variant.

[libvirt] [PATCH 3/3] virsh: add command aliases, and rename nodedev-detach

2012-03-02 Thread Eric Blake
Just because our public API has a typo doesn't mean that virsh has to keep the typo. * tools/virsh.c (VSH_CMD_FLAG_ALIAS): New flag. (nodedevCmds): Use it. (cmdHelp): Omit alias commands. (cmdNodeDeviceDettach): Rename... (cmdNodeDeviceDetach): ...to this. * tools/virsh.pod (nodedev-detach):

Re: [libvirt] [PATCH] qemu: Don't parse device twice in attach/detach

2012-03-02 Thread Eric Blake
On 03/01/2012 11:56 AM, Michal Privoznik wrote: Some nits are generated during XML parse (e.g. MAC address of This reads awkwardly; how about: s/nits/members/ an interface); However, with current implementation, if we are plugging a device both to persistent and live config, we parse given

Re: [libvirt] [PATCH v2] libvirt-guests: Add parallel startup and shutdown of guests

2012-03-02 Thread Eric Blake
On 03/01/2012 07:23 AM, Peter Krempa wrote: With this patch, it's possible to shut down guests in parallel. Parallel startup was possible before, but this functionality was not documented properly. To enable parallel startup set the START_DELAY to 0. Parallel shutdown has a configurable

Re: [libvirt] [PATCH] cpu: Add new flag supported by qemu to the cpu definition

2012-03-02 Thread Eric Blake
On 02/29/2012 07:53 AM, Peter Krempa wrote: Some new cpu features were added to qemu. This patch adds some of them to our CPU map. --- to ease review, here's an excerpt from qemu.git/target-i386/cpuid.c to ease the review: static const char *ext3_feature_name[] = { lahf_lm /* AMD

Re: [libvirt] [PATCH 01/17] conf: add missing device types to virDomainDevice(Type|Def)

2012-03-02 Thread Eric Blake
On 02/28/2012 01:14 PM, Laine Stump wrote: Not all device types were represented in virDomainDeviceType, so some types of devices couldn't be represented in a virDomainDeviceDef (which requires a different type of pointer in the union for each different kind of device). Since serial,

Re: [libvirt] [PATCH 02/17] conf: relocate virDomainDeviceDef and virDomainHostdevDef

2012-03-02 Thread Eric Blake
On 02/28/2012 01:14 PM, Laine Stump wrote: This patch is only code movement + adding some forward definitions of typedefs. virDomainHostdevDef (not just a pointer to it, but an actual object) will be needed in virDomainNetDef and virDomainActualNetDef, so it must be relocated earlier in the

Re: [libvirt] [PATCH 03/17] conf: reorder static functions in domain_conf.c

2012-03-02 Thread Eric Blake
On 02/28/2012 01:14 PM, Laine Stump wrote: No code change, movement only. This is necessary to eliminate forward references. --- V2: No change src/conf/domain_conf.c | 417 1 files changed, 208 insertions(+), 209 deletions(-) ACK. --

Re: [libvirt] [PATCH 04/17] qemu: rename virDomainDeviceInfoPtr variables to avoid confusion

2012-03-02 Thread Eric Blake
On 02/28/2012 01:14 PM, Laine Stump wrote: The virDomainDeviceInfoPtrs in qemuCollectPCIAddress and qemuComparePCIDevice are named dev and dev1, but those functions will be changed (in order to match a change in the args sent to virDomainDeviceInfoIterate() callback args) to contain a

Re: [libvirt] [PATCH 05/17] conf: add device pointer to args of virDomainDeviceInfoIterate callback

2012-03-02 Thread Eric Blake
On 02/28/2012 01:14 PM, Laine Stump wrote: There will be cases where the iterator callback will need to know the type of the device whose info is being operated on, and possibly even need to use some of the device's config. This patch adds a virDomainDeviceDefPtr to the args of every callback,

Re: [libvirt] [PATCH 06/17] conf: make hostdev info a separate object

2012-03-02 Thread Eric Blake
On 02/28/2012 01:14 PM, Laine Stump wrote: In order to allow for a virDomainHostdevDef that uses the virDomainDeviceInfo of a higher level device (such as a virDomainNetDef), this patch changes the virDomainDeviceInfo in the HostdevDef into a virDomainDeviceInfoPtr. Rather than adding checks

Re: [libvirt] [PATCH 07/17] conf: HostdevDef parse/format helper functions

2012-03-02 Thread Eric Blake
On 02/28/2012 01:14 PM, Laine Stump wrote: In an upcoming patch, virDomainNetDef will acquire a virDomainHostdevDef, and the interface XML will take on some of the elements of a hostdev. To avoid duplicating the code for parsing and formatting the source element (which will be nearly identical

Re: [libvirt] [PATCH 08/17] conf: give each hostdevdef a parent pointer

2012-03-02 Thread Eric Blake
On 02/28/2012 01:14 PM, Laine Stump wrote: The parent can be any type of device. It defaults to type=none, and a NULL pointer. The intent is that if a hostdevdef is contained in the def for a higher level device (e.g. virDomainNetDef), hostdev-parent will point to the higher level device, and

[libvirt] Correct a check for capacity arg of storageVolumeResize()

2012-03-02 Thread Zeeshan Ali (Khattak)
From: Zeeshan Ali (Khattak) zeesha...@gnome.org Lets say I got a volume with '1G' allocation and '10G' capacity. The available space in the parent pool is '5G'. With the current check for overcapacity, I can only try to resize to = '6G'. You see the problem? --- src/storage/storage_driver.c |

Re: [libvirt] Correct a check for capacity arg of storageVolumeResize()

2012-03-02 Thread Eric Blake
On 03/02/2012 08:18 PM, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org Lets say I got a volume with '1G' allocation and '10G' capacity. The available space in the parent pool is '5G'. With the current check for overcapacity, I can only try to resize to = '6G'.

Re: [libvirt] [PATCH 09/17] conf: put subsys part of virDomainHostdevDef into its own struct

2012-03-02 Thread Eric Blake
On 02/28/2012 01:14 PM, Laine Stump wrote: To shorten some new code that accesses the many fields within the subsys struct of a hostdev, create a separate toplevel, typedefed virDomainHostdevSubsys struct so that we can define temporary pointers to the subsys part. --- New patch for V2.

Re: [libvirt] [PATCH 11/17] qemu: re-order functions in qemu_hotplug.c

2012-03-02 Thread Eric Blake
On 02/28/2012 01:14 PM, Laine Stump wrote: Code movement only, no functional change. This is necessary to prevent a forward reference in an upcoming patch. --- New patch for V2. src/qemu/qemu_hotplug.c | 289 --- 1 files changed, 145

Re: [libvirt] [PATCH 10/17] conf: hostdev utility functions

2012-03-02 Thread Eric Blake
On 02/28/2012 01:14 PM, Laine Stump wrote: Three new functions useful in other files: virDomainHostdevInsert: Add a new hostdev at the end of the array. This would more sensibly be called virDomainHostdevAppend, but the existing functions for other types of devices are called Insert.