Re: [libvirt] Update on host interface configuration

2009-02-13 Thread Mark McLoughlin
Hi David, Nice work ... A thought as I update this Fedora feature page[1], given that the goal of the feature could be described as fixing things so that the "shared physical device" section of libvirt's Networking wiki page[2] isn't so nasty and 'orrible. Aside from just writing out the interfa

Re: [PATCH] use qemudReadLogOutput (was: Re: [libvirt] can't install fedora guest)

2009-02-13 Thread Guido Günther
On Mon, Feb 09, 2009 at 11:02:58AM +, Daniel P. Berrange wrote: > On Sat, Feb 07, 2009 at 06:05:51PM +0100, Guido G?nther wrote: > > The problem is that we're using this function for two purposes: To read > > from a logfile where poll()'ing on POLLIN always returns "data readable" > > which lea

[libvirt] [PATCH 0/3] Fix aliasing rules warnings with gcc-4.4

2009-02-13 Thread Mark McLoughlin
Hi, It seems gcc's strict aliasing rules got stricter with gcc-4.4. The basic rule is that two pointers of different types can't be used to reference the same address in memory. One exception is using a char* and another is when different types are members of a union. I've used unions to fix al

[libvirt] [PATCH 1/3] Fix bridge.c warnings with gcc-4.4

2009-02-13 Thread Mark McLoughlin
bridge.c: In function 'brSetInetAddr': bridge.c:665: error: dereferencing pointer '({anonymous})' does break strict-aliasing rules bridge.c:665: note: initialized from here bridge.c:666: error: dereferencing pointer '({anonymous})' does break strict-aliasing rules bridge.c:666: note: initial

[libvirt] [PATCH 3/3] Fix libvirt_proxy.c warnings from gcc-4.4

2009-02-13 Thread Mark McLoughlin
libvirt_proxy.c: In function 'proxyReadClientSocket': libvirt_proxy.c:659: error: dereferencing pointer 'req' does break strict-aliasing rules libvirt_proxy.c:657: error: dereferencing pointer 'req' does break strict-aliasing rules libvirt_proxy.c:655: error: dereferencing pointer 'req' does

[libvirt] [PATCH] virXPathInt() and virXPathUInt() don't exist

2009-02-13 Thread Mark McLoughlin
It looks like these functions have never existed. Signed-off-by: Mark McLoughlin --- src/xml.h |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/src/xml.h b/src/xml.h index 0daa874..da9d3b5 100644 --- a/src/xml.h +++ b/src/xml.h @@ -21,14 +21,6 @@ int virXP

[libvirt] [PATCH] Add virFileWriteStr()

2009-02-13 Thread Mark McLoughlin
Re-factor the code from networkEnableIpForwarding() into a utility function in preparation for code which writes to sysfs files. Signed-off-by: Mark McLoughlin --- src/libvirt_private.syms |1 + src/network_driver.c | 26 ++ src/util.c | 24 +

[libvirt] [PATCH 2/3] Fix qemud.c warnings with gcc-4.4

2009-02-13 Thread Mark McLoughlin
qemud.c: In function ‘remoteListenTCP’: qemud.c:675: error: dereferencing pointer ‘sa.72’ does break strict-aliasing rules qemud.c:675: note: initialized from here qemud.c:678: error: dereferencing pointer ‘sa.73’ does break strict-aliasing rules qemud.c:678: note: initialized from here Sig

[libvirt] Domain comment/description string?

2009-02-13 Thread Jan Kasprzak
Hello, I use KVM+qemu for testing various distributions and playing with different versions of software. Now I would like to migrate my virtual machines to libvirt. One of the problems is that I would like to have some sort of comment or description of the machine, which would be d

[libvirt] [PATCH] Fix bugzilla link in virsh man page

2009-02-13 Thread Mark McLoughlin
Note, I haven't generated a new virsh.1 because Pod::Man 2.16 gives a bunch of warnings even with the existing version. Signed-off-by: Mark McLoughlin --- docs/virsh.pod |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/virsh.pod b/docs/virsh.pod index 8b42ea0..58b

[libvirt] Per-VM access control

2009-02-13 Thread Jan Kasprzak
Hello, is it possible to run libvirt as a "hosting-like" environment? we would like to provide virtual machines for our users, but we would like them to be able to reset/reboot/poweroff only their own VMs, connect to the serial console of their own VMs only, and even maybe connect to the g

Re: [libvirt] libvirtd and LVM snapshots

2009-02-13 Thread Nick Moffitt
Cole Robinson: > With the recently added COW support, we were trying to validate the > passed logical volume's format, when there won't ever be one pulled > from the xml (logical volumes don't have any valid format values). > > Just remove this check, and let any validation in this manner be done

Re: [libvirt] Per-VM access control

2009-02-13 Thread Radek Hladik
Jan Kasprzak napsal(a): Hello, is it possible to run libvirt as a "hosting-like" environment? we would like to provide virtual machines for our users, but we would like them to be able to reset/reboot/poweroff only their own VMs, connect to the serial console of their own VMs only, and e

[libvirt] [PATCH] Fix migration for 3.3 xend

2009-02-13 Thread John Levon
# HG changeset patch # User John Levon # Date 1234535031 28800 # Node ID 3b0d2047df2c53ff2994d2bff4b1123110626ee2 # Parent 0c02b55855c7a3bfa1135887ffb1763ef29179e5 Fix migration for 3.3 xend xend grew a couple of new options for the migration method. As they're ignored on older xend versions, al

[libvirt] [PATCH] Fix some error strings in xml.c

2009-02-13 Thread Mark McLoughlin
Just some copy-and-paste mixups. Signed-off-by: Mark McLoughlin --- src/xml.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xml.c b/src/xml.c index ad77eca..9c27a10 100644 --- a/src/xml.c +++ b/src/xml.c @@ -140,7 +140,7 @@ virXPathLong(virConnectPtr conn,

Re: [libvirt] iptables and libvirt

2009-02-13 Thread Karl Wirth
Daniel P. Berrange wrote: > Actually I believe Karl's use case is that the host explicitly *does* > know the IP the guest is /supposed/ to be using, and wants to prevent > it spoofing someone else's IP. > Yes. This is what I was thinking. > I agree with your general point though, that when tryi

Re: [libvirt] [PATCH] Fix virsh {net,pool}-edit

2009-02-13 Thread Jim Meyering
Cole Robinson wrote: > The dumpxml commands for networks and pools don't support any flag > arguments, and in fact explictly fail if flags != 0. This is not the > case for vm dumpxml though, and flags were added to the base 'edit' > implementation in virsh recently. > > The net and pool derivative

Re: [libvirt] [PATCH] Fix virsh {net,pool}-edit

2009-02-13 Thread Daniel P. Berrange
On Fri, Feb 13, 2009 at 04:58:17PM +0100, Jim Meyering wrote: > Cole Robinson wrote: > > The dumpxml commands for networks and pools don't support any flag > > arguments, and in fact explictly fail if flags != 0. This is not the > > case for vm dumpxml though, and flags were added to the base 'edi

Re: [libvirt] [PATCH] Allow off-line removal of devices via xend

2009-02-13 Thread Stefan de Konink
John Levon wrote: On Wed, Feb 11, 2009 at 10:01:24AM +0100, Guido Günther wrote: In the qemu driver, it is entirely hotplug/hotunplug, and deliberately fails on an inactive domain. This patch seems to add offline support We don't even persist the devices being hot{added,removed} into the domai

Re: [libvirt] [PATCH] Fix virsh {net,pool}-edit

2009-02-13 Thread Daniel P. Berrange
On Thu, Feb 12, 2009 at 04:58:50PM -0500, Cole Robinson wrote: > The dumpxml commands for networks and pools don't support any flag > arguments, and in fact explictly fail if flags != 0. This is not the > case for vm dumpxml though, and flags were added to the base 'edit' > implementation in virsh

Re: [libvirt] [PATCH] document static host IP assignment

2009-02-13 Thread Daniel P. Berrange
On Thu, Feb 12, 2009 at 04:59:58PM -0600, Charles Duffy wrote: > Back in August 2008, DV added support for providing static IP/hostname > assignments to dnsmasq via elements in the network definition. > > Since this functionality isn't covered in the documentation, I wrote up > a quick patch, a

Re: [libvirt] [PATCH] Don't check volume format for lvm backing store

2009-02-13 Thread Daniel P. Berrange
On Thu, Feb 12, 2009 at 02:37:33PM -0500, Cole Robinson wrote: > With the recently added COW support, we were trying to validate the > passed logical volume's format, when there won't ever be one pulled from > the xml (logical volumes don't have any valid format values). > > Just remove this check

Re: [libvirt] [PATCH] Fix bugzilla link in virsh man page

2009-02-13 Thread Daniel P. Berrange
On Fri, Feb 13, 2009 at 12:06:09PM +, Mark McLoughlin wrote: > Note, I haven't generated a new virsh.1 because Pod::Man 2.16 > gives a bunch of warnings even with the existing version. Which Perl version does that correspond to ? FWIW, the pod2man on Fedora 9, perl-5.10.0-40.fc9.i386 genera

Re: [libvirt] [PATCH] Fix generating python bindings

2009-02-13 Thread Daniel P. Berrange
On Thu, Feb 12, 2009 at 02:37:46PM -0500, Cole Robinson wrote: > The recent API additions virSaveLastError and virFreeError upset the > python bindings generator. Add a rule to explicitly skip them for the > bindings, since (as far as I can tell) the libvirtError class provides > everything we need

Re: [libvirt] [PATCH] Fix migration for 3.3 xend

2009-02-13 Thread Daniel P. Berrange
On Fri, Feb 13, 2009 at 06:30:59AM -0800, John Levon wrote: > # HG changeset patch > # User John Levon > # Date 1234535031 28800 > # Node ID 3b0d2047df2c53ff2994d2bff4b1123110626ee2 > # Parent 0c02b55855c7a3bfa1135887ffb1763ef29179e5 > Fix migration for 3.3 xend > > xend grew a couple of new opt

Re: [libvirt] [PATCH] Fix some error strings in xml.c

2009-02-13 Thread Daniel P. Berrange
On Fri, Feb 13, 2009 at 12:06:11PM +, Mark McLoughlin wrote: > Just some copy-and-paste mixups. > > Signed-off-by: Mark McLoughlin > --- > src/xml.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/xml.c b/src/xml.c > index ad77eca..9c27a10 100644 > --- a

Re: [libvirt] [PATCH] avoid two test failures induced by today's error-reporting changes

2009-02-13 Thread Daniel P. Berrange
On Mon, Feb 09, 2009 at 04:29:56PM +0100, Jim Meyering wrote: > I'm applying these fixes to avoid "make check" failures: > > >From f41517a4250db0961482e097813eb39da5bea963 Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Mon, 9 Feb 2009 16:25:36 +0100 > Subject: [PATCH] avoid two test failur

Re: [libvirt] [PATCH 0/3] Fix aliasing rules warnings with gcc-4.4

2009-02-13 Thread Daniel P. Berrange
On Fri, Feb 13, 2009 at 11:54:08AM +, Mark McLoughlin wrote: > > Hi, > > It seems gcc's strict aliasing rules got stricter with gcc-4.4. > > The basic rule is that two pointers of different types can't be > used to reference the same address in memory. One exception is > using a char* and an

Re: [libvirt] [PATCH 1/3] Fix bridge.c warnings with gcc-4.4

2009-02-13 Thread Daniel P. Berrange
On Fri, Feb 13, 2009 at 11:54:09AM +, Mark McLoughlin wrote: > bridge.c: In function 'brSetInetAddr': > bridge.c:665: error: dereferencing pointer '({anonymous})' does break > strict-aliasing rules > bridge.c:665: note: initialized from here > bridge.c:666: error: dereferencing pointer '({

Re: [libvirt] [PATCH 2/3] Fix qemud.c warnings with gcc-4.4

2009-02-13 Thread Daniel P. Berrange
On Fri, Feb 13, 2009 at 11:54:10AM +, Mark McLoughlin wrote: > qemud.c: In function ???remoteListenTCP???: > qemud.c:675: error: dereferencing pointer ???sa.72??? does break > strict-aliasing rules > qemud.c:675: note: initialized from here > qemud.c:678: error: dereferencing pointer ???sa

Re: [libvirt] [PATCH 3/3] Fix libvirt_proxy.c warnings from gcc-4.4

2009-02-13 Thread Daniel P. Berrange
On Fri, Feb 13, 2009 at 11:54:11AM +, Mark McLoughlin wrote: > libvirt_proxy.c: In function 'proxyReadClientSocket': > libvirt_proxy.c:659: error: dereferencing pointer 'req' does break > strict-aliasing rules > libvirt_proxy.c:657: error: dereferencing pointer 'req' does break > strict-al

Re: [libvirt] [PATCH] Add virFileWriteStr()

2009-02-13 Thread Daniel P. Berrange
On Fri, Feb 13, 2009 at 12:06:12PM +, Mark McLoughlin wrote: > Re-factor the code from networkEnableIpForwarding() into a > utility function in preparation for code which writes to > sysfs files. > > Signed-off-by: Mark McLoughlin > --- > src/libvirt_private.syms |1 + > src/network_driv

Re: [libvirt] [PATCH] libvirt.spec patch to fix some rpmlint warnings/errors

2009-02-13 Thread Daniel P. Berrange
On Thu, Feb 12, 2009 at 12:39:00PM +, Richard W.M. Jones wrote: > > OK, so I left out the change to init. Attached is the final patch, > which I've committed to Rawhide. Are we still copying these changes > into the specfile that we ship in the libvirt tarball? Yep, should apply them to CVS

[libvirt] Deleting the base image needed by a snapshot causes libvirtd to die

2009-02-13 Thread Nick Moffitt
In my testing, I got the order of my images wrong, and tried to delete a base image that I had snapshotted: Feb 13 15:28:33 gnusto libvirtd: 15:28:33.800: error : internal error '/sbin/lvremove -f /dev/VMs/base' exited with non-zero status 5 and signal 0: Can't remove logical vol

Re: [libvirt] [PATCH] virXPathInt() and virXPathUInt() don't exist

2009-02-13 Thread Daniel P. Berrange
On Fri, Feb 13, 2009 at 12:06:10PM +, Mark McLoughlin wrote: > It looks like these functions have never existed. They did at one point in my out of tree patches for some feature, but guess I removed them and forget the header before finally comitting. > diff --git a/src/xml.h b/src/xml.h > in

Re: [libvirt] Linux/sparc: brctl setfd fails, default network cannot start

2009-02-13 Thread Daniel P. Berrange
On Mon, Feb 09, 2009 at 03:20:06PM +, Richard W.M. Jones wrote: > > Here's another error, starting the default network: > > libvir: error : internal error '/usr/sbin/brctl setfd virbr0 0' > exited with non-zero status 1 and signal 0: set forward delay failed: > Operation not supported > F

Re: [libvirt] [PATCH] Allow off-line removal of devices via xend

2009-02-13 Thread Cole Robinson
Guido Günther wrote: > On Tue, Feb 10, 2009 at 09:32:49PM +0100, Stefan de Konink wrote: >> Guido Günther wrote: >>> On Mon, Feb 09, 2009 at 11:30:30AM -0500, Cole Robinson wrote: >>> [..snip..] No fault of this patch, but this makes me ask the question: what exactly are attachDevice and

Re: [libvirt] [PATCH] Fix migration for 3.3 xend

2009-02-13 Thread John Levon
On Fri, Feb 13, 2009 at 04:15:56PM +, Daniel P. Berrange wrote: > > Fix migration for 3.3 xend > > > > xend grew a couple of new options for the migration method. As they're > > ignored on older xend versions, always pass them. > > ACK, surprised they weren't made optional when added :-( I

Re: [libvirt] [PATCH] Allow off-line removal of devices via xend

2009-02-13 Thread John Levon
On Fri, Feb 13, 2009 at 11:35:09AM -0500, Cole Robinson wrote: > Adding the device to the xml for an inactive domain is fine by me > (though it would essentially be a convenience function), but I would > like to ensure that if the domain is active and the device is not > hotpluggable, we throw a f

Re: [libvirt] [PATCH] Fix virsh {net,pool}-edit

2009-02-13 Thread Jim Meyering
"Daniel P. Berrange" wrote: ... > This is not safe in general, because after the 'AssignDef' call, the > 'def' is now owned by the 'obj'. If you don't set it to NULL immediately > you have the risk of later error cleanup paths, seeing the non-NULL def > and free'ing it when they shouldn't. > > The

[libvirt] [Patch] enable --checkpoint option in 'virsh save'

2009-02-13 Thread Matt McCowan
Folks. I'm working on a scenario where I would like to provide my backup subsystems with a clean disk and ram state of any given VM, without necessitating shutting down the a VM. Xen's 'xm save' function with the '-c' (checkpoint) argument made sense in that I could checkpoint save the VM, take

[libvirt] Libvirt for RHEL4 update4

2009-02-13 Thread Gavin Gong
Hi Guys, We are eagerly trying to deploy libvirt on a production environment based on RHEL4 U4, but unfortunately it seems that for RHEL this API is only available for version5, we can't find any libvirt packages for RHEL4 U4, can you give us some advise for this situation? Thanks. Gavin

Re: [libvirt] [PATCH] Allow off-line removal of devices via xend

2009-02-13 Thread Daniel P. Berrange
On Fri, Feb 13, 2009 at 11:35:09AM -0500, Cole Robinson wrote: > Guido Günther wrote: > > On Tue, Feb 10, 2009 at 09:32:49PM +0100, Stefan de Konink wrote: > >> Guido Günther wrote: > >>> On Mon, Feb 09, 2009 at 11:30:30AM -0500, Cole Robinson wrote: > >>> [..snip..] > No fault of this patch,

Re: [libvirt] Libvirt for RHEL4 update4

2009-02-13 Thread Daniel P. Berrange
On Thu, Feb 12, 2009 at 10:26:11AM -, Gavin Gong wrote: > We are eagerly trying to deploy libvirt on a production environment > based on RHEL4 U4, but unfortunately it seems that for RHEL this API is > only available for version5, we can't find any libvirt packages for > RHEL4 U4, can you give

Re: [libvirt] [PATCH] Fix virsh {net,pool}-edit

2009-02-13 Thread Daniel P. Berrange
On Fri, Feb 13, 2009 at 05:56:14PM +0100, Jim Meyering wrote: > "Daniel P. Berrange" wrote: > ... > > This is not safe in general, because after the 'AssignDef' call, the > > 'def' is now owned by the 'obj'. If you don't set it to NULL immediately > > you have the risk of later error cleanup paths

RE: [libvirt] Libvirt for RHEL4 update4

2009-02-13 Thread Gavin Gong
Thanks Daniel! Then how can we monitor Xen host and xen guests (XEN3.0.3) based on RHEL4 U4? Could you give us some advice on this? Kind regards, Gavin Gavin Gong 3rd Line Engineer - Server/Database Technology DD: +44(0) 207 517 6581 M: +44(0) 7982 132 869

Re: [libvirt] [PATCH] Allow off-line removal of devices via xend

2009-02-13 Thread John Levon
On Fri, Feb 13, 2009 at 05:00:40PM +, Daniel P. Berrange wrote: > - If the VM is active, it attempts to hotplug the device to the guest > - If the VM is inactive, it updates the VM config file. > > We cannot guarentee whether the active hotplugging will update the > persistent config or not

Re: [libvirt] [PATCH] Fix virsh {net,pool}-edit

2009-02-13 Thread Jim Meyering
"Daniel P. Berrange" wrote: > On Thu, Feb 12, 2009 at 04:58:50PM -0500, Cole Robinson wrote: >> The dumpxml commands for networks and pools don't support any flag >> arguments, and in fact explictly fail if flags != 0. This is not the >> case for vm dumpxml though, and flags were added to the bas

[libvirt] Re: [PATCH] use qemudReadLogOutput

2009-02-13 Thread Jim Meyering
Guido Günther wrote: ... >>From 6655474aed6e601a6c2e16e7020589f51f58893b Mon Sep 17 00:00:00 2001 > From: =?utf-8?q?Guido=20G=C3=BCnther?= > Date: Sat, 7 Feb 2009 17:16:39 +0100 > Subject: [PATCH] usleep to wait for domain logfile to fill up > > --- > src/qemu_driver.c | 65 +++

Re: [libvirt] iptables and libvirt

2009-02-13 Thread Thomas Woerner
Karl Wirth wrote: Hi, I would like your feedback on the following idea. What if we could flexibly change the iptables rules for the different guests as they are deployed onto the node/host. The idea would be to do all of this within the iptables of the host leaving alone the iptables of the

[libvirt] Re: [PATCH] use qemudReadLogOutput

2009-02-13 Thread Guido Günther
Hi Jim, On Fri, Feb 13, 2009 at 07:07:49PM +0100, Jim Meyering wrote: > Sorry I didn't review this sooner, > but I looked just today after you committed it. > > Here's a proposed patch to make it use better types > (always suspect that using "int" is wrong ;-). Agreed. This is basically a straigt

Re: [libvirt] Update on host interface configuration

2009-02-13 Thread David Lutterkort
On Fri, 2009-02-13 at 09:12 +, Mark McLoughlin wrote: > A thought as I update this Fedora feature page[1] Thanks a ton for doing that - nice overview. > Aside from just writing out the interface configuration, will we also > handle the case where NetworkManager is disabled/unavailable and > m

[libvirt] [PATCH 1/4] fix problem with MKDIR_P vs mkdir_p

2009-02-13 Thread Maximilian Wilhelm
From: Matthias Bolte configure defines mkdir_p but src/Makefile.am uses MKDIR_P --- src/Makefile.am |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 9d934b4..eff9039 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -589,6 +589

[libvirt] [PATCH 4/4] Workarounded 'virGetVersion' build problem

2009-02-13 Thread Maximilian Wilhelm
The 'getVer' fix introducted in 02a72b420670718640d9abf0e07f2b1cca7b4d2b breaks compiling libvirt with loadable module support. Work around this to get it building again. Signed-off-by: Maximilian Wilhelm --- src/libvirt.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) d

[libvirt] [PATCH 3/4] Build fix for 'driver.c' when building with loadable modules

2009-02-13 Thread Maximilian Wilhelm
The 'asprintf' -> 'virAsprintf' transition made in commit 9e5d9950a1c5069d3cc908a7316d86a2d501d8a9 introducted a build error for 'driver.c' as 'util.h' has to be included. Signed-off-by: Maximilian Wilhelm --- src/driver.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --

[libvirt] [PATCH 2/4] Build fix for 'bridge.c' if 'IFF_VNET_HDR' is disabled.

2009-02-13 Thread Maximilian Wilhelm
The function 'brProbeVnetHdr()' added in commit b14bf853b4b0c3479d13c4842cea6faa3414c834 does not use the 'tapfd' parameter. gcc does not like that. Make it happy. Signed-off-by: Maximilian Wilhelm --- src/bridge.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[libvirt] virDomainGetVcpus error with Fedora 10

2009-02-13 Thread Kaitlin Rupert
Hi, I'm running Fedora 10 with the following libvirt version: libvirt-0.6.0-3 I'm calling virDomainGetVcpus() with the following parameters: virDomainGetVcpus(dom, info, max, NULL, 0); where max = 2 and dom and info are both non-NULL. However, I'm getting the following error from libvirt: