Re: [libvirt] [PATCH 10/11] tests: Add network XML to XML tests.

2009-10-21 Thread Daniel Veillard
Cole, I'm afraid you broke the dist when making this commit On Mon, Oct 12, 2009 at 10:46:54AM -0400, Cole Robinson wrote: > > Signed-off-by: Cole Robinson > --- [...] > create mode 100644 tests/networkxml2xmlin/forward-delay-network.xml > create mode 100644 tests/networkxml2xmlin/isolated-n

Re: [libvirt] Using libvirt to obtain mac address of virtual domain

2009-10-21 Thread Daniel Veillard
On Tue, Oct 20, 2009 at 11:30:12PM -0500, Charles Duffy wrote: > Daniel Berteaud wrote: >> If you need to get the mac address from bash, you can use this: >> >> virsh dumpxml myguest | grep 'mac address' | cut -d\' -f2 >> >> You'll get one mac address per line (one line per NIC on the guest) > > An

[libvirt] [PATCH] 528575 avoid libvirtd crash on LCX domain autostart

2009-10-21 Thread Daniel Veillard
https://bugzilla.redhat.com/show_bug.cgi?id=528575 virsh -c lxc:/// autostart vm1 crash the daemon because the driver autostartDir is never initialized and we do a NULL dereference. The enclosed patch is trivial and avoid the crash, but ... [r...@paphio ~]# virsh -c lxc:/// dominfo vm1 Id:

Re: [libvirt] [PATCH] 528575 avoid libvirtd crash on LCX domain autostart

2009-10-21 Thread Daniel P. Berrange
On Wed, Oct 21, 2009 at 11:52:42AM +0200, Daniel Veillard wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=528575 > > virsh -c lxc:/// autostart vm1 > > crash the daemon because the driver autostartDir is never initialized > and we do a NULL dereference. The enclosed patch is trivial and av

Re: [libvirt] LXC implement missing macaddr assignment feature

2009-10-21 Thread Daniel Veillard
On Mon, Oct 19, 2009 at 10:27:24PM +0900, Ryota Ozaki wrote: > Hi, > > Currently MAC address configuration of container veth is just ignored. > This patch implements the missing feature. > > * src/lxc/veth.c, src/lxc/veth.h: add setMacAddr > * src/lxc/lxc_driver.c: set macaddr of container veth i

Re: [libvirt] Re: [virt-tools-list] libvirt 0.7.2 linker issues

2009-10-21 Thread Daniel Veillard
On Mon, Oct 19, 2009 at 11:48:09AM -0600, Jim Fehlig wrote: > Laurent Léonard wrote: > >> You should pass --with-selinux=no to configure, since those are all > >> libselinux functions. Do you have libselinux installed? If not, there's > >> probably an error in configure.in selinux autodetection. >

Re: [libvirt] [PATCH] Allow NULL mac address in virGetInterface.

2009-10-21 Thread Daniel Veillard
On Mon, Oct 19, 2009 at 04:41:52PM -0400, Laine Stump wrote: > There are places where an interface will not have a mac address, and netcf > returns this as a NULL pointer rather than a pointer to an empty string. > Rather than checking for this all over the place in libvirt, just save it > in the v

Re: [libvirt] [PATCH] 528575 avoid libvirtd crash on LCX domain autostart

2009-10-21 Thread Ryota Ozaki
On Wed, Oct 21, 2009 at 6:55 PM, Daniel P. Berrange wrote: > On Wed, Oct 21, 2009 at 11:52:42AM +0200, Daniel Veillard wrote: >>   https://bugzilla.redhat.com/show_bug.cgi?id=528575 >> >> virsh -c lxc:/// autostart vm1 >> >> crash the daemon because the driver autostartDir is never initialized >>

[libvirt] [PATCH] New APIs for checking some object properties

2009-10-21 Thread Daniel P. Berrange
Introduce a number of new APIs to expose some boolean properties of objects, which cannot otherwise reliably determined, nor are aspects of the XML configuration. * virDomainIsActive: Checking virDomainGetID is not reliable since it is not possible to distinguish between error condition an

Re: [libvirt] [PATCH] Fix virsh.c compilation warning

2009-10-21 Thread Daniel Veillard
On Mon, Oct 19, 2009 at 02:03:21PM -0600, Jim Fehlig wrote: > A call to vshError() containing 'doexit' parameter sneaked in after I > removed said parameter. > > Regards, > Jim > > commit edea3dfdd861d5eee4712da43781908f0fa2a6d5 > Author: Jim Fehlig > Date: Mon Oct 19 13:53:40 2009 -0600 > >

Re: [libvirt] [PATCH] 528575 avoid libvirtd crash on LCX domain autostart

2009-10-21 Thread Daniel Veillard
On Wed, Oct 21, 2009 at 07:31:11PM +0900, Ryota Ozaki wrote: > On Wed, Oct 21, 2009 at 6:55 PM, Daniel P. Berrange > wrote: > > On Wed, Oct 21, 2009 at 11:52:42AM +0200, Daniel Veillard wrote: > >>   https://bugzilla.redhat.com/show_bug.cgi?id=528575 > >> > >> virsh -c lxc:/// autostart vm1 > >>

[libvirt] [PATCH] do not bother rotating short qemu logs

2009-10-21 Thread Dan Kenigsberg
without this, after few weeks without use, each defined domain grows a tail of empty gzipped logs, instead of keeping just the last log of interest. --- daemon/libvirtd.logrotate.in |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/daemon/libvirtd.logrotate.in b/daemon/libvi

Re: [libvirt] [PATCH] do not bother rotating short qemu logs

2009-10-21 Thread Daniel P. Berrange
On Wed, Oct 21, 2009 at 01:44:36PM +0200, Dan Kenigsberg wrote: > without this, after few weeks without use, each defined domain grows a > tail of empty gzipped logs, instead of keeping just the last log of > interest. > --- > daemon/libvirtd.logrotate.in |1 + > 1 files changed, 1 insertions(

Re: [libvirt] [PATCH] New APIs for checking some object properties

2009-10-21 Thread Daniel Veillard
On Wed, Oct 21, 2009 at 11:54:14AM +0100, Daniel P. Berrange wrote: > Introduce a number of new APIs to expose some boolean properties > of objects, which cannot otherwise reliably determined, nor are > aspects of the XML configuration. > > * virDomainIsActive: Checking virDomainGetID is not rel

Re: [libvirt] [PATCH] LXC fix virCgroupGetValueStr on handling a string terminated with '\n'

2009-10-21 Thread Ryota Ozaki
On Mon, Oct 19, 2009 at 9:39 PM, Daniel Veillard wrote: > On Sat, Oct 17, 2009 at 09:30:12AM +0900, Ryota Ozaki wrote: >> OK, I've looked into a bit deep and found the following sequence happens. >> >> In cmdDominfo (virsh.c), if virDomainGetInfo fails, 'ret' is set with FALSE. >> Even so, furthe

Re: [libvirt] [PATCH] do not bother rotating short qemu logs

2009-10-21 Thread Daniel Veillard
On Wed, Oct 21, 2009 at 12:45:21PM +0100, Daniel P. Berrange wrote: > On Wed, Oct 21, 2009 at 01:44:36PM +0200, Dan Kenigsberg wrote: > > without this, after few weeks without use, each defined domain grows a > > tail of empty gzipped logs, instead of keeping just the last log of > > interest. > >

[libvirt] [PATCH] Support QEMU/KVM watchdog device

2009-10-21 Thread Richard W.M. Jones
Time to brush off this old patch. This adds simple support for the QEMU/KVM emulated hardware watchdog device (qemu commit 9dd986ccf68f142aaafe543d80cf877716d91d4e). Event notification isn't supported. This just lets you configure a domain with a device, select the model and action. Rich. --

Re: [libvirt] [PATCH 10/11] tests: Add network XML to XML tests.

2009-10-21 Thread Cole Robinson
On 10/21/2009 05:18 AM, Daniel Veillard wrote: > Cole, I'm afraid you broke the dist when making this commit > > On Mon, Oct 12, 2009 at 10:46:54AM -0400, Cole Robinson wrote: >> >> Signed-off-by: Cole Robinson >> --- > [...] >> create mode 100644 tests/networkxml2xmlin/forward-delay-network.x

Re: [libvirt] [PATCH] fix virDomainMigrateToURI doc

2009-10-21 Thread Dan Kenigsberg
On Mon, Oct 19, 2009 at 02:55:40PM +0200, Daniel Veillard wrote: > On Mon, Oct 19, 2009 at 11:56:01AM +0200, Dan Kenigsberg wrote: > > --- > > src/libvirt.c |2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/src/libvirt.c b/src/libvirt.c > > index 92a1eaa..d2a0d7

Re: [libvirt] [PATCH] Support QEMU/KVM watchdog device

2009-10-21 Thread Daniel Veillard
On Wed, Oct 21, 2009 at 01:32:49PM +0100, Richard W.M. Jones wrote: > Time to brush off this old patch. This adds simple support for the > QEMU/KVM emulated hardware watchdog device (qemu commit > 9dd986ccf68f142aaafe543d80cf877716d91d4e). > > Event notification isn't supported. This just lets y

Re: [libvirt] [PATCH] Support QEMU/KVM watchdog device

2009-10-21 Thread Richard W.M. Jones
On Wed, Oct 21, 2009 at 04:42:06PM +0200, Daniel Veillard wrote: > On Wed, Oct 21, 2009 at 01:32:49PM +0100, Richard W.M. Jones wrote: > > +if ((n = virXPathNodeSet(conn, "./devices/watchdog", ctxt, &nodes)) < > > 0) { > > +virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR, > > +

[libvirt] how to duplicate an vm?

2009-10-21 Thread Dan Bar Dov
I am trying to duplicate an existing vm. While the VM was down, I copied the image file, copied the xml file and manually fixed the xml file to have a different VM name, and point to the copy. The copy now works, but the original disappraeed from virt-manager. When I try to "restore" it I get: Err

Re: [libvirt] how to duplicate an vm?

2009-10-21 Thread Richard W.M. Jones
On Wed, Oct 21, 2009 at 04:58:00PM +0200, Dan Bar Dov wrote: > I am trying to duplicate an existing vm. > While the VM was down, I copied the image file, copied the xml file and > manually fixed the xml file to have a different VM name, and point to the > copy. > > The copy now works, but the orig

[libvirt] [PATCH] consolidate virXPathNodeSet()

2009-10-21 Thread Daniel Veillard
While reviewing Rich last patch I was afraid that virXPathNodeSet() could return -1 when doing an evaluation failure. It is based on xmlXPathEval() from libxml2 whose behaviour is to possibly return NULL on XPath evaluation failure independantly of the kind of failure: http://xmlsoft.org/htm

Re: [libvirt] [PATCH] Support QEMU/KVM watchdog device

2009-10-21 Thread Daniel Veillard
On Wed, Oct 21, 2009 at 03:52:18PM +0100, Richard W.M. Jones wrote: > On Wed, Oct 21, 2009 at 04:42:06PM +0200, Daniel Veillard wrote: > > On Wed, Oct 21, 2009 at 01:32:49PM +0100, Richard W.M. Jones wrote: > > > +if ((n = virXPathNodeSet(conn, "./devices/watchdog", ctxt, &nodes)) > > > < 0) {

Re: [libvirt] [PATCH] Support QEMU/KVM watchdog device

2009-10-21 Thread Richard W.M. Jones
On Wed, Oct 21, 2009 at 05:28:49PM +0200, Daniel Veillard wrote: > okay but indentation seems funky, can you double check ? Tabs/spaces thing. I'll fix it up before pushing. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of gue

[libvirt] RHEL 5 with Xen - changed IPs and now weirdness

2009-10-21 Thread Denny Snyder
Hi all, I had installed RHEL 5 x86_64 with virtualization right off the bat.  Everything ran beautifully with two Xen guests (also RHEL 5.)  All 3 IPs (host and 2 guests) were in the same subnet. Then I had to change all the IP addresses to a different subnet (but again all 3 within the same

[libvirt] Xenner status

2009-10-21 Thread Gerry Reno
Can someone tell me if RHEL-6 is planned to have support for Xenner? Will this be built into qemu? Otherwise what are options for using Xenner with RHEL-5? We want to run both KVM and Xen guests managed by KVM hypervisor. -- Libvir-list mailing list [email protected] https://www.redh

Re: [libvirt] [PATCH] Allow NULL mac address in virGetInterface.

2009-10-21 Thread Laine Stump
On 10/21/2009 06:19 AM, Daniel Veillard wrote: On Mon, Oct 19, 2009 at 04:41:52PM -0400, Laine Stump wrote: There are places where an interface will not have a mac address, and netcf returns this as a NULL pointer rather than a pointer to an empty string. Rather than checking for this all ov

[libvirt] New APIs for checking some object properties (v2)

2009-10-21 Thread Daniel P. Berrange
This is a second posting of the proposal from earlier today http://www.redhat.com/archives/libvir-list/2009-October/msg00556.html The changes since last time - Renamed some existing internal APIs which had bad names which clashed with our new public APis. - Fix the comment bugs Daniel menti

[libvirt] [PATCH 1/3] Rename internal APis

2009-10-21 Thread Daniel P. Berrange
--- src/conf/domain_conf.c |4 +- src/conf/domain_conf.h |2 +- src/conf/interface_conf.h |2 +- src/conf/network_conf.c |2 +- src/conf/network_conf.h |2 +- src/lxc/lxc_driver.c| 24 +++--- src/network/bridge_driver.c | 20 ++--

[libvirt] [PATCH 2/3] New APIs for checking some object properties

2009-10-21 Thread Daniel P. Berrange
Introduce a number of new APIs to expose some boolean properties of objects, which cannot otherwise reliably determined, nor are aspects of the XML configuration. * virDomainIsActive: Checking virDomainGetID is not reliable since it is not possible to distinguish between error condition an

Re: [libvirt] [PATCH 1/3] Rename internal APis

2009-10-21 Thread Matthias Bolte
2009/10/21 Daniel P. Berrange : > --- >  src/conf/domain_conf.c      |    4 +- >  src/conf/domain_conf.h      |    2 +- >  src/conf/interface_conf.h   |    2 +- >  src/conf/network_conf.c     |    2 +- >  src/conf/network_conf.h     |    2 +- >  src/lxc/lxc_driver.c        |   24 +++--- >  

Re: [libvirt] New APIs for checking some object properties (v2)

2009-10-21 Thread Daniel Veillard
On Wed, Oct 21, 2009 at 07:15:22PM +0100, Daniel P. Berrange wrote: > This is a second posting of the proposal from earlier today > > http://www.redhat.com/archives/libvir-list/2009-October/msg00556.html > > The changes since last time > > - Renamed some existing internal APIs which had bad nam

Re: [libvirt] [PATCH] consolidate virXPathNodeSet()

2009-10-21 Thread Daniel P. Berrange
On Wed, Oct 21, 2009 at 05:24:03PM +0200, Daniel Veillard wrote: > While reviewing Rich last patch I was afraid that virXPathNodeSet() > could return -1 when doing an evaluation failure. It is based on > xmlXPathEval() from libxml2 whose behaviour is to possibly return NULL > on XPath evaluation

Re: [libvirt] RHEL 5 with Xen - changed IPs and now weirdness

2009-10-21 Thread Daniel P. Berrange
On Wed, Oct 21, 2009 at 11:36:50AM -0400, Denny Snyder wrote: >Hi all, > >I had installed RHEL 5 x86_64 with virtualization right off the bat. >Everything ran beautifully with two Xen guests (also RHEL 5.) All 3 IPs >(host and 2 guests) were in the same subnet. > >Then I had

Re: [libvirt] [PATCH 2/3] New APIs for checking some object properties

2009-10-21 Thread Matthias Bolte
2009/10/21 Daniel P. Berrange : > Introduce a number of new APIs to  expose some boolean properties > of objects, which cannot otherwise reliably determined, nor are > aspects of the XML configuration. > >  * virDomainIsActive: Checking virDomainGetID is not reliable >   since it is not possible to

Re: [libvirt] Xenner status

2009-10-21 Thread Daniel P. Berrange
On Wed, Oct 21, 2009 at 12:45:22PM -0400, Gerry Reno wrote: > Can someone tell me if RHEL-6 is planned to have support for Xenner? > Will this be built into qemu? Otherwise what are options for using > Xenner with RHEL-5? We want to run both KVM and Xen guests managed by > KVM hypervisor. Xe

Re: [libvirt] [PATCH 2/3] New APIs for checking some object properties

2009-10-21 Thread Daniel P. Berrange
On Wed, Oct 21, 2009 at 08:56:25PM +0200, Matthias Bolte wrote: > 2009/10/21 Daniel P. Berrange : > > [...] > > diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms > > index 8921c1a..62fa6cf 100644 > > --- a/src/libvirt_public.syms > > +++ b/src/libvirt_public.syms > > @@ -329,4 +329,17

Re: [libvirt] [PATCH] New APIs for checking some object properties

2009-10-21 Thread Daniel P. Berrange
On Wed, Oct 21, 2009 at 01:54:00PM +0200, Daniel Veillard wrote: > > +int virInterfaceIsActive(virInterfacePtr iface); > > + > > +int virConnectIsEncrypted(virConnectPtr conn); > > +int virConnectIsSecure(virConnectPtr conn); > > The only small remark I would have is that it's not consistent wit

Re: [libvirt] RHEL 5 with Xen - changed IPs and now weirdness

2009-10-21 Thread Denny Snyder
Thanks for the info... I attempted a service libvirtd stop (which fails since it isn't running) a service libvirtd start says OK but the status remains the same: libvirtd dead but subsys locked so I did a service libvirtd stop and then ran it manually and got the following: 15:03:59.798: er

Re: [libvirt] RHEL 5 with Xen - changed IPs and now weirdness

2009-10-21 Thread Denny Snyder
UPDATE: Found the following in the /var/log/messages: Oct 21 15:02:50 jhsympa2-base libvirtd: 15:02:50.227: error : Cannot access CA certificate '/etc/pki/CA/cacert.pem': No such file or directory Oct 21 15:09:29 jhsympa2-base libvirtd: 15:09:29.910: warning : Shutting down on signal 2 Oct 21

Re: [libvirt] Xenner status

2009-10-21 Thread Gerry Reno
Daniel P. Berrange wrote: On Wed, Oct 21, 2009 at 12:45:22PM -0400, Gerry Reno wrote: Can someone tell me if RHEL-6 is planned to have support for Xenner? Will this be built into qemu? Otherwise what are options for using Xenner with RHEL-5? We want to run both KVM and Xen guests managed

Re: [libvirt] RHEL 5 with Xen - changed IPs and now weirdness

2009-10-21 Thread Denny Snyder
FOUND IT! someone decided to edit /etc/libvirt/libvirtd.conf and uncommented out the listen_tls = 0 line That person has been thoroughly beaten around the head and shoulder area. Thanks for the great info libvirtd is now running as expected. Since I won't be doing any NAT the virbr0 has

Re: [libvirt] [PATCH 3/3] Implmentation of new APIs to checking state/persistence of objects

2009-10-21 Thread Matthias Bolte
2009/10/21 Daniel P. Berrange : > This implements the virConnectIsSecure, virConnectIsEncrypted, > virDomainIsPersistent, virDomainIsActive, virNetworkIsActive, > virNetworkIsPersistent, virStoragePoolIsActive, > virStoragePoolIsPersistent, virInterfaceIsActive APIs in > (nearly) all drivers. Excep

Re: [libvirt] RHEL 5 with Xen - changed IPs and now weirdness

2009-10-21 Thread Dave Allan
Denny Snyder wrote: Thanks for the info... I attempted a service libvirtd stop (which fails since it isn't running) a service libvirtd start says OK but the status remains the same: libvirtd dead but subsys locked so I did a service libvirtd stop and then ran it manually and got the followin

Re: [libvirt] [PATCH 2/3] New APIs for checking some object properties

2009-10-21 Thread Matthias Bolte
2009/10/21 Daniel P. Berrange : > On Wed, Oct 21, 2009 at 08:56:25PM +0200, Matthias Bolte wrote: >> 2009/10/21 Daniel P. Berrange : >> >> [...] >> > diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms >> > index 8921c1a..62fa6cf 100644 >> > --- a/src/libvirt_public.syms >> > +++ b/src/l

[libvirt] Possible qemu GetVcpus bug?

2009-10-21 Thread Cole Robinson
Playing with the GetVcpus API call (and virsh vcpuinfo), there is a slight inconsistency that may be a bug. In qemudDomainGetVcpus, we have: if (nodeGetInfo(dom->conn, &nodeinfo) < 0) goto cleanup; maxcpu = maplen * 8; if (maxcpu > nodeinfo.cpus) maxcpu = nodeinfo.cpu

[libvirt] [PATCH] Fix potential false-positive OOM error reporting

2009-10-21 Thread Matthias Bolte
If no matching device was found (cap == NULL) then no strdup() call was made and *wwnn and *wwpn are untouched. Checking them for NULL in this situation may result in reporting an false-positive OOM error because *wwnn and *wwpn may be initialized to NULL by the caller. Only check *wwnn and *wwpn