[libvirt] [PATCH 0/4] Updated patches 2-6 - virInterface test driver and netcf backend

2009-07-21 Thread Laine Stump
These patches correspond to patches 2-6 in the set I sent yesterday (the 1st and 2nd had no changes, so they stand as-is). They incorporate all changes brought up in review of the first set. In particular: 1) When looking for a cached virInterface object for an interface, I now check that the

[libvirt] [PATCH 1/4] Match MAC address as well as interface name in virGetinterface.

2009-07-21 Thread Laine Stump
MAC address of a particular interface may change over time, and the reduced virInterface object (which contains just name and mac) needs to reflect these changes. Since we can't modify the mac address of an existing virInterface (some other thread may currently be using it) we just create a new

[libvirt] [PATCH 3/4] Add a test interface driver.

2009-07-21 Thread Laine Stump
--- src/test.c | 392 +++- 1 files changed, 391 insertions(+), 1 deletions(-) diff --git a/src/test.c b/src/test.c index 6f07462..098d235 100644 --- a/src/test.c +++ b/src/test.c @@ -41,6 +41,7 @@ #include capabilities.h #include

[libvirt] [patch] initialize a local variable in qemudOpenMonitorUnix()

2009-07-21 Thread Jun Koi
This patch initializes a local variable in qemudOpenMonitorUnix(), thus also eliminates a compilation warning. diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 00dc6e5..d2db1a2 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -874,7 +874,7 @@

[libvirt] How to config my VM to use KVM with libvirt?

2009-07-21 Thread Jun Koi
Hi, I have a VM running under libvirt, and it is currently run with -no-kvm option (I saw that in ps output). Now I want to run this VM with KVM. How can I reconfigure it for that? I looked into its configuration file under /etc/libvirt/qemu, but didnt see any option to turn KVM on. Thanks, J

Re: [libvirt] [PATCH] rpm spec cleanup and split off client only requirements

2009-07-21 Thread Daniel Veillard
On Mon, Jul 20, 2009 at 05:46:37PM +0100, Daniel P. Berrange wrote: On Mon, Jul 20, 2009 at 06:34:26PM +0200, Daniel Veillard wrote: So I moved in the client: - the shared library, I guess it's uncontroversial - the virsh/virt-xml-validate binaries, I guess it it doesn't block

[libvirt] libvirt-java, deprecated methods?

2009-07-21 Thread Thomas Treutner
Hi, I'm playing around with libvirt-0.6.5 and libvirt-java-0.2.1 these days. It looks very interesting, but I think I may have found a bug: conn = new Connect(xen://node02, false); conn.setDom0Memory(512000) gives: exception

Re: [libvirt] [patch] initialize a local variable in qemudOpenMonitorUnix()

2009-07-21 Thread Daniel Veillard
On Tue, Jul 21, 2009 at 03:18:21PM +0900, Jun Koi wrote: This patch initializes a local variable in qemudOpenMonitorUnix(), thus also eliminates a compilation warning. Oops, right that's a nasty bug, applied and commited, thanks a lot ! Daniel -- Daniel Veillard | libxml Gnome

Re: [libvirt] How to config my VM to use KVM with libvirt?

2009-07-21 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 05:47:15PM +0900, Jun Koi wrote: Hi, I have a VM running under libvirt, and it is currently run with -no-kvm option (I saw that in ps output). Now I want to run this VM with KVM. How can I reconfigure it for that? I looked into its configuration file under

Re: [libvirt] How to config my VM to use KVM with libvirt?

2009-07-21 Thread Jun Koi
On Tue, Jul 21, 2009 at 7:14 PM, Daniel P. Berrangeberra...@redhat.com wrote: On Tue, Jul 21, 2009 at 05:47:15PM +0900, Jun Koi wrote: Hi, I have a VM running under libvirt, and it is currently run with -no-kvm option (I saw that in ps output). Now I want to run this VM with KVM. How can I

[libvirt] MemoryPeek() is slow

2009-07-21 Thread Jun Koi
Hi, I play around with MemoryPeek() API on QEMU. While it works well, I found that it is too slow. That is expected because of the way it works: we always need to save memory to a file, and read it in again, and that is too inefficient. I am trying to figure out a better way to do this. To do

Re: [libvirt] MemoryPeek() is slow

2009-07-21 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 07:39:07PM +0900, Jun Koi wrote: Hi, I play around with MemoryPeek() API on QEMU. While it works well, I found that it is too slow. Slow in what context ? Are you trying to read large amounts of data out of the guest ? That is expected because of the way it works:

Re: [libvirt] libvirt-java, deprecated methods?

2009-07-21 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 11:52:11AM +0200, Thomas Treutner wrote: Hi, I'm playing around with libvirt-0.6.5 and libvirt-java-0.2.1 these days. It looks very interesting, but I think I may have found a bug: conn = new Connect(xen://node02, false);

[libvirt] [PATCH 0/9] Add support for (qcow*) volume encryption

2009-07-21 Thread Miloslav Trmač
Hello, the following patches add full support for qcow/qcow2 volume encryption, assuming a client that supports it. New XML tags are defined to represent encryption parameters (currently format and passphrase, more can be added in the future), e.g. encryption format='qcow'

[libvirt] [PATCH 1/9] Add volume encryption information handling.

2009-07-21 Thread Miloslav Trmač
Define an encryption tag specifying volume encryption format and format-depenedent parameters (e.g. passphrase, cipher name, key length, key). In most cases, the secrets (passphrases/keys) should only be transferred from libvirt users to libvirt, not the other way around. (Volume creation, when

[libvirt] [PATCH 2/9] Attach encryption information to virStorageVolDef.

2009-07-21 Thread Miloslav Trmač
The XML allows encryption format='unencrypted'/, this implementation canonicalizes the internal representation so that vol-encryption is non-NULL iff the volume is encrypted. Note that partial encryption information (e.g. specifying an encryption format, but not the key/passphrase) is valid: *

[libvirt] [PATCH 3/9] Recognize encryption format of qcow volumes.

2009-07-21 Thread Miloslav Trmač
(The implementation is not very generic, but that can be very easily rectified if/when new encryption formats appear.) --- src/storage_backend_fs.c | 61 +++-- 1 files changed, 47 insertions(+), 14 deletions(-) diff --git a/src/storage_backend_fs.c

[libvirt] [PATCH 4/9] Add support for encrypted (qcow) volume creation.

2009-07-21 Thread Miloslav Trmač
Supports only virStorageVolCreateXML, not virStorageVolCreateXMLFrom. Curiously, qemu-img does not need the passphrase for anything to create an encrypted volume. This implementation is sufficient for the qcow2 format, and for other formats when all encryption parameters are pre-specified. The

[libvirt] [PATCH 5/9] Attach encryption information to virDomainDiskDef.

2009-07-21 Thread Miloslav Trmač
The XML allows encryption format='unencrypted'/, this implementation canonicalizes the internal representation so that disk-encryption is non-NULL iff encryption information is available. Note that partial encryption information (e.g. specifying an encryption format, but not the key/passphrase)

[libvirt] [PATCH 6/9] Don't assume buffered output echoes the command.

2009-07-21 Thread Miloslav Trmač
The if ((nlptr...)) implicitly assumes commptr != NULL. Make the assumption explicit, it will be broken in a future patch. --- src/qemu_driver.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qemu_driver.c b/src/qemu_driver.c index d2db1a2..f2be27f 100644 ---

[libvirt] [PATCH 7/9] Make handling of monitor prompts more general.

2009-07-21 Thread Miloslav Trmač
--- src/qemu_driver.c | 87 1 files changed, 73 insertions(+), 14 deletions(-) diff --git a/src/qemu_driver.c b/src/qemu_driver.c index f2be27f..12079f8 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -87,6 +87,12 @@ static void

Re: [libvirt] [PATCH 0/4] Updated patches 2-6 - virInterface test driver and netcf backend

2009-07-21 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 02:09:38AM -0400, Laine Stump wrote: These patches correspond to patches 2-6 in the set I sent yesterday (the 1st and 2nd had no changes, so they stand as-is). They incorporate all changes brought up in review of the first set. In particular: 1) When looking for a

Re: [libvirt] [PATCH] Extra filesystem options during backend filesystem mount.

2009-07-21 Thread Harshavardhana
Hi Daniel, Are you going to apply this to mainline?. Was just wondering if you have any other concerns so that i could work on those if at all there are other better ways you would have. Thanks -- Harshavardhana Gluster - http://www.gluster.com/ On Sat, Jul 18, 2009 at 9:12 AM, Harshavardhana

Re: [libvirt] How to config my VM to use KVM with libvirt?

2009-07-21 Thread Jim Paris
Daniel P. Berrange wrote: On Tue, Jul 21, 2009 at 05:47:15PM +0900, Jun Koi wrote: Hi, I have a VM running under libvirt, and it is currently run with -no-kvm option (I saw that in ps output). Now I want to run this VM with KVM. How can I reconfigure it for that? I looked into its

Re: [libvirt] How to config my VM to use KVM with libvirt?

2009-07-21 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 09:46:17AM -0400, Jim Paris wrote: Daniel P. Berrange wrote: On Tue, Jul 21, 2009 at 05:47:15PM +0900, Jun Koi wrote: Hi, I have a VM running under libvirt, and it is currently run with -no-kvm option (I saw that in ps output). Now I want to run this VM

Re: [libvirt] libvirt-java, deprecated methods?

2009-07-21 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 01:39:51PM +0200, Thomas Treutner wrote: On Tuesday 21 July 2009 13:01:06 Daniel P. Berrange wrote: On Tue, Jul 21, 2009 at 11:52:11AM +0200, Thomas Treutner wrote: Hi, I'm playing around with libvirt-0.6.5 and libvirt-java-0.2.1 these days. It looks very

Re: [libvirt] [PATCH 0/4] Updated patches 2-6 - virInterface test driver and netcf backend

2009-07-21 Thread Daniel Veillard
On Tue, Jul 21, 2009 at 02:09:38AM -0400, Laine Stump wrote: These patches correspond to patches 2-6 in the set I sent yesterday (the 1st and 2nd had no changes, so they stand as-is). They incorporate all changes brought up in review of the first set. In particular: 1) When looking for a

Re: [libvirt] Bugfix for failing to reconnect to vbox:///session

2009-07-21 Thread Daniel Veillard
On Mon, Jul 20, 2009 at 10:04:31AM +0200, Pritesh Kothari wrote: I don't think this is quite correct. We call VBoxCGlueInit() in the vboxRegister() function, which is run when libvirt first initializes the whole library. The real bug is the vboxClose() method which calls

[libvirt] Workaround to start xen inside a buggy kvm

2009-07-21 Thread Thomas Fricke
Buggy kvm crashes with kernel panic if xen started inside a kvm machine. kvm needs the -no-kvm-pit, this argument is not available with libvirt. I have tested the following workaround on ubuntu 9.04 Rename kvm cd /usr/bin mv kvm kvm.orig Use the following script instead the original kvm

[libvirt] [PATCH] Canonicalize qemu machine types

2009-07-21 Thread Mark McLoughlin
In qemu-0.11 there is a 'pc-0.10' machine type which allows you to run guests with a machine which is compatible with the pc machine in qemu-0.10 - e.g. using the original PCI class for virtio-blk and virtio-console and disabling MSI support in virtio-net. The idea here is that we don't want to

Re: [libvirt] libvirt-java, deprecated methods?

2009-07-21 Thread Daniel Veillard
On Tue, Jul 21, 2009 at 03:03:53PM +0100, Daniel P. Berrange wrote: On Tue, Jul 21, 2009 at 01:39:51PM +0200, Thomas Treutner wrote: On Tuesday 21 July 2009 13:01:06 Daniel P. Berrange wrote: On Tue, Jul 21, 2009 at 11:52:11AM +0200, Thomas Treutner wrote: Hi, I'm playing around

Re: [libvirt] MemoryPeek() is slow

2009-07-21 Thread Jun Koi
On Tue, Jul 21, 2009 at 7:50 PM, Daniel P. Berrangeberra...@redhat.com wrote: On Tue, Jul 21, 2009 at 07:39:07PM +0900, Jun Koi wrote: Hi, I play around with MemoryPeek() API on QEMU. While it works well, I found that it is too slow. Slow in what context ?  Are you trying to read large

Re: [libvirt] [PATCH] Extra filesystem options during backend filesystem mount.

2009-07-21 Thread Daniel Veillard
On Tue, Jul 21, 2009 at 06:43:10PM +0530, Harshavardhana wrote: Hi Daniel, Are you going to apply this to mainline?. Was just wondering if you have any other concerns so that i could work on those if at all there are other better ways you would have. Ah right I nearly forgot about it :-)

[libvirt] cp error in api doc

2009-07-21 Thread Thomas Treutner
I think there's a cp error: http://libvirt.org/html/libvirt-libvirt.html#virStoragePoolUndefine Returns: a virStoragePoolPtr object, or NULL if creation failed I assume it is 0 on success, -1 on failure as the return is of type int. kr,t -- Libvir-list mailing list

[libvirt] [PATCH] Add getfd and closefd monitor commands

2009-07-21 Thread Mark McLoughlin
Add monitor commands to support passing file descriptors via SCM_RIGHTS. getfd assigns the passed file descriptor a name for use with other monitor commands. closefd allows passed file descriptors to be closed. If a monitor command actually uses a named file descriptor, closefd will not be

[libvirt] [PATCH] Add SCM_RIGHTS support to unix socket character devices

2009-07-21 Thread Mark McLoughlin
If a file descriptor is passed via a message with SCM_RIGHTS ancillary data on a unix socket, store the file descriptor for use in the chr_read() handler. Close the file descriptor if it was not used. The qemu_chr_get_msgfd() API provides access to the passed descriptor. Signed-off-by: Mark

[libvirt] [PATCH] Add monitor_get_fd() command for fetching named fds

2009-07-21 Thread Mark McLoughlin
Signed-off-by: Mark McLoughlin mar...@redhat.com --- monitor.c | 24 monitor.h |2 ++ 2 files changed, 26 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 817e4b7..6ad2e14 100644 --- a/monitor.c +++ b/monitor.c @@ -1774,6 +1774,30 @@ static

[libvirt] [PATCH] Add support for fd=name to tap and socket networking

2009-07-21 Thread Mark McLoughlin
This allows a program to initialize a host networking device using a file descriptor passed over a unix monitor socket. The program must first pass the file descriptor using SCM_RIGHTS ancillary data with the getfd monitor command. It then may do host_net_add tap fd=name to use the named file

[libvirt] [PATCH] Make tcp_chr_read() use recvmsg()

2009-07-21 Thread Mark McLoughlin
Signed-off-by: Mark McLoughlin mar...@redhat.com --- qemu-char.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 287e0cd..e0d7220 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1911,15 +1911,25 @@ static void tcp_chr_read(void

[libvirt] Re: [PATCH] Make tcp_chr_read() use recvmsg()

2009-07-21 Thread Mark McLoughlin
Sorry about that, wrong list clearly. Cheers, Mark. -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] Problem with libvirt and pci passthrough

2009-07-21 Thread Mirko Raasch
Mark McLoughlin schrieb: On Thu, 2009-07-16 at 13:20 +0200, Mirko Raasch wrote: On Thu, 2009-07-16 at 11:06 +0200, Mirko Raasch wrote: Hi, i´m still having problem with libvirt and pci passthrough, if i use more then one pci card in the guest. If i start qemu 0.10.5 manualy, i can

Re: [libvirt] VMware ESX driver progress

2009-07-21 Thread Daniel Veillard
On Tue, Jul 21, 2009 at 04:58:50PM +0200, Matthias Bolte wrote: Hi, the development was hindered by our testing cluster being offline since 2 weeks due to server room cooling system maintenance. But I finally got a basic version of dump-XML done, that fills all fields of the virDomainDef

[libvirt] [PATCH 0/1] Multipath pool support

2009-07-21 Thread David Allan
The following patch implements multipath pool support. It's very basic functionality, consisting of creating a pool that contains all the multipath devices on the host. That will cover the common case of users who just want to discover all the available multipath devices and assign them to

[libvirt] [PATCH 1/1] Add a simple pool type for multipath devices

2009-07-21 Thread David Allan
This pool type contains volumes for the multipath devices that are present on the host. It does not (yet) support any sort of multipath configuration, so that aspect of system administration must still be done at host build time. --- configure.in| 24 +++ po/POTFILES.in

Re: [libvirt] How to config my VM to use KVM with libvirt?

2009-07-21 Thread Jim Paris
Daniel P. Berrange wrote: On Tue, Jul 21, 2009 at 09:46:17AM -0400, Jim Paris wrote: Speaking of this, I've noticed that domain type='qemu' os type arch='i686' machine='pc'hvm/type /os /domain runs WITH kvm on an x86_64 system. Is that intended? No, its not

[libvirt] [PATCH] Support physical memory in virDomainMemoryPeek()

2009-07-21 Thread Nguyen Anh Quynh
Hi, This patch provides support for physical memory in virDomainMemoryPeek(). Please consider applying. Signed-off-by: Nguyen Anh Quynh aqu...@gmail.com # diffstat pmemsave3.diff docs/libvirt-api.xml |2 +- include/libvirt/libvirt.h.in |1 + src/libvirt.c| 14

[libvirt] [PATCH 0/4] Fixes to some bugs encountered testing virInterface*

2009-07-21 Thread Laine Stump
This series of patches fixes some problems I found while testing the virInterface implementation. Note that the 3rd patch in the series only fixes virInterface-related instances of the problem (releasing the conn lock before reporting errors). If that patch is approved, a similar thing must be

[libvirt] [PATCH 1/4] rename variable called 'interface' to 'iface'

2009-07-21 Thread Laine Stump
This avoids a problem when building under MINGW32 --- src/virsh.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/virsh.c b/src/virsh.c index 91f5b5a..bae0c66 100644 --- a/src/virsh.c +++ b/src/virsh.c @@ -3307,7 +3307,7 @@ static const vshCmdOptDef

[libvirt] [PATCH 2/4] Update modified mac address in place in virGetInterface

2009-07-21 Thread Laine Stump
If the mac address of an interface is changed, we must either create a new virInterface object in the cache that has the new name/mac, or modify the existing object in the cache. Because the cache is in a hash that's indexed by name only, we can't create a new entry having the same name without

[libvirt] [PATCH 3/4] Release conn lock before reporting errors in vir(Get|Release)Interface

2009-07-21 Thread Laine Stump
Since virRaiseErrorFull needs to lock the conn, we must take care to call it with the lock *not* held. If this patch is approved, similar patches need to be done for other types in datatypes.c --- src/datatypes.c | 29 +++-- 1 files changed, 19 insertions(+), 10

[libvirt] [PATCH 4/4] Fix multiple vir*Ptr memory leaks in virsh.c

2009-07-21 Thread Laine Stump
I noticed that one of my virInterface commandline functions in virsh.c was forgetting to call virInterfaceFree() before it was done, and since I had written it with copy-paste, I decided to check other functions in virsh.c for the same problem. Unless I misunderstand the APIs, I found a whole

[libvirt] OpenVZ : cannot assign bridge to any interface

2009-07-21 Thread Yuji NISHIDA
Hi, I'm bit confuing between 2 problems with libvirt-0.6.5 for OpenVZ. [1] bridge was created but no interface assigned to it [2] virsh dumpxml returns xml in which type is qemu [1] - I tried libvirt-0.6.5 on Fedora8 to create OpenVZ container (