Zvi Dubitzky | 1 Mar 07:51 2009
Picon

[libvirt] virsh and api

Hi

How about  adding the following info to the virsh / dominfo  command ( and 
 to the programmable libvirt API:):

- IP address of the domain in case the host  was configured as a bridge
- cpu utilization (at least for Linux)

Is that possible ?

thanks

Zvi Dubitzky 
Virtualization and System Architecture   Email:dubi <at> il.ibm.com
IBM Haifa Research Laboratory    Phone: +972-4-8296182
Haifa, 31905, ISRAEL 

Itamar Heim | 1 Mar 10:30 2009
Picon

RE: [libvirt] Update on host interface configuration

> From: libvir-list-bounces <at> redhat.com [mailto:libvir-list-
> bounces <at> redhat.com] On Behalf Of David Lutterkort
...
> In particular, if you are part of the management system, you have a
> much
> better idea (on the node) what it means to have a working network
> configuration, and can recover from misconfigured network much more
> gracefully than with the big hammer of a system reboot.
[IH] indeed, but this implies the management system has to co-locate
another management daemon on the node, since central management cannot
rollback the node from an invalid network configuration. 
It will also be simpler for the other daemon to be the one accepting the
network change command from the central management, using libvirt locally
(or be notified by libvirt on BeforeNetworkChange/AfterNetworkChange  to
be able to backup conig, check for connectivity, and potentially only call
the rollback locally, so there won't be a need to implement the remote
management twice. 
another issue is that the change has to be treated as atomic for all
interfaces together, not one by one.

Ryota Ozaki | 1 Mar 20:34 2009
Picon

[libvirt] [PATCH] small fixes in storage_conf.c

Hi,

These patches fix:
- missing VIR_FREE for the return value of virXPathString
- wrong error message "missing owner element" where should be "missing
group element"

Signed-off-by: Ryota Ozaki <ozaki.ryota <at> gmail.com>
Attachment (0001-fix-missing-VIR_FREE.patch): application/octet-stream, 1560 bytes
Attachment (0002-fix-error-message.patch): application/octet-stream, 1146 bytes
Hi,

These patches fix:
- missing VIR_FREE for the return value of virXPathString
- wrong error message "missing owner element" where should be "missing
group element"

Signed-off-by: Ryota Ozaki <ozaki.ryota <at> gmail.com>
James Morris | 1 Mar 23:18 2009

Re: [libvirt] Updated James Morris patch to apply to libvirt-0.6.0 version

On Fri, 27 Feb 2009, Daniel J Walsh wrote:

> I think we need a mechanism in libvirtd.conf to turn this off.   And
> allow perhaps three modes.
> 
> svirt=Disabled.  No Security Driver.
> svirt=MLS (Requires context in xml, no relabel of disks)
> svirt=Standard, (If no XML label, then random generate one and reset
> file context).

I wouldn't call these MLS and Standard.  The simple isolation scheme with 
automatic labeling is just one way to do things.  Down the track, we'll 
want to be able to specify arbitrary types for guests, not just for MLS.

--

-- 
James Morris
<jmorris <at> namei.org>

Jim Meyering | 2 Mar 10:14 2009
Picon

[libvirt] [PATCH] don't dereference uninitialized pointer


>From a907d2da7e7f9d1f58009ff6a95454ac0eb2cbf1 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering <at> redhat.com>
Date: Mon, 2 Mar 2009 10:10:02 +0100
Subject: [PATCH] don't dereference uninitialized pointer

* src/storage_conf.c (virStoragePoolDefParsePerms): Initialize
"ptr" to NULL.
---
 ChangeLog          |    6 ++++++
 src/storage_conf.c |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 12715f5..ede7e0d 100644
--- a/ChangeLog
+++ b/ChangeLog
 <at>  <at>  -1,3 +1,9  <at>  <at> 
+2009-03-02  Jim Meyering  <meyering <at> redhat.com>
+
+	don't dereference uninitialized pointer
+	* src/storage_conf.c (virStoragePoolDefParsePerms): Initialize
+	"ptr" to NULL.
+
 Fri Feb 27 17:15:00 CET 2009 Chris Lalancette <clalance <at> redhat.com>

 	* src/qemu_driver.c: If there is a failure during offline migrate,
diff --git a/src/storage_conf.c b/src/storage_conf.c
index 70107a2..4a53ff4 100644
--- a/src/storage_conf.c
(Continue reading)

Jim Meyering | 2 Mar 10:13 2009
Picon

Re: [libvirt] [PATCH] small fixes in storage_conf.c

Ryota Ozaki wrote:
> These patches fix:
> - missing VIR_FREE for the return value of virXPathString
> - wrong error message "missing owner element" where should be "missing
> group element"

Thank you!
Both of those are fine.
I'll apply them today.

FYI, looking at the first one, I spotted another problem.
Since strtol dereferences its 2nd parameter when it's non-NULL,
it must always be initialized.

I'll post that fix separately.

Amit Shah | 2 Mar 10:32 2009
Picon

Re: [libvirt] [PATCH] Use posix_fallocate() to allocate disk space

On (Tue) Feb 24 2009 [11:58:31], Daniel P. Berrange wrote:
> On Tue, Feb 24, 2009 at 05:09:31PM +0530, Amit Shah wrote:
...
> > The best case to get a non-fragmented VM image is to have it allocated
> > completely at create-time with fallocate().
> 
> The main problem with this change is that it'll make it harder for
> us to provide incremental feedback. As per the comment in the code, 
> it is our intention to make the volume creation API run as a background
> job which provides feedback on progress of allocation, and the ability
> to cancel the job. Since posix_fallocate() is an all-or-nothing kind of
> API it wouldn't be very helpful. 
> 
> What sort of performance boost does this give you ?  Would we perhaps
> be able to get close to it by writing in bigger chunks than 4k, or 
> mmap'ing the file and then doing a memset across it ?

I have a program up at [1] that gives me the following data.

[1]
http://fedorapeople.org/gitweb?p=amitshah/public_git/alloc-perf.git;a=blob_plain;f=test-file-zero-alloc-speed.c;hb=HEAD

I compiled results for ext3, ext4, xfs and btrfs. I used the following
methods to allocate a file (1 GB in size) and zero it:

- posix_fallocate()
- mmap() and memset()
- write chunks, sized 4k and 8k.

Results:
(Continue reading)

Daniel Veillard | 2 Mar 11:00 2009
Picon

Re: [libvirt] [PATCH] small fixes in storage_conf.c

On Mon, Mar 02, 2009 at 10:13:11AM +0100, Jim Meyering wrote:
> Ryota Ozaki wrote:
> > These patches fix:
> > - missing VIR_FREE for the return value of virXPathString
> > - wrong error message "missing owner element" where should be "missing
> > group element"
> 
> Thank you!
> Both of those are fine.

 Agreed, I was about to commit them myself !

> I'll apply them today.

  please go ahead !

> FYI, looking at the first one, I spotted another problem.
> Since strtol dereferences its 2nd parameter when it's non-NULL,
> it must always be initialized.
> 
> I'll post that fix separately.

  okay if it's trivial please commit, as I would like to make a 0.6.1
release soon, hopefully today

  thanks,

Daniel

--

-- 
(Continue reading)

Daniel Veillard | 2 Mar 11:01 2009
Picon

Re: [libvirt] [PATCH] don't dereference uninitialized pointer

On Mon, Mar 02, 2009 at 10:14:04AM +0100, Jim Meyering wrote:
> 
> >From a907d2da7e7f9d1f58009ff6a95454ac0eb2cbf1 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering <at> redhat.com>
> Date: Mon, 2 Mar 2009 10:10:02 +0100
> Subject: [PATCH] don't dereference uninitialized pointer
> 
> * src/storage_conf.c (virStoragePoolDefParsePerms): Initialize
> "ptr" to NULL.

  ACK, strangely virStorageVolDefParsePerms() doesn't have the problem,

Daniel

--

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel <at> veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

Jim Meyering | 2 Mar 11:27 2009
Picon

Re: [libvirt] [PATCH] don't dereference uninitialized pointer

Daniel Veillard wrote:
> On Mon, Mar 02, 2009 at 10:14:04AM +0100, Jim Meyering wrote:
>>
>> >From a907d2da7e7f9d1f58009ff6a95454ac0eb2cbf1 Mon Sep 17 00:00:00 2001
>> From: Jim Meyering <meyering <at> redhat.com>
>> Date: Mon, 2 Mar 2009 10:10:02 +0100
>> Subject: [PATCH] don't dereference uninitialized pointer
>>
>> * src/storage_conf.c (virStoragePoolDefParsePerms): Initialize
>> "ptr" to NULL.
>
>   ACK, strangely virStorageVolDefParsePerms() doesn't have the problem,

Committed.


Gmane