Re: [libvirt] PATCH: Fix many many win32 bugs

2009-07-23 Thread Daniel Veillard
On Wed, Jul 22, 2009 at 09:09:25PM +0100, Daniel P. Berrange wrote: Latest GCC changed the meaning of 'printf' attribute annotation to refer to the host platform's native format specifiers. On Win32/mingw32 this means it is now validating against Microsoft's useless format specifiers. We

Re: [libvirt] MemoryPeek() is slow

2009-07-23 Thread Richard W.M. Jones
On Thu, Jul 23, 2009 at 01:36:30PM +0900, Jun Koi wrote: For now, I want to improve the situation on QEMU (thus, KVM) first. One obvious way is to transfer data directly from QEMU driver to QEMU using a particular IPC. How about having an Unix domain socket for this purpose? I imagine that

Re: [libvirt] VMware ESX driver progress

2009-07-23 Thread Matthias Bolte
2009/7/22 Daniel Veillard veill...@redhat.com: On Wed, Jul 22, 2009 at 05:24:09PM +0100, Daniel P. Berrange wrote: 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

Re: [libvirt] [PATCH] Add huge page support to libvirt..

2009-07-23 Thread Daniel P. Berrange
On Wed, Jul 22, 2009 at 09:25:02PM -0400, john cooper wrote: This patch allows passing of a -mem-path arg flag to qemu for support of huge page backed guests. A guest may request this option via specifying: hugepageon/hugepage in its domain definition xml file. This really opens a

Re: [libvirt] [PATCH 2/2] Add domain autostart for LXC driver

2009-07-23 Thread Daniel P. Berrange
On Wed, Jul 22, 2009 at 06:52:11PM +0200, Daniel Veillard wrote: On Wed, Jul 22, 2009 at 05:02:56PM +0100, Daniel P. Berrange wrote: * src/lxc_driver.c: Implement support for domain autostart Signed-off-by: Daniel P. Berrange berra...@redhat.com except that +static void

Re: [libvirt] [PATCH 1/2] Add domain events support to LXC driver

2009-07-23 Thread Daniel P. Berrange
On Wed, Jul 22, 2009 at 06:49:26PM +0200, Daniel Veillard wrote: On Wed, Jul 22, 2009 at 05:02:55PM +0100, Daniel P. Berrange wrote: * src/lxc_conf.h: Add queue for dispatch of domain events * src/lxc_driver.c: Trigger domain events upon important lifecycle transitions [...] @@ -293,6

Re: [libvirt] [PATCH] Add bare %s format string to printf-derivatives called with no format string

2009-07-23 Thread Daniel P. Berrange
On Wed, Jul 22, 2009 at 04:22:22PM -0400, Laine Stump wrote: --- src/datatypes.c | 24 src/domain_conf.c |9 + src/interface_conf.c |4 ++-- src/lxc_driver.c |2 +- src/qemu_driver.c |4 ++-- src/storage_backend.c |

Re: [libvirt] clone memory leak and libvirt connection selection

2009-07-23 Thread Daniel P. Berrange
On Wed, Jul 22, 2009 at 09:32:31PM -0700, Johnny Luong wrote: Hi, I'm trying to use libvirt-0.6.5 within a multithreaded application without libvirtd and from what it looks like, it appears to have two things that are somewhat undesirable: 1) It tries to connect to libvirtd which isn't

Re: [libvirt] VMware ESX driver progress

2009-07-23 Thread Daniel Veillard
On Tue, Jul 21, 2009 at 04:58:50PM +0200, Matthias Bolte wrote: Now reviewing the main code, [...] +typedef struct _esxPrivate { +esxVI_Context *host; +esxVI_Context *vcenter; +int phantom; // boolean Do we really need phantom ? this is basically a debug mode with no real

Re: [libvirt] [PATCH] Add bare %s format string to printf-derivatives called with no format string

2009-07-23 Thread Laine Stump
On 07/23/2009 06:53 AM, Daniel P. Berrange wrote: On Wed, Jul 22, 2009 at 04:22:22PM -0400, Laine Stump wrote: --- src/datatypes.c | 24 src/domain_conf.c |9 + src/interface_conf.c |4 ++-- src/lxc_driver.c |2 +-

Re: [libvirt] [PATCH 1/8] Use enums for cgroup controller types / labels

2009-07-23 Thread Daniel Veillard
On Wed, Jul 22, 2009 at 04:23:40PM +0100, Daniel P. Berrange wrote: Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/cgroup.c | 46 +- 1 files changed, 29 insertions(+), 17 deletions(-) nicer, ACK Daniel -- Daniel Veillard

Re: [libvirt] [PATCH 2/8] Use virFileReadAll/virFileWriteStr for key cgroup read/write helpers

2009-07-23 Thread Daniel Veillard
On Wed, Jul 22, 2009 at 04:23:41PM +0100, Daniel P. Berrange wrote: Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/cgroup.c | 87 ++ ACK, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit

Re: [libvirt] [PATCH 3/8] Make cgroups a little more efficient

2009-07-23 Thread Daniel Veillard
On Wed, Jul 22, 2009 at 04:23:42PM +0100, Daniel P. Berrange wrote: * src/cgroup.c: Detect the mount location of every controller at time a virCgroupPtr is created. Detect current process' placement within group to avoid assuming it is in the root. Pass controller ID into

Re: [libvirt] [PATCH] Add huge page support to libvirt..

2009-07-23 Thread john cooper
Mark McLoughlin wrote: Other options include: - hugepages/ - memory hugepages=yesX/memory Yes, I'd expect additional options will need to be addressed. Currently the only additional qemu-resident knob is the -mem-prealloc flag which is enabled by default. I've removed support

Re: [libvirt] [PATCH] Add huge page support to libvirt..

2009-07-23 Thread john cooper
Daniel P. Berrange wrote: On Wed, Jul 22, 2009 at 09:25:02PM -0400, john cooper wrote: This patch allows passing of a -mem-path arg flag to qemu for support of huge page backed guests. A guest may request this option via specifying: hugepageon/hugepage in its domain definition xml

Re: [libvirt] [PATCH 4/8] Refactor cgroups to allow a group per driver to be managed directly

2009-07-23 Thread Daniel Veillard
On Wed, Jul 22, 2009 at 04:23:43PM +0100, Daniel P. Berrange wrote: Allow the driver level cgroup to be managed explicitly by the hypervisor drivers, in order to detect whether to enable or disable cgroup support for domains. Provides better error reporting of failures. Also allow for creation

Re: [libvirt] [PATCH 5/8] Place every QEMU guest in a private cgroup

2009-07-23 Thread Daniel Veillard
On Wed, Jul 22, 2009 at 04:23:44PM +0100, Daniel P. Berrange wrote: * src/qemu_driver.c: Place guest in cgroup upon startup. Remove cgroup upon shutdown Okay @@ -1668,7 +1769,7 @@ static int qemudStartVMDaemon(virConnectPtr conn, char *pidfile = NULL; int logfile; -

Re: [libvirt] [PATCH 7/8] Use cgroups for block device whitelisting in QEMU guests

2009-07-23 Thread Daniel Veillard
On Wed, Jul 22, 2009 at 04:23:46PM +0100, Daniel P. Berrange wrote: * src/qemu_driver.c: Set a restrictive block device whitelist for all QEMU guests. Update whitelist when hotplugging disks. * src/cgroup.h, src/cgroup.c: Add some more convenience methods for dealing with block device

Re: [libvirt] [PATCH 8/8] Make QEMU cgroups use configurable

2009-07-23 Thread Daniel Veillard
On Wed, Jul 22, 2009 at 04:23:47PM +0100, Daniel P. Berrange wrote: * qemud/libvirtd_qemu.aug, qemud/test_libvirtd_qemu.aug, src/qemu.conf: Add 'cgroups_controllers' and 'cgroups_device_acl' parameters * src/qemu_conf.h, src/qemu_conf.c: Load parse configuration params for cgroups

Re: [libvirt] [PATCH 6/8] Implement schedular tunables API using cgroups

2009-07-23 Thread Daniel P. Berrange
On Thu, Jul 23, 2009 at 05:38:45PM +0200, Daniel Veillard wrote: On Wed, Jul 22, 2009 at 04:23:45PM +0100, Daniel P. Berrange wrote: * src/qemu_driver.c: Add driver methods qemuGetSchedulerType, qemuGetSchedulerParameters, qemuSetSchedulerParameters * src/lxc_driver.c: Fix to use

Re: [libvirt] [PATCH 6/8] Implement schedular tunables API using cgroups

2009-07-23 Thread Daniel Veillard
On Thu, Jul 23, 2009 at 04:53:56PM +0100, Daniel P. Berrange wrote: On Thu, Jul 23, 2009 at 05:38:45PM +0200, Daniel Veillard wrote: On Wed, Jul 22, 2009 at 04:23:45PM +0100, Daniel P. Berrange wrote: * src/qemu_driver.c: Add driver methods qemuGetSchedulerType,

Re: [libvirt] [PATCH] Add bare %s format string to printf-derivatives called with no format string

2009-07-23 Thread Daniel Veillard
On Thu, Jul 23, 2009 at 11:01:15AM -0400, Laine Stump wrote: On 07/23/2009 06:53 AM, Daniel P. Berrange wrote: On Wed, Jul 22, 2009 at 04:22:22PM -0400, Laine Stump wrote: --- src/datatypes.c | 24 src/domain_conf.c |9 +

[libvirt] [PATCH 1/6] Cleanup qemu binary detection logic in qemudCapsInitGuest()

2009-07-23 Thread Mark McLoughlin
There's no need for the hasbase/hasaltbase confusion, just store the first binary path found in a variable. * src/qemu_conf.c: kill hasbase/hasaltbase logic in qemudCapsInitGuest() --- src/qemu_conf.c | 17 + 1 files changed, 9 insertions(+), 8 deletions(-) diff --git

[libvirt] [PATCH 4/6] Canonicalize qemu machine types

2009-07-23 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

[libvirt] [PATCH 5/6] Probe QEMU directly for machine aliases if not found in capabilties

2009-07-23 Thread Mark McLoughlin
Not all possible emulators are actually in the capabilities, so if we don't find the supplied emulator we should probe it directly for machine types. * src/qemu_driver.c: add qemudCanonicalizeMachineDirect() to directly probe an emulator for the canonical machine type --- src/qemu_conf.c |

[libvirt] [PATCH 2/6] Probe for QEMU machine types

2009-07-23 Thread Mark McLoughlin
Currently we hardcode the QEMU machine types. We should really just parse the output of 'qemu -M ?' so the lists don't get out of sync. xenner doesn't support '-M ?', so we still need to hardcode that. The horrible (const char *const *) is removed in a subsequent patch. * src/qemu_conf.c: kill

[libvirt] [PATCH 6/6] Add canonical machine name to capabilities output

2009-07-23 Thread Mark McLoughlin
e.g. machine canonical='pc'pc-0.11/machine * src/capabilities.c: output the canonical machine names in the capabilities output, if available --- src/capabilities.c | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/capabilities.c b/src/capabilities.c

Re: [libvirt] [PATCH] Canonicalize qemu machine types

2009-07-23 Thread Mark McLoughlin
Hey, Here's a series of patches to implement danpb's suggestion of using 'qemu -M ?' to probe for valid machine types and then to build on that for the machine type canonicalization. Cheers, Mark. -- Libvir-list mailing list Libvir-list@redhat.com

[libvirt] [PATCH 3/6] Add virCapsGuestMachine structure

2009-07-23 Thread Mark McLoughlin
A subsequent commit will add a canonical field to this structure, this patch basically just prepares the way for that. The new type is added, along with virCapabilitiesAlloc/FreeMachines() helpers and a whole bunch of code to make the transition. One quirk is that virCapabilitiesAddGuestDomain()

Re: [libvirt] [PATCH] Canonicalize qemu machine types

2009-07-23 Thread Cole Robinson
On 07/23/2009 01:34 PM, Mark McLoughlin wrote: Hey, Here's a series of patches to implement danpb's suggestion of using 'qemu -M ?' to probe for valid machine types and then to build on that for the machine type canonicalization. Cheers, Mark. What's the speed difference of

Re: [libvirt] [PATCH] Add huge page support to libvirt..

2009-07-23 Thread Chris Wright
* Mark McLoughlin (mar...@redhat.com) wrote: I'd suggest /dev/hugepages as the default - /hugetlbfs has an seriously unstandard whiff about it What about /var/lib/libvirt/qemu/hugetlb and having the whole thing under libvirt's control? It can allow for better security I think. thanks, -chris

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

2009-07-23 Thread Dave Allan
Daniel P. Berrange wrote: On Tue, Jul 21, 2009 at 05:25:36PM -0400, David Allan wrote: 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

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

2009-07-23 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 01:11:56PM +0200, Miloslav Trma?? wrote: 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

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

2009-07-23 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 01:11:57PM +0200, Miloslav Trma?? wrote: 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

Re: [libvirt] VMware ESX driver progress

2009-07-23 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

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

2009-07-23 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 01:11:58PM +0200, Miloslav Trma?? wrote: 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.

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

2009-07-23 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 01:11:59PM +0200, Miloslav Trma?? wrote: (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

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

2009-07-23 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 01:12:00PM +0200, Miloslav Trma?? wrote: 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

[libvirt] [PATCH] document telnet serial console options

2009-07-23 Thread Guido Günther
Hi, attached patch updates the console docs a bit. O.k. to apply? Cheers, -- Guido From 204361a3f015601e389f9ab83a2590906cb44581 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Guido=20G=C3=BCnther?= a...@sigxcpu.org Date: Thu, 23 Jul 2009 09:39:22 +0200 Subject: [PATCH] document tcp listen and raw wire

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

2009-07-23 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 01:12:01PM +0200, Miloslav Trma?? wrote: 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

Re: [libvirt] [PATCH 9/9] Add support for qcow encrypted volumes to qemu.

2009-07-23 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 01:12:05PM +0200, Miloslav Trma?? wrote: --- src/qemu_driver.c | 51 ++- 1 files changed, 50 insertions(+), 1 deletions(-) IIUC this should only be needed when starting a QEMU guest. The 'cont' method is called from

Re: [libvirt] [PATCH] Add huge page support to libvirt..

2009-07-23 Thread Chris Wright
* Daniel P. Berrange (berra...@redhat.com) wrote: On Thu, Jul 23, 2009 at 11:35:17AM -0700, Chris Wright wrote: * Mark McLoughlin (mar...@redhat.com) wrote: I'd suggest /dev/hugepages as the default - /hugetlbfs has an seriously unstandard whiff about it What about

Re: [libvirt] [PATCH] Power Hypervisor support

2009-07-23 Thread Daniel P. Berrange
On Wed, Jul 22, 2009 at 04:01:47PM -0300, Eduardo Otubo wrote: Hello everyone, This should be the official patch for the libvrt-0.7.0 release. Here I'll comment all the features already implemented and the roadmap we have ahead: Features supported: * Connects to HMC/VIOS or IVM systems.

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

2009-07-23 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 01:12:03PM +0200, Miloslav Trma?? wrote: --- src/qemu_driver.c | 87 1 files changed, 73 insertions(+), 14 deletions(-) I have a feeling this patch is going to clash horribly with the refactoring Mark just did of

Re: [libvirt] [PATCH 8/9] Consolidate cont into qemudMonitorSendCont().

2009-07-23 Thread Daniel P. Berrange
On Tue, Jul 21, 2009 at 01:12:04PM +0200, Miloslav Trma?? wrote: Also fix a potential infinite loop in qemuDomainCoreDump() if sending cont repeatedly fails. --- src/qemu_driver.c | 43 ++- 1 files changed, 18 insertions(+), 25 deletions(-) Looks

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

2009-07-23 Thread Miloslav Trmac
Daniel, thanks for the review. - Daniel P. Berrange berra...@redhat.com wrote: 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' passphrasec2lsbHk=/passphrase

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

2009-07-23 Thread Miloslav Trmac
- Daniel P. Berrange berra...@redhat.com wrote: On Tue, Jul 21, 2009 at 01:12:00PM +0200, Miloslav Trma?? wrote: Supports only virStorageVolCreateXML, not virStorageVolCreateXMLFrom. Curiously, qemu-img does not need the passphrase for anything to create an encrypted volume. This

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

2009-07-23 Thread Miloslav Trmac
- Daniel P. Berrange berra...@redhat.com wrote: As per other mails, I don't think its neccessary to drop the secrets from volumes here. At least not until we introduce keystores as an explicit public API As per other mails, it is necessary not to tell the secrets to clients. Given that,

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

2009-07-23 Thread Miloslav Trmac
- Daniel P. Berrange berra...@redhat.com wrote: On Tue, Jul 21, 2009 at 01:12:01PM +0200, Miloslav Trma?? wrote: This looks fine as a way to integrate. BTW, the XML schemas should be updated under docs/schemas/domain.rng and docs/schemas/storagevol.rng Will do. Mirek -- Libvir-list

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

2009-07-23 Thread Miloslav Trmac
- Daniel P. Berrange berra...@redhat.com wrote: On Tue, Jul 21, 2009 at 01:12:03PM +0200, Miloslav Trma?? wrote: --- src/qemu_driver.c | 87 1 files changed, 73 insertions(+), 14 deletions(-) I have a feeling this patch is

Re: [libvirt] [PATCH 9/9] Add support for qcow encrypted volumes to qemu.

2009-07-23 Thread Miloslav Trmac
- Daniel P. Berrange berra...@redhat.com wrote: On Tue, Jul 21, 2009 at 01:12:05PM +0200, Miloslav Trma?? wrote: --- src/qemu_driver.c | 51 ++- 1 files changed, 50 insertions(+), 1 deletions(-) IIUC this should only be needed when

[libvirt] How to call QEMU with -snapshot ?

2009-07-23 Thread Jun Koi
Hi, I want to execute qemu (actually is KVM, qemu-system_x86-64) with -snapshot. Is there any way to do that? I tried following ways, and none works: - Put -snapshot in emulator in configuration file. - Create a script calling qemu -snapshot, and rename it to qemu-system_x86-64 (and of course i