[libvirt] [test-API][PATCH] Add test case of set vcpus with flags

2012-11-20 Thread Wayne Sun
Use setVcpusFlags API to set domain vcpu with flags, domain could be active or not. Flags could be '0', 'live', 'config', 'maximum' and their combinations, use '|' between flags for combinations. A sample conf file also added. Signed-off-by: Wayne Sun g...@redhat.com ---

Re: [libvirt] RFC: Migration with NPIV

2012-11-20 Thread Daniel P. Berrange
On Mon, Nov 19, 2012 at 06:42:42PM +0800, Osier Yang wrote: One API missed is: int virNodeDeviceCreate(virNodeDevicePtr dev, unsigned int flags); To create the vHBA. That API + functionality already exists Daniel -- |: http://berrange.com -o-

Re: [libvirt] RFC: Migration with NPIV

2012-11-20 Thread Daniel P. Berrange
On Mon, Nov 19, 2012 at 05:30:11PM +0800, Osier Yang wrote: Hi, This proposal is trying to figure out a solution for migration of domain which uses LUN behind vHBA as disk device (QEMU emulated disk only at this stage). And other related NPIV improvements which are not related with

Re: [libvirt] Report guest IPs as XML or struct?

2012-11-20 Thread Michal Privoznik
Seems like we agree on struct. So this is my proposal: typedef enum { VIR_INTERFACE_TYPE_UNKNOWN = 0, VIR_INTERFACE_TYPE_ETHER = 1, VIR_INTERFACE_TYPE_PPP = 2, /* we can add things here */ #idef VIR_ENUM_SENTINELS VIR_INTERFACE_TYPE_LAST #endif } virDomainInterfaceType;

[libvirt] [PATCH] conf: Report sensible error for invalid disk name

2012-11-20 Thread Martin Kletzander
The error ... but the cause is unknown appeared for XMLs similar to this: disk type='file' device='cdrom' driver name='qemu' type='raw'/ source file='/dev/zero'/ target dev='sr0'/ /disk Notice unsupported disk type (for the driver), but also no address specified. The first part is not

Re: [libvirt] [PATCH] conf: Report sensible error for invalid disk name

2012-11-20 Thread Peter Krempa
On 11/20/12 14:55, Martin Kletzander wrote: The error ... but the cause is unknown appeared for XMLs similar to this: disk type='file' device='cdrom' driver name='qemu' type='raw'/ source file='/dev/zero'/ target dev='sr0'/ /disk Notice unsupported disk type (for the driver),

Re: [libvirt] [PATCH] conf: Report sensible error for invalid disk name

2012-11-20 Thread Daniel P. Berrange
On Tue, Nov 20, 2012 at 02:55:28PM +0100, Martin Kletzander wrote: The error ... but the cause is unknown appeared for XMLs similar to this: disk type='file' device='cdrom' driver name='qemu' type='raw'/ source file='/dev/zero'/ target dev='sr0'/ /disk Notice unsupported

Re: [libvirt] [PATCH] conf: Report sensible error for invalid disk name

2012-11-20 Thread Martin Kletzander
On 11/20/2012 03:27 PM, Peter Krempa wrote: On 11/20/12 14:55, Martin Kletzander wrote: The error ... but the cause is unknown appeared for XMLs similar to this: disk type='file' device='cdrom' driver name='qemu' type='raw'/ source file='/dev/zero'/ target dev='sr0'/ /disk

Re: [libvirt] [PATCH] conf: Report sensible error for invalid disk name

2012-11-20 Thread Martin Kletzander
On 11/20/2012 03:45 PM, Daniel P. Berrange wrote: On Tue, Nov 20, 2012 at 02:55:28PM +0100, Martin Kletzander wrote: The error ... but the cause is unknown appeared for XMLs similar to this: disk type='file' device='cdrom' driver name='qemu' type='raw'/ source file='/dev/zero'/

Re: [libvirt] [RFC PATCHv2 3/n] snapshot: make cloning of domain definition easier

2012-11-20 Thread Peter Krempa
On 11/20/12 01:09, Eric Blake wrote: Upcoming patches for revert-and-clone branching of snapshots need to be able to copy a domain definition; make this step reusable. * src/conf/domain_conf.h (virDomainDefCopy): New prototype. * src/conf/domain_conf.c (virDomainObjCopyPersistentDef): Split...

[libvirt] [PATCH v2] conf: Report sensible error for invalid disk name

2012-11-20 Thread Martin Kletzander
The error ... but the cause is unknown appeared for XMLs similar to this: disk type='file' device='cdrom' driver name='qemu' type='raw'/ source file='/dev/zero'/ target dev='sr0'/ /disk Notice unsupported disk type (for the driver), but also no address specified. The first part is not

Re: [libvirt] [RFC PATCHv2 3/n] snapshot: make cloning of domain definition easier

2012-11-20 Thread Eric Blake
On 11/20/2012 08:05 AM, Peter Krempa wrote: On 11/20/12 01:09, Eric Blake wrote: Upcoming patches for revert-and-clone branching of snapshots need to be able to copy a domain definition; make this step reusable. * src/conf/domain_conf.h (virDomainDefCopy): New prototype. *

Re: [libvirt] [RFC PATCHv2 1/n] snapshot: add revert-and-create branching of external snapshots

2012-11-20 Thread Peter Krempa
On 11/20/12 01:09, Eric Blake wrote: Right now, libvirt refuses to revert to the state at the time of an external snapshot, because doing so would reset things so that the next time the domain boots, we are using the backing file; but modifying the backing file invalidates all qcow2 files that

Re: [libvirt] [RFC PATCHv2 2/n] snapshot: prepare to parse new XML

2012-11-20 Thread Peter Krempa
On 11/20/12 01:09, Eric Blake wrote: No semantic change, but prepare for a new mode of parsing where a new _BRANCH flag requests that the parse look up the existing snapshot to branch from. * src/conf/snapshot_conf.h (VIR_DOMAIN_SNAPSHOT_PARSE_BRANCH): New flag, unused for now.

Re: [libvirt] RFC: Migration with NPIV

2012-11-20 Thread Dave Allan
On Tue, Nov 20, 2012 at 10:17:11AM +, Daniel P. Berrange wrote: On Mon, Nov 19, 2012 at 05:30:11PM +0800, Osier Yang wrote: Hi, This proposal is trying to figure out a solution for migration of domain which uses LUN behind vHBA as disk device (QEMU emulated disk only at this

Re: [libvirt] RFC: Migration with NPIV

2012-11-20 Thread Daniel P. Berrange
On Tue, Nov 20, 2012 at 11:26:53AM -0500, Dave Allan wrote: On Tue, Nov 20, 2012 at 10:17:11AM +, Daniel P. Berrange wrote: On Mon, Nov 19, 2012 at 05:30:11PM +0800, Osier Yang wrote: Hi, This proposal is trying to figure out a solution for migration of domain which uses LUN

Re: [libvirt] [RFC PATCHv2 4/n] snapshot: actually compute branch definition from XML

2012-11-20 Thread Peter Krempa
On 11/20/12 01:09, Eric Blake wrote: When asked to parse a branch snapshot XML definition, we have to piece together the definition of the new snapshot from parts of the branch point, as well as run some sanity checks that the branches are compatible. This patch is rather restrictive in what it

[libvirt] [RFC] Porting Qemu driver to FreeBSD

2012-11-20 Thread Roman Bogorodskiy
Hi, Recently I have picked up Sean's and Hiren's activities in porting Qemu driver on FreeBSD. At this point I have the basics working. Meaning that these things work: - Basic host commands (version, nodeinfo, etc) - Can perform basic operations on the VM (start, stop, destroy, etc) - Basic

[libvirt] [PATCH] Log an audit message with the LXC init pid

2012-11-20 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently the LXC driver logs audit messages when a container is started or stopped. These audit messages, however, contain the PID of the libvirt_lxc supervisor process. To enable sysadmins to correlate with audit messages generated by processes

Re: [libvirt] [PATCH] Log an audit message with the LXC init pid

2012-11-20 Thread Eric Blake
On 11/20/2012 10:52 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently the LXC driver logs audit messages when a container is started or stopped. These audit messages, however, contain the PID of the libvirt_lxc supervisor process. To enable sysadmins to

[libvirt] ivshmem server

2012-11-20 Thread Andrew Jones
This mail is meant to get a discussion started. Please keep me on cc for the discussion, as I'm not subscribed to libvir-list. ivshmem is an implementation of an inter-VM communication channel. Support for this has been in qemu since v0.14.0 and libvirt patches have been recently posted[1].

Re: [libvirt] ivshmem server

2012-11-20 Thread Daniel P. Berrange
On Tue, Nov 20, 2012 at 01:16:56PM -0500, Andrew Jones wrote: This mail is meant to get a discussion started. Please keep me on cc for the discussion, as I'm not subscribed to libvir-list. ivshmem is an implementation of an inter-VM communication channel. Support for this has been in qemu

Re: [libvirt] [RFC PATCHv2 4/n] snapshot: actually compute branch definition from XML

2012-11-20 Thread Eric Blake
On 11/20/2012 09:41 AM, Peter Krempa wrote: @@ -188,6 +188,7 @@ virDomainSnapshotDefParseString(const char *xmlStr, char *memorySnapshot = NULL; char *memoryFile = NULL; bool offline = !!(flags VIR_DOMAIN_SNAPSHOT_PARSE_OFFLINE); +virDomainSnapshotObjPtr other = NULL;

[libvirt] [PATCH 0/4] qemu: add boot order support for redirected and host USB devices

2012-11-20 Thread Ján Tomko
Commit a4c19459aa8634c43b51e8138fb1d7eec4c17824 missed the functionality for redirected USB devices (fixed in 1/4), documentation and tests. https://bugzilla.redhat.com/show_bug.cgi?id=805414 Ján Tomko (4): conf: add support for booting from redirected USB devices docs: boot order for host

[libvirt] [PATCH 1/4] conf: add support for booting from redirected USB devices

2012-11-20 Thread Ján Tomko
Commit a4c19459aa8634c43b51e8138fb1d7eec4c17824 only added the QEMU capability flag, command line option and added the boot element for redirdev's in the XML schema. This patch adds support for parsing and writing the XML with redirdevs with the boot flag. It also ignores unknown XML elements in

[libvirt] [PATCH 4/4] tests: update qemuhelptest data

2012-11-20 Thread Ján Tomko
Both generated with qemu-system-x86_64 --help qemu-1.2.0 qemu-system-x86_64 \ -device ? \ -device pci-assign,? \ -device virtio-blk-pci,? \ -device virtio-net-pci,? \ -device scsi-disk,? \ -device PIIX4_PM,? \ -device usb-redir,? \ -device ide-drive,? \ -device usb-host,? 2 qemu-1.2.0-device It

[libvirt] [PATCH 2/4] docs: boot order for host and redirected USB devices

2012-11-20 Thread Ján Tomko
And a few spaces. --- docs/formatdomain.html.in | 27 +++ 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index c8da33d..6a3b976 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in

[libvirt] [PATCH 1/4] Introduce virDomainFSTrim() public API

2012-11-20 Thread Michal Privoznik
This will call FITRIM within guest. The API has 4 arguments, however, only 2 will be used for now (@dom and @minumum). The rest two are there if in future qemu guest agent learns them. --- include/libvirt/libvirt.h.in |4 +++ src/driver.h |6 + src/libvirt.c

[libvirt] [PATCH 3/4] tests: add boot order for host and redirected USB to qemu argv test

2012-11-20 Thread Ján Tomko
--- ...muxml2argv-hostdev-usb-address-device-boot.args |6 +++ ...emuxml2argv-hostdev-usb-address-device-boot.xml | 28 + .../qemuxml2argv-usb-redir-boot.args | 10 + .../qemuxml2argv-usb-redir-boot.xml| 42

[libvirt] [PATCH 2/4] remote: Implement virDomainFSTrim

2012-11-20 Thread Michal Privoznik
A new rule to fixup_name() in gendispatch.pl needs to be added, otherwise we are left with remoteDomainFstrim which is not wanted. --- src/remote/remote_driver.c |1 + src/remote/remote_protocol.x | 10 +- src/remote_protocol-structs |7 +++ src/rpc/gendispatch.pl |

[libvirt] [PATCH 3/4] qemu: Implement virDomainFSTrim

2012-11-20 Thread Michal Privoznik
using qemu guest agent. As said in previous patch, @mountPoint must be NULL and @flags zero because qemu guest agent doesn't support these arguments yet. If qemu learns them, we can start supporting them as well. --- src/qemu/qemu_agent.c | 25 ++ src/qemu/qemu_agent.h |2 +

[libvirt] [PATCH 4/4] virsh: Expose new virDomainFSTrim API

2012-11-20 Thread Michal Privoznik
under domfstrim command. Since API doesn't support all parameters (some must be NULL or zero), don't expose these in virsh neither. --- tools/virsh-domain.c | 40 tools/virsh.pod | 12 2 files changed, 52 insertions(+), 0 deletions(-)

[libvirt] [PATCH 0/4] Introduce support for FITRIM within guest OS

2012-11-20 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=831159 Michal Privoznik (4): Introduce virDomainFSTrim() public API remote: Implement virDomainFSTrim qemu: Implement virDomainFSTrim virsh: Expose new virDomainFSTrim API include/libvirt/libvirt.h.in |4 ++ src/driver.h |

[libvirt] [libvirt-glib] gobject: Also delete storage volume from its pool's list

2012-11-20 Thread Zeeshan Ali (Khattak)
From: Zeeshan Ali (Khattak) zeesha...@gnome.org Without this patch, storage pool still lists the volume even after it is deleted. Related Boxes bug: https://bugzilla.gnome.org/show_bug.cgi?id=688724 --- libvirt-gobject/libvirt-gobject-storage-pool.c | 23 +++

Re: [libvirt] [PATCH 1/4] Introduce virDomainFSTrim() public API

2012-11-20 Thread Daniel P. Berrange
On Tue, Nov 20, 2012 at 07:47:35PM +0100, Michal Privoznik wrote: This will call FITRIM within guest. The API has 4 arguments, however, only 2 will be used for now (@dom and @minumum). The rest two are there if in future qemu guest agent learns them. --- include/libvirt/libvirt.h.in |4

Re: [libvirt] [PATCH] Log an audit message with the LXC init pid

2012-11-20 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/20/2012 12:52 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently the LXC driver logs audit messages when a container is started or stopped. These audit messages, however, contain the PID of the libvirt_lxc

Re: [libvirt] libvirt-1.0 fails virdrivermoduletest

2012-11-20 Thread Toralf Förster
On 11/19/2012 03:14 PM, Martin Kletzander wrote: On 11/11/2012 10:25 AM, Toralf Förster wrote: I've a stable Gentoo Linux, the build log is attached. It's hard to say from the log, but you can check yourselves what the problem is by running the particular test like this: VIR_TEST_DEBUG=1

[libvirt] Proposal: no dnsmasq (no dhcp and no dns) and no radvd option

2012-11-20 Thread Gene Czarcinski
Laine mentioned something yesterday that got me to thinking: being able to specify that dnsmasq is not to be started for an interface. Let me expand that by saying that libvirt would not start dnsmasq for either dns or dhcp and also would not start radvd. However, the IPv4 and IPv6 gateway

Re: [libvirt] Proposal: no dnsmasq (no dhcp and no dns) and no radvd option

2012-11-20 Thread Serge Hallyn
Quoting Gene Czarcinski (g...@czarc.net): Laine mentioned something yesterday that got me to thinking: being able to specify that dnsmasq is not to be started for an interface. Let me expand that by saying that libvirt would not start dnsmasq for either dns or dhcp and also would not start

Re: [libvirt] [RFC PATCHv2 4/n] snapshot: actually compute branch definition from XML

2012-11-20 Thread Eric Blake
On 11/19/2012 05:09 PM, Eric Blake wrote: When asked to parse a branch snapshot XML definition, we have to piece together the definition of the new snapshot from parts of the branch point, as well as run some sanity checks that the branches are compatible. This patch is rather restrictive in

Re: [libvirt] Proposal: no dnsmasq (no dhcp and no dns) and no radvd option

2012-11-20 Thread Laine Stump
On 11/20/2012 02:36 PM, Gene Czarcinski wrote: Laine mentioned something yesterday that got me to thinking: being able to specify that dnsmasq is not to be started for an interface. Let me expand that by saying that libvirt would not start dnsmasq for either dns or dhcp and also would not

Re: [libvirt] [RFC] Porting Qemu driver to FreeBSD

2012-11-20 Thread Eric Blake
On 11/20/2012 10:07 AM, Roman Bogorodskiy wrote: Hi, Recently I have picked up Sean's and Hiren's activities in porting Qemu driver on FreeBSD. At this point I have the basics working. Meaning that these things work: - Basic host commands (version, nodeinfo, etc) - Can perform basic

[libvirt] [PATCHv3 0/5] snapshot revert-and-create

2012-11-20 Thread Eric Blake
v2 was here: https://www.redhat.com/archives/libvir-list/2012-November/msg00818.html One patch from v2 has already been committed. This patch additionally adds a qemu implementation for the new flag, and I have tested creation of offline branches (I still need to test creation of a branch from a

[libvirt] [PATCHv3 2/5] snapshot: prepare to parse new XML

2012-11-20 Thread Eric Blake
No semantic change, but prepare for a new mode of parsing where a new _BRANCH flag requests that the parse look up the existing snapshot to branch from. * src/conf/snapshot_conf.h (VIR_DOMAIN_SNAPSHOT_PARSE_BRANCH): New flag, unused for now. (virDomainSnapshotDefParseString): Add parameter. *

[libvirt] [PATCHv3 3/5] snapshot: actually compute branch definition from XML

2012-11-20 Thread Eric Blake
When asked to parse a branch snapshot XML definition, we have to piece together the definition of the new snapshot from parts of the branch point, as well as run some sanity checks that the branches are compatible. This patch is rather restrictive in what it allows; depending on effort and future

[libvirt] [RFC PATCHv3 5/5] snapshot: add another revert API flag

2012-11-20 Thread Eric Blake
Now that we can create external snapshot branches, we need to be able to switch between them. Add a new flag, which states that we will merely use the external files as-is (and assume that the user hasn't done any nasty hotplug or hotunplug of disks after that branch was created, since we don't

Re: [libvirt] [PATCHv4 4/4] snapshot: qemu: Implement reverting of external snapshots

2012-11-20 Thread Eric Blake
On 11/19/2012 04:51 PM, Eric Blake wrote: On 11/19/2012 09:06 AM, Peter Krempa wrote: This patch adds support for reverting of external snapshots. The support is somewhat limited yet (you can only revert to a snapshot that has no children or delete the children that would have their image

[libvirt] [PATCHv3 1/5] snapshot: add revert-and-create branching of external snapshots

2012-11-20 Thread Eric Blake
Right now, libvirt refuses to revert to the state at the time of an external snapshot, because doing so would reset things so that the next time the domain boots, we are using the backing file; but modifying the backing file invalidates all qcow2 files that are based on top of it. There are three

[libvirt] [PATCHv3 4/5] snapshot: support revert-and-create branching in qemu

2012-11-20 Thread Eric Blake
First cut at allowing snapshot branch creation. For now, the code requires that the snapshot be created but not activated (thus leaving the user on the original branch); this is because activating the new branch will require shared code with revert. Of course, until we allow reverting to a

[libvirt] [PATCH] storage: Improve virStorageBackendFileSystemStop

2012-11-20 Thread Osier Yang
It's actually not used for DIR pool. So removing the checking. --- src/storage/storage_backend_fs.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index 3322677..10daee3 100644 ---

Re: [libvirt] [PATCH V8 1/6] add a configure option --with-fuse to prepare introduction of fuse support for libvirt lxc

2012-11-20 Thread Gao feng
Ping on 2012/11/12 15:02, Gao feng wrote: add a configure option --with-fuse to prepare introduction of fuse support for libvirt lxc. With help from Daniel and Richard. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- configure.ac| 29 +

[libvirt] [PATCH] storage: Fix bug of fs pool destroying

2012-11-20 Thread Osier Yang
Regression introduced by commit 258e06c85b7, ret could be set to 1 or 0 by virStorageBackendFileSystemIsMounted before goto cleanup. This could mislead the callers (up to the public API virStoragePoolDestroy) to return success even the underlying umount command fails. ---

Re: [libvirt] RFC: Migration with NPIV

2012-11-20 Thread Osier Yang
On 2012年11月20日 18:08, Daniel P. Berrange wrote: On Mon, Nov 19, 2012 at 06:42:42PM +0800, Osier Yang wrote: One API missed is: int virNodeDeviceCreate(virNodeDevicePtr dev, unsigned int flags); To create the vHBA. That API + functionality already exists

Re: [libvirt] RFC: Migration with NPIV

2012-11-20 Thread Osier Yang
On 2012年11月20日 18:17, Daniel P. Berrange wrote: On Mon, Nov 19, 2012 at 05:30:11PM +0800, Osier Yang wrote: Hi, This proposal is trying to figure out a solution for migration of domain which uses LUN behind vHBA as disk device (QEMU emulated disk only at this stage). And other related NPIV

Re: [libvirt] RFC: Migration with NPIV

2012-11-20 Thread Osier Yang
On 2012年11月21日 00:26, Dave Allan wrote: On Tue, Nov 20, 2012 at 10:17:11AM +, Daniel P. Berrange wrote: On Mon, Nov 19, 2012 at 05:30:11PM +0800, Osier Yang wrote: Hi, This proposal is trying to figure out a solution for migration of domain which uses LUN behind vHBA as disk device (QEMU

Re: [libvirt] RFC: Migration with NPIV

2012-11-20 Thread Osier Yang
On 2012年11月20日 09:36, Zou, Yi wrote: On 2012年11月19日 17:30, Osier Yang wrote: Hi, This proposal is trying to figure out a solution for migration of domain which uses LUN behind vHBA as disk device (QEMU emulated disk only at this stage). And other related NPIV improvements which are not related

Re: [libvirt] ivshmem server

2012-11-20 Thread Osier Yang
On 2012年11月21日 02:16, Andrew Jones wrote: This mail is meant to get a discussion started. Please keep me on cc for the discussion, as I'm not subscribed to libvir-list. ivshmem is an implementation of an inter-VM communication channel. Support for this has been in qemu since v0.14.0 and

Re: [libvirt] messed up with xml-files and configuration of a VM

2012-11-20 Thread Stefan Hajnoczi
On Tue, Nov 20, 2012 at 5:13 PM, Lentes, Bernd bernd.len...@helmholtz-muenchen.de wrote: first, i'm new to kvm. I'm running KVM on a sles 11 sp2, kernel 3.0.13-0.27-default. My guest is an Ubuntu 12.0.4 LTS 64bit. The guest has attached a CDROM, using an iso-file from a CIFS-Share. I

Re: [libvirt] [RFC] Porting Qemu driver to FreeBSD

2012-11-20 Thread Roman Bogorodskiy
Eric Blake wrote: On 11/20/2012 10:07 AM, Roman Bogorodskiy wrote: Hi, Recently I have picked up Sean's and Hiren's activities in porting Qemu driver on FreeBSD. At this point I have the basics working. Meaning that these things work: - Basic host commands (version,