[libvirt] [PATCH 2/5] build: replace redundant header check with function check

2010-04-28 Thread Eric Blake
Gnulib guarantees that pthread.h exists, but for now, it is a dummy header with no support for most pthread_* functions. Modify our use of pthread to use function checks, rather than header checks, to determine how much pthread support is present. * configure.ac: Optimize function checks. Add ch

[libvirt] [PATCH 3/5] build: use gnulib's uname

2010-04-28 Thread Eric Blake
* bootstrap.conf (gnulib_modules): Add uname. * configure.ac: Drop uname and sys/utsname.h checks. * src/nodeinfo.c (nodeGetInfo): Use uname unconditionally. --- bootstrap.conf |1 + configure.ac |4 ++-- src/nodeinfo.c | 12 ++-- 3 files changed, 5 insertions(+), 12 deletions(

[libvirt] [PATCH 5/5] build: drop more redundant configure checks

2010-04-28 Thread Eric Blake
* configure.ac (AC_CHECK_FUNCS_ONCE, AC_SYS_LARGEFILE): Rely on gnulib for strtok_r and large file support. (AC_OBJEXT): Drop call now done by AC_PROG_CC. (m4_foreach_w): Drop macro guaranteed by gnulib. (AC_C_CONST): Drop call declared obsolete by autoconf. Signed-off-by: Eric Blake --- configu

[libvirt] virFileHasSuffix case sensitivity

2010-04-28 Thread Paul Dorman
Hi all, virFileHasSuffix fails on esx IDE fileName VMX entries that aren't lower case, e.g. '.ISO'. Unless there's a good reason, can the comparison be done with STRCASEEQ instead of STREQ? Kind regards, Paul -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listin

Re: [libvirt] [PATCHv2 2/2] build: fix VPATH build of docs

2010-04-28 Thread Eric Blake
On 04/28/2010 07:37 PM, Eric Blake wrote: > The rule of thumb for generated files: > If they are distributed, they should be generated in $(srcdir); > otherwise, they should be built by the end user in $(builddir). A minor clarification: a generated file must be machine-independent before it is a

[libvirt] [PATCHv2 2/2] build: fix VPATH build of docs

2010-04-28 Thread Eric Blake
The rule of thumb for generated files: If they are distributed, they should be generated in $(srcdir); otherwise, they should be built by the end user in $(builddir). Since our .xml docs are built with python, and we want them available even to end users that don't build with python, we want them d

[libvirt] [PATCHv2 3/2] docs/Makefile.am: remove unnecessary subshells

2010-04-28 Thread Eric Blake
* docs/Makefile.am (ChangeLog.html.in, %.html.tmp, %.html) (html/index.html, $(devhelphtml)): Avoid spurious subshells. --- This is pretty trivial; I noticed it while building the previous patch. docs/Makefile.am | 32 +--- 1 files changed, 17 insertions(+), 15 dele

Re: [libvirt] [PATCH] cygwin/mingw: Fix version script handling

2010-04-28 Thread Matthias Bolte
2010/4/27 Daniel Veillard : > On Tue, Apr 27, 2010 at 10:01:41AM +0200, Matthias Bolte wrote: >> Let configure detect ld instead of hardcoding /usr/bin/ld, because >> MinGW may have ld in /bin. >> >> Only use a .def file to export symbols on MinGW. Cygwin's ld supports >> the normal .syms file used

Re: [libvirt] [PATCH] Fix a virsh edit memory leak

2010-04-28 Thread Eric Blake
On 04/28/2010 02:27 PM, Chris Lalancette wrote: > When running virsh edit, we are unlinking and setting > the tmp variable to NULL before going to the end of the > function, meaning that we never free tmp. Since the > exit to the function will always unlink and free tmp, > just remove this bit of

Re: [libvirt] [PATCH] Fix a qemuDomainPCIAddressSetFree memory leak

2010-04-28 Thread Eric Blake
On 04/28/2010 02:27 PM, Chris Lalancette wrote: > qemuDomainPCIAddressSetFree was freeing up the hash > table for the pci addresses, but not freeing up the addr > structure. Looking over the callers of this function, it > seems like they expect it to also free up the structure, > so do that here.

Re: [libvirt] [PATCH] Fix a memory leak in the node_device_udev code

2010-04-28 Thread Eric Blake
On 04/28/2010 02:27 PM, Chris Lalancette wrote: > We were over-writing a pointer without freeing it in > case of a disk device, leading to a memory leak. > > Signed-off-by: Chris Lalancette > --- > src/node_device/node_device_udev.c |7 --- > 1 files changed, 0 insertions(+), 7 deletions

Re: [libvirt] new NULL-dereference in qemu_driver.c

2010-04-28 Thread Jim Meyering
Chris Lalancette wrote: > On 04/28/2010 11:43 AM, Jim Meyering wrote: >> Chris Lalancette wrote: >>> On 04/27/2010 04:40 PM, Jim Meyering wrote: Daniel P. Berrange wrote: > On Tue, Apr 27, 2010 at 06:45:16PM +0200, Jim Meyering wrote: >> I ran clang on the very latest and it spott

Re: [libvirt] [PATCH] Fix build on Ubuntu.

2010-04-28 Thread Eric Blake
On 04/28/2010 02:27 PM, Chris Lalancette wrote: > When building on Ubuntu with make -j3 (or more), it would always > fail when trying to build virt-aa-helper. I'm not an expert in > automake by any means, but I think the entry for virt-aa-helper > is mis-using LDADD; it shouldn't be putting direct

Re: [libvirt] [PATCH] Report better error if qemuSnapshotIsAllowed failed.

2010-04-28 Thread Eric Blake
On 04/28/2010 02:27 PM, Chris Lalancette wrote: > Signed-off-by: Chris Lalancette > --- > src/qemu/qemu_driver.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c > index f7084ca..5ab211a 100644 > --- a/src/qemu/qemu_

Re: [libvirt] new NULL-dereference in qemu_driver.c

2010-04-28 Thread Chris Lalancette
On 04/28/2010 11:43 AM, Jim Meyering wrote: > Chris Lalancette wrote: >> On 04/27/2010 04:40 PM, Jim Meyering wrote: >>> Daniel P. Berrange wrote: >>> On Tue, Apr 27, 2010 at 06:45:16PM +0200, Jim Meyering wrote: > I ran clang on the very latest and it spotted this problem: > >From qem

[libvirt] [PATCH] Fix a memory leak in the node_device_udev code

2010-04-28 Thread Chris Lalancette
We were over-writing a pointer without freeing it in case of a disk device, leading to a memory leak. Signed-off-by: Chris Lalancette --- src/node_device/node_device_udev.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/src/node_device/node_device_udev.c b/src/no

[libvirt] [PATCH] Fix build on Ubuntu.

2010-04-28 Thread Chris Lalancette
When building on Ubuntu with make -j3 (or more), it would always fail when trying to build virt-aa-helper. I'm not an expert in automake by any means, but I think the entry for virt-aa-helper is mis-using LDADD; it shouldn't be putting direct paths to libvirt_conf.la and libvirt_util.la, but inste

[libvirt] [PATCH] Report better error if qemuSnapshotIsAllowed failed.

2010-04-28 Thread Chris Lalancette
Signed-off-by: Chris Lalancette --- src/qemu/qemu_driver.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f7084ca..5ab211a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10782,8 +10782,8 @@ st

[libvirt] [PATCH] Fix a qemuDomainPCIAddressSetFree memory leak

2010-04-28 Thread Chris Lalancette
qemuDomainPCIAddressSetFree was freeing up the hash table for the pci addresses, but not freeing up the addr structure. Looking over the callers of this function, it seems like they expect it to also free up the structure, so do that here. Signed-off-by: Chris Lalancette --- src/qemu/qemu_conf.

[libvirt] [PATCH] Fix a virsh edit memory leak

2010-04-28 Thread Chris Lalancette
When running virsh edit, we are unlinking and setting the tmp variable to NULL before going to the end of the function, meaning that we never free tmp. Since the exit to the function will always unlink and free tmp, just remove this bit of code and let it get done at the end. Signed-off-by: Chris

[libvirt] [PATCH v2 7/8] Implement virsh qemu-monitor-command.

2010-04-28 Thread Chris Lalancette
Changes since v1: - Add virsh.pod documentation Signed-off-by: Chris Lalancette --- tools/Makefile.am |1 + tools/virsh.c | 55 + tools/virsh.pod | 16 +++ 3 files changed, 72 insertions(+), 0 deletions(-) diff --git

[libvirt] [PATCH v2 6/8] Qemu remote protocol.

2010-04-28 Thread Chris Lalancette
Since we are adding a new "per-hypervisor" protocol, we make it so that the qemu remote protocol uses a new PROTOCOL and PROGRAM number. This allows us to easily distinguish it from the normal REMOTE protocol. This necessitates changing the proc in remote_message_header from a "remote_procedure"

[libvirt] [PATCH v2 8/8] Add tests for the new Qemu namespace XML.

2010-04-28 Thread Chris Lalancette
Thanks to DV for knocking together the Relax-NG changes quickly for me. Changes since v1: - Change the domain.rng to correspond to the new schema - Don't allocate caps->ns in testQemuCapsInit since it is a static table Signed-off-by: Chris Lalancette --- docs/schemas/domain.rng

[libvirt] [PATCH v2 2/8] Qemu arbitrary command-line arguments.

2010-04-28 Thread Chris Lalancette
Implement the qemu hooks for XML namespace data. This allows us to specify a qemu XML namespace, and then specify: In the domain XML. Changes since v1: - Change the arg XML to XML - Fix up some memory leaks in qemuDomainDefNamespaceParse - Rename num_extra and extra to num_args and ar

[libvirt] [PATCH v2 5/8] Qemu arbitrary monitor commands.

2010-04-28 Thread Chris Lalancette
Implement the qemu driver's virDomainQemuMonitorCommand and hook it into the API entry point. Changes since v1: - Rename the (external) qemuMonitorCommand to qemuDomainMonitorCommand - Add virCheckFlags to qemuDomainMonitorCommand Signed-off-by: Chris Lalancette --- src/qemu/qemu_driver.c

[libvirt] [PATCH v2 4/8] Qemu Monitor API entry point.

2010-04-28 Thread Chris Lalancette
Add the library entry point for the new virDomainQemuMonitorCommand() entry point. Because this is not part of the "normal" libvirt API, it gets it's own header file, library file, and will eventually get it's own over-the-wire protocol later in the series. Changes since v1: - Go back to using t

[libvirt] [PATCH v2 0/8]: Add arbitrary qemu command-line and monitor commands

2010-04-28 Thread Chris Lalancette
As we discussed previously, here is the patch series to add the ability to specify arbitrary qemu command-line parameters and environment variables, and also give arbitrary monitor commands to a guest. Because these extra arguments have a good shot at confusing libvirt, the use of them is not supp

[libvirt] [PATCH v2 1/8] Add namespace callback hooks to domain_conf.

2010-04-28 Thread Chris Lalancette
This patch adds namespace XML parsers to be hooked into the main domain parser. This allows for individual hypervisor drivers to add per-namespace XML into the main domain XML. Changes since v1: - Use a statically declared table for caps->ns, removing the need to allocate/free it. Signed-off

[libvirt] [PATCH v2 3/8] Handle arbitrary qemu command-lines in qemuParseCommandLine.

2010-04-28 Thread Chris Lalancette
Now that we have the ability to specify arbitrary qemu command-line parameters in the XML, use it to handle unknown command-line parameters when doing a native-to-xml conversion. Changes since v1: - Rename num_extra to num_args - Fix up a memory leak on an error path Signed-off-by: Chris Lalanc

[libvirt] [PATCH] nwfilter: python bindings for nwfilter

2010-04-28 Thread Stefan Berger
I have primarily followed the pattern of the 'secret' driver to provide support for the missing python bindings for the network filter API. Signed-off-by: Stefan Berger --- python/generator.py | 35 ++- python/libvirt-override-api.xml | 21 ++ python/libvirt-override

Re: [libvirt] [PATCH] Fix handling of disk backing stores with cgroups

2010-04-28 Thread Eric Blake
On 04/28/2010 09:27 AM, Daniel P. Berrange wrote: > +memset(&meta, 0, sizeof(meta)); > + > +ret = virStorageFileGetMetadata(path, &meta); > + > +if (path != vm->def->disks[i]->src) > +VIR_FREE(path); > +path = NULL;

Re: [libvirt] [PATCH 2/2] build: fix python in VPATH build

2010-04-28 Thread Jim Meyering
Eric Blake wrote: > On 04/28/2010 04:29 AM, Jim Meyering wrote: >> Eric Blake wrote: >>> Match the fact that docs/Makefile.am dumps libvirt-api.xml in the >>> build dir, not the source dir. >>> >>> * python/Makefile.am (API_DESC): Point make to the builddir for .xml files. >>> * python/generator.p

Re: [libvirt] [PATCH TCK] Add a test for QCow2 files with a backing store

2010-04-28 Thread Daniel P. Berrange
On Wed, Apr 28, 2010 at 09:42:49AM -0600, Eric Blake wrote: > On 04/28/2010 09:31 AM, Daniel P. Berrange wrote: > > diff --git a/scripts/qemu/150-disk-backingstore.t > > b/scripts/qemu/150-disk-backingstore.t > > new file mode 100644 > > index 000..62d8faf > > --- /dev/null > > +++ b/scripts/q

Re: [libvirt] [PATCH TCK] Add a test for QCow2 files with a backing store

2010-04-28 Thread Eric Blake
On 04/28/2010 09:31 AM, Daniel P. Berrange wrote: > diff --git a/scripts/qemu/150-disk-backingstore.t > b/scripts/qemu/150-disk-backingstore.t > new file mode 100644 > index 000..62d8faf > --- /dev/null > +++ b/scripts/qemu/150-disk-backingstore.t > @@ -0,0 +1,97 @@ > +# -*- perl -*- > +# > +#

Re: [libvirt] new NULL-dereference in qemu_driver.c

2010-04-28 Thread Jim Meyering
Chris Lalancette wrote: > On 04/27/2010 04:40 PM, Jim Meyering wrote: >> Daniel P. Berrange wrote: >> >>> On Tue, Apr 27, 2010 at 06:45:16PM +0200, Jim Meyering wrote: I ran clang on the very latest and it spotted this problem: >From qemu_driver.c, around line 11100, else {

[libvirt] [PATCH TCK] Add a test for QCow2 files with a backing store

2010-04-28 Thread Daniel P. Berrange
This test case verifies that it is possible to run QEMU guest from a qcow2 file with a backing store pointing to a physical disk. This verifies backing store handling with SELinux, UID/GID changing code and CGroups ACLs * scripts/qemu/150-disk-backingstore.t: New test case * lib/Sys/Virt/TCK/Stora

[libvirt] [PATCH] Fix handling of disk backing stores with cgroups

2010-04-28 Thread Daniel P. Berrange
The cgroups ACL code was only allowing the primary disk image. It is possible to chain images together, so we need to search for backing stores and add them to the ACL too. Since the ACL only handles block devices, we ignore the EINVAL we get from plain files. * src/qemu/qemu_driver.c: Allow backi

Re: [libvirt] [PATCH] build: fix autogen rule for VPATH build

2010-04-28 Thread Eric Blake
On 04/28/2010 07:00 AM, Daniel Veillard wrote: >> ACK. Given Jim's ACK, and my discussion below, I've pushed 1/2 as-is. I'll wait for further comments and a v2 of my 2/2 patch before pushing it. > BTW since we have auto* experts around, I tend to use the CDPATH > environment variable to make n

Re: [libvirt] [PATCH 3/4] Fix QEMU save/restore with block devices

2010-04-28 Thread Laine Stump
On 04/28/2010 08:49 AM, Daniel P. Berrange wrote: On Sun, Apr 25, 2010 at 03:04:21AM -0400, Laine Stump wrote: On 04/24/2010 12:50 AM, Laine Stump wrote: Is it really necessary to add this padding even when we *aren't* using dd? (ie, when is_reg == 1). Nevermind. Now that I'v

Re: [libvirt] [PATCH 2/2] build: fix python in VPATH build

2010-04-28 Thread Eric Blake
On 04/28/2010 04:29 AM, Jim Meyering wrote: > Eric Blake wrote: >> Match the fact that docs/Makefile.am dumps libvirt-api.xml in the >> build dir, not the source dir. >> >> * python/Makefile.am (API_DESC): Point make to the builddir for .xml files. >> * python/generator.py (buildStubs): Output in c

Re: [libvirt] [PATCH 6/6] Implement python binding for virDomainGetBlockInfo

2010-04-28 Thread Daniel Veillard
On Wed, Apr 28, 2010 at 04:19:48PM +0200, Daniel Veillard wrote: > On Wed, Apr 28, 2010 at 01:54:50PM +0100, Daniel P. Berrange wrote: > > This binds the virDomainGetBlockInfo API to python's blockInfo > > method on the domain object > [...] > > static PyObject * > > +libvirt_virDomainGetBlockInfo

Re: [libvirt] [PATCH] Fix detection of disk in IO events

2010-04-28 Thread Daniel Veillard
On Wed, Apr 28, 2010 at 03:16:21PM +0100, Daniel P. Berrange wrote: > When using -device syntax, the IO event will have a different > prefix, 'drive-' that needs to be skipped over before matching > against the libvirt disk alias > > * src/qemu/qemu_driver.c: Skip QEMU_DRIVE_HOST_PREFIX in IO even

Re: [libvirt] [PATCH 1/6] Add virDomainGetBlockInfo API to query disk sizing

2010-04-28 Thread Daniel P. Berrange
On Wed, Apr 28, 2010 at 04:19:11PM +0200, Daniel Veillard wrote: > On Wed, Apr 28, 2010 at 01:54:45PM +0100, Daniel P. Berrange wrote: > > Some applications need to be able to query a guest's disk info, > > even for paths not managed by the storage pool APIs. This adds > > a very simple API to get

Re: [libvirt] [PATCH 6/6] Implement python binding for virDomainGetBlockInfo

2010-04-28 Thread Daniel P. Berrange
On Wed, Apr 28, 2010 at 04:19:48PM +0200, Daniel Veillard wrote: > On Wed, Apr 28, 2010 at 01:54:50PM +0100, Daniel P. Berrange wrote: > > This binds the virDomainGetBlockInfo API to python's blockInfo > > method on the domain object > [...] > > static PyObject * > > +libvirt_virDomainGetBlockInfo

Re: [libvirt] [PATCH 1/6] Add virDomainGetBlockInfo API to query disk sizing

2010-04-28 Thread Daniel Veillard
On Wed, Apr 28, 2010 at 01:54:45PM +0100, Daniel P. Berrange wrote: > Some applications need to be able to query a guest's disk info, > even for paths not managed by the storage pool APIs. This adds > a very simple API to get this information, modelled on the > virStorageVolGetInfo API, but with an

Re: [libvirt] [PATCH 6/6] Implement python binding for virDomainGetBlockInfo

2010-04-28 Thread Daniel Veillard
On Wed, Apr 28, 2010 at 01:54:50PM +0100, Daniel P. Berrange wrote: > This binds the virDomainGetBlockInfo API to python's blockInfo > method on the domain object [...] > static PyObject * > +libvirt_virDomainGetBlockInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject > *args) { [...] > +c_retval

[libvirt] [PATCH] Fix detection of disk in IO events

2010-04-28 Thread Daniel P. Berrange
When using -device syntax, the IO event will have a different prefix, 'drive-' that needs to be skipped over before matching against the libvirt disk alias * src/qemu/qemu_driver.c: Skip QEMU_DRIVE_HOST_PREFIX in IO event --- src/qemu/qemu_driver.c |3 +++ 1 files changed, 3 insertions(+), 0

Re: [libvirt] [PATCH] Use a new directory for dnsmasq files

2010-04-28 Thread Daniel Veillard
On Tue, Apr 27, 2010 at 08:19:30AM -0600, Eric Blake wrote: > On 04/27/2010 07:51 AM, Daniel Veillard wrote: > > Move dnsmasq host file to a separate directory > > > > use /var/lib/libvirt/dnsmasq since /var/lib/libvirt/network is > > unreadable by the dnsmasq binary > > > > * src/network/bridge_

Re: [libvirt] [PATCH 4/6] Implement virDomainGetBlockInfo in QEMU driver

2010-04-28 Thread Jim Meyering
Daniel P. Berrange wrote: > * src/qemu/qemu_driver.c: Implementation of virDomainGetBlockInfo > * src/util/storage_file.h: Add DEV_BSIZE > * src/storage/storage_backend.c: Remove DEV_BSIZE ... Hi Dan, This whole series looks fine. > +static int qemuDomainGetBlockInfo(virDomainPtr dom, It's sligh

Re: [libvirt] [PATCH] nwfilter: allow to mix filterrefs and rules in the schema

2010-04-28 Thread Stefan Berger
Daniel Veillard wrote on 04/28/2010 09:01:58 AM: > > docs/schemas/nwfilter.rng | 472 > > +++--- > > 1 file changed, 237 insertions(+), 235 deletions(-) > > Okay, looks fine, ACK, Pushed. Stefan-- libvir-list mailing list libvir-list@redhat.com h

Re: [libvirt] [PATCH] nwfilter: allow to mix filterrefs and rules in the schema

2010-04-28 Thread Daniel Veillard
On Tue, Apr 27, 2010 at 07:43:23PM -0400, Stefan Berger wrote: > So far the references to other filters needed to appear before filtering > rules. With the below patch they can now appear in any order. > > Also I forgot to add a couple of 'rarp's. > > Signed-off-by: Stefan Berger > > --- > doc

Re: [libvirt] [PATCH] build: fix autogen rule for VPATH build

2010-04-28 Thread Daniel Veillard
On Wed, Apr 28, 2010 at 12:17:43PM +0200, Jim Meyering wrote: > Eric Blake wrote: > > + cd '$(srcdir)'; > > \ > >actual=$$(git submodule status | $(_submodule_hash); \ > > git hash-object bootstrap.conf;

[libvirt] [PATCH 1/6] Add virDomainGetBlockInfo API to query disk sizing

2010-04-28 Thread Daniel P. Berrange
Some applications need to be able to query a guest's disk info, even for paths not managed by the storage pool APIs. This adds a very simple API to get this information, modelled on the virStorageVolGetInfo API, but with an extra field 'physical'. Normally 'physical' and 'allocation' will be identi

[libvirt] [PATCH 2/6] Internal driver API infrastructure for virDomainGetBlockInfo

2010-04-28 Thread Daniel P. Berrange
This defines the internal driver API and stubs out each driver * src/driver.h: Define virDrvDomainGetBlockInfo signature * src/libvirt.c, src/libvirt_public.syms: Glue public API to drivers * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src

Re: [libvirt] [PATCH 06/10] Qemu Monitor API entry point.

2010-04-28 Thread Daniel P. Berrange
On Tue, Apr 27, 2010 at 05:36:40PM -0400, Chris Lalancette wrote: > On 04/27/2010 04:25 PM, Daniel P. Berrange wrote: > >> Causes the build to fail when linking virsh: > >> > >> CCLD virsh > >> ../src/.libs/libvirt-qemu.so: undefined reference to `qemuMonitorCommand' > >> collect2: ld returned

[libvirt] [PATCH 3/6] Remote protocol impl for virDomainGetBlockInfo

2010-04-28 Thread Daniel P. Berrange
* daemon/remote.c: Server side dispatcher * daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h, daemon/remote_dispatch_ret.h, daemon/remote_dispatch_table.h: Update with new API * src/remote/remote_driver.c: Client side dispatcher * src/remote/remote_protocol.c, src/remote/remot

[libvirt] [PATCH 6/6] Implement python binding for virDomainGetBlockInfo

2010-04-28 Thread Daniel P. Berrange
This binds the virDomainGetBlockInfo API to python's blockInfo method on the domain object >>> c = libvirt.openReadOnly('qemu:///session') >>> d = c.lookupByName('demo') >>> f = d.blockInfo("/dev/loop0", 0) >>> print f [1048576000L, 104857600L, 104857600L] * python/libvirt-override-api.xml: Defin

[libvirt] [PATCH 4/6] Implement virDomainGetBlockInfo in QEMU driver

2010-04-28 Thread Daniel P. Berrange
* src/qemu/qemu_driver.c: Implementation of virDomainGetBlockInfo * src/util/storage_file.h: Add DEV_BSIZE * src/storage/storage_backend.c: Remove DEV_BSIZE --- src/qemu/qemu_driver.c| 117 - src/storage/storage_backend.c |4 -- src/util/storage

[libvirt] [PATCH 5/6] Add new domblkinfo command to virsh

2010-04-28 Thread Daniel P. Berrange
virsh # domblkinfo demoguest /dev/hda2 Capacity: 1048576000 Allocation: 104857600 Physical: 104857600 * tools/virsh.c: Implement domblkinfo command mapping to the new virDomainGetBlockInfo API --- tools/virsh.c | 48 t

[libvirt] [PATCH 0/6]: Add a API for query domain disk sizing info (v2)

2010-04-28 Thread Daniel P. Berrange
A second version of: https://www.redhat.com/archives/libvir-list/2010-April/msg01248.html In this series - Add python binding - Add virsh.pod entry - Fix help text in virsh.c command description - Document flags parameter in libvirt.c -- libvir-list mailing list libvir-list@redhat.com https

Re: [libvirt] [PATCH 3/4] Fix QEMU save/restore with block devices

2010-04-28 Thread Daniel P. Berrange
On Sun, Apr 25, 2010 at 03:04:21AM -0400, Laine Stump wrote: > On 04/24/2010 12:50 AM, Laine Stump wrote: > > > >Is it really necessary to add this padding even when we *aren't* using > >dd? (ie, when is_reg == 1). > > Nevermind. Now that I've actual RTFC, I see that this new code *always* > use

Re: [libvirt] 'dommemstat' is not working for LXC hypervisor.

2010-04-28 Thread Kumar L Srikanth-B22348
Daniel, My requirement is to get how much memory is free in the guest domain. Can you please let me know, how can I do that? And also, as you said it's quite easy to implement dommemstats for lxc driver, is there any possibility to implement that? Regards, Srikanth. -Original Message- Fro

Re: [libvirt] [PATCH 0/5]: Add a API for query domain disk sizing info

2010-04-28 Thread Daniel Veillard
On Tue, Apr 27, 2010 at 08:34:57PM +0100, Daniel P. Berrange wrote: > This is somewhat late for the 0.8.1 release, but this is a rather > critical API for some of the use cases of RHEV. It introduces a > new API against a virDomainPtr to allow the direct querying of the > size of guest block device

Re: [libvirt] [PATCH 4/5] Implement virDomainGetBlockInfo in QEMU driver

2010-04-28 Thread Daniel Veillard
On Wed, Apr 28, 2010 at 11:58:15AM +0100, Daniel P. Berrange wrote: > On Tue, Apr 27, 2010 at 04:43:08PM -0600, Eric Blake wrote: > > On 04/27/2010 01:35 PM, Daniel P. Berrange wrote: > > > * src/qemu/qemu_driver.c: Implementation of virDomainGetBlockInfo > > > * src/util/storage_file.h: Add DEV_BS

Re: [libvirt] 'dommemstat' is not working for LXC hypervisor.

2010-04-28 Thread Daniel P. Berrange
On Wed, Apr 28, 2010 at 04:43:41PM +0530, Kumar L Srikanth-B22348 wrote: > Thanks for the reply Daniel. > Virsh dominfo dommand showing following results: > > Id: 32473 > Name: vm1 > UUID: f13bc513-15f2-1dd1-74f6-18c47931ece9 > OS Type:exe > State:

Re: [libvirt] 'dommemstat' is not working for LXC hypervisor.

2010-04-28 Thread Kumar L Srikanth-B22348
Thanks for the reply Daniel. Virsh dominfo dommand showing following results: Id: 32473 Name: vm1 UUID: f13bc513-15f2-1dd1-74f6-18c47931ece9 OS Type:exe State: running CPU(s): 1 Max memory: 500 kB Used memory:500 kB Autostart

Re: [libvirt] [PATCH 5/5] Add new domblkinfo command to virsh

2010-04-28 Thread Daniel P. Berrange
On Tue, Apr 27, 2010 at 05:00:22PM -0600, Eric Blake wrote: > On 04/27/2010 01:35 PM, Daniel P. Berrange wrote: > > virsh # domblkinfo demoguest /dev/hda2 > > Capacity: 1048576000 > > Allocation: 104857600 > > Physical: 104857600 > > > > * tools/virsh.c: Implement domblkinf

Re: [libvirt] [PATCH 4/5] Implement virDomainGetBlockInfo in QEMU driver

2010-04-28 Thread Daniel P. Berrange
On Tue, Apr 27, 2010 at 04:43:08PM -0600, Eric Blake wrote: > On 04/27/2010 01:35 PM, Daniel P. Berrange wrote: > > * src/qemu/qemu_driver.c: Implementation of virDomainGetBlockInfo > > * src/util/storage_file.h: Add DEV_BSIZE > > * src/storage/storage_backend.c: Remove DEV_BSIZE > > > +if (S_

Re: [libvirt] [PATCH 1/5] Add virDomainGetBlockInfo API to query disk sizing

2010-04-28 Thread Daniel P. Berrange
On Tue, Apr 27, 2010 at 04:16:24PM -0600, Eric Blake wrote: > On 04/27/2010 01:34 PM, Daniel P. Berrange wrote: > > Some applications need to be able to query a guest's disk info, > > even for paths not managed by the storage pool APIs. This adds > > a very simple API to get this information, model

Re: [libvirt] 'dommemstat' is not working for LXC hypervisor.

2010-04-28 Thread Daniel P. Berrange
On Wed, Apr 28, 2010 at 12:00:09PM +0530, Kumar L Srikanth-B22348 wrote: > Hi Daniel, > > I am using libvirt version 0.8.0. I created a domain 'srikanth_vm' using > 'lxc' hypervisor. I am able to start the Domain. But, I am not able to > get the memory stats for that Domain. > > If I issue 'domme

Re: [libvirt] [PATCH 2/2] build: fix python in VPATH build

2010-04-28 Thread Jim Meyering
Eric Blake wrote: > Match the fact that docs/Makefile.am dumps libvirt-api.xml in the > build dir, not the source dir. > > * python/Makefile.am (API_DESC): Point make to the builddir for .xml files. > * python/generator.py (buildStubs): Output in correct location. Hi Eric, Does this fix a failure

Re: [libvirt] [PATCH] build: fix autogen rule for VPATH build

2010-04-28 Thread Jim Meyering
Eric Blake wrote: > * cfg.mk (gnulib_srcdir): Override maint.mk default. > (_update_required): Run in correct directory. > --- > > I noticed an error message about bootstrap.conf not found when trying > to do a VPATH build for my new clang setup. > > This subsumes up my earlier patch to declare the

Re: [libvirt] new NULL-dereference in qemu_driver.c

2010-04-28 Thread Jim Meyering
Jim Meyering wrote: > Daniel P. Berrange wrote: > >> On Tue, Apr 27, 2010 at 06:45:16PM +0200, Jim Meyering wrote: >>> I ran clang on the very latest and it spotted this problem: >>> >From qemu_driver.c, around line 11100, >>> >>> else { >>> /* qemu is a little funny with running guest

[libvirt] Creating multiple network interfaces in libvirt Domain.

2010-04-28 Thread Kumar L Srikanth-B22348
Hi, I want to create a Domain with two interfaces. I am using LXC hypervisor in the libvirt. My domain XML is shown below: srikanth_vm2 50 exe /bin/sh 1 destroy restart destroy /usr/libexec/li