Re: [libvirt] hvm/x86_64 combination not allowed

2010-01-18 Thread Laine Stump
On 01/18/2010 04:59 PM, Matthias Bolte wrote: 2010/1/18 Steve Brown: $ sudo virsh capabilities x86_64 tcp hvm 32 /usr/bin/qemu pc-0.11 pc pc-0.10 isapc

Re: [libvirt] [PATCH v3] Implement CPU topology support for QEMU driver

2010-01-18 Thread Matthias Bolte
2010/1/18 Jiri Denemark : > QEMU's command line equivalent for the following domain XML fragment >    2 >     >        ... >         >     > > is > >    -smp 2,sockets=1,cores=2,threads=1 > > This syntax was introduced in QEMU-0.12. > > Version 2 changes: > - -smp argument build split into a separa

[libvirt] Libvirt guide draft published on libvirt.org

2010-01-18 Thread David Jorm
I am a tech writer who recently joined the Red Hat team. I have been tasked with assisting in the improvement of libvirt documentation where possible and co-ordinating the development of the libvirt Application Development Guide. The guide was previously in the hands of Dani Coulson, who has sin

Re: [libvirt] [PATCH] storage_conf: plug a leak on OOM error path

2010-01-18 Thread Matthias Bolte
2010/1/18 Jim Meyering : > Obvious, for a change... > > >From 964f24e0724eda6bf12d115318ea9576bbd91f10 Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Mon, 18 Jan 2010 18:40:13 +0100 > Subject: [PATCH] storage_conf: plug a leak on OOM error path > > * src/conf/storage_conf.c (virStoragePoolS

Re: [libvirt] hvm/x86_64 combination not allowed

2010-01-18 Thread Matthias Bolte
2010/1/18 Steve Brown : >>> $ sudo virsh capabilities >>> >>>   >>>     >>>       x86_64 >>>     >>>     >>>       >>>       >>>         tcp >>>       >>>     >>>   >>>   >>>     hvm >>>     >>>       32 >>>       /usr/bin/qemu >>>       pc-0.11 >>>       pc >>>       pc-0.10 >>>      

[libvirt] virt-manager network properties

2010-01-18 Thread C.J. Adams-Collier
Hey Dan, list, It seems to me that virt-manager could do with more information about the virtual network devices, the DHCP leases on them, maybe a view of the arp table, etc. To this end, I've abused Dan's .glade file a bit and put some stub code in virtManger/host.py Could I get some comments a

Re: [libvirt] Cannot use console with 0.7.5, error: internal error no assigned pty for device serial0

2010-01-18 Thread Guido Günther
On Sun, Jan 17, 2010 at 01:27:21PM +0100, Matthias Bolte wrote: > 2010/1/17 Guido Günther : > > On Sat, Jan 16, 2010 at 06:24:28PM +0100, Marc Haber wrote: > >> Hi, > >> > >> On Fri, Jan 15, 2010 at 03:13:25PM +0100, Marc Haber wrote: > >> > $ dpkg --list *kvm* > >> > Desired=Unknown/Install/Remove

Re: [libvirt] Current cpu and memory usage for Host and Domains

2010-01-18 Thread su disheng
On Sun, Jan 17, 2010 at 5:02 AM, Daniel P. Berrange wrote: > On Fri, Jan 15, 2010 at 11:52:09AM -0800, su disheng wrote: > > Seem there is no way to get host CPU usage in libvirt API? I can get > > freeMemory by virNodeGetFreeMemory, but no cpu usage API. > > How about add a new api for it? The h

Re: [libvirt] hvm/x86_64 combination not allowed

2010-01-18 Thread Steve Brown
>> $ sudo virsh capabilities >> >>   >>     >>       x86_64 >>     >>     >>       >>       >>         tcp >>       >>     >>   >>   >>     hvm >>     >>       32 >>       /usr/bin/qemu >>       pc-0.11 >>       pc >>       pc-0.10 >>       isapc >>       >>       >>     >>     >>  

Re: [libvirt] virsh list after libvirt restart "forgets" existing guests (0.7.5)

2010-01-18 Thread Daniel P. Berrange
On Mon, Jan 18, 2010 at 01:03:12PM -0500, Thomas Sjolshagen wrote: > After the upgrade to 0.7.5 from the preview repository, I've > noticed that a restart of libvirt does not appear to "re-acquire" > any guests already running on the system. See these two links http://www.redhat.com/archives/l

[libvirt] virsh list after libvirt restart "forgets" existing guests (0.7.5)

2010-01-18 Thread Thomas Sjolshagen
After the upgrade to 0.7.5 from the preview repository, I've noticed that a restart of libvirt does not appear to "re-acquire" any guests already running on the system. # virsh list Compiled against library: libvir 0.7.5 Using library: libvir 0.7.5 Using API: QEMU 0.7.5 Running hypervisor: QEMU

Re: [libvirt] [PATCH] xen_driver: don't leak a parsed-config buffer

2010-01-18 Thread Matthias Bolte
2010/1/18 Jim Meyering : > Another leak: > > >From 10a428a2ed1ddbe4da2b4fbd7690da5a0fe0420b Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Mon, 18 Jan 2010 18:02:17 +0100 > Subject: [PATCH] xen_driver: don't leak a parsed-config buffer > > * src/xen/xen_driver.c (xenUnifiedDomainXMLFromNati

[libvirt] [PATCH] storage_conf: plug a leak on OOM error path

2010-01-18 Thread Jim Meyering
Obvious, for a change... >From 964f24e0724eda6bf12d115318ea9576bbd91f10 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 18 Jan 2010 18:40:13 +0100 Subject: [PATCH] storage_conf: plug a leak on OOM error path * src/conf/storage_conf.c (virStoragePoolSourceListNewSource): Free just-allocate

Re: [libvirt] [PATCH] qemu_driver: don't leak a virDomainDeviceDef buffer

2010-01-18 Thread Jim Meyering
Matthias Bolte wrote: > 2010/1/18 Jim Meyering : >> At first I was going to call virDomainDeviceDefFree only "if (dev)", >> but saw that it handles a NULL "dev" just fine, so it's better to skip >> the test altogether, just as we do for many other free-like functions. >> >> >From ea8511d709492f5cdc

[libvirt] [PATCH] Fix QEMU driver custom domain status XML extensions

2010-01-18 Thread Daniel P. Berrange
Invoking the virConnectGetCapabilities() method causes the QEMU driver to rebuild its internal capabilities object. Unfortunately it was forgetting to register the custom domain status XML hooks again. To avoid this kind of error in the future, the code which builds capabilities is refactored into

Re: [libvirt] [PATCH] qemu_driver: don't leak a virDomainDeviceDef buffer

2010-01-18 Thread Matthias Bolte
2010/1/18 Jim Meyering : > At first I was going to call virDomainDeviceDefFree only "if (dev)", > but saw that it handles a NULL "dev" just fine, so it's better to skip > the test altogether, just as we do for many other free-like functions. > > >From ea8511d709492f5cdc152a1eaccbccd05f036648 Mon Se

[libvirt] [PATCH] xen_driver: don't leak a parsed-config buffer

2010-01-18 Thread Jim Meyering
Another leak: >From 10a428a2ed1ddbe4da2b4fbd7690da5a0fe0420b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 18 Jan 2010 18:02:17 +0100 Subject: [PATCH] xen_driver: don't leak a parsed-config buffer * src/xen/xen_driver.c (xenUnifiedDomainXMLFromNative): Also free "conf" before returning.

[libvirt] XML for the "boot=on" option

2010-01-18 Thread Shi Jin
Hi, there, In order to install windows 2008 using the virtio driver, I had to modify the KVM command to include the boot=on option like: -drive file=/virtioWin08.raw,if=virtio,index=0,boot=on However, I haven't been able to find a corresponding libvirt XML element that can enable this "boot=on

Re: [libvirt] [PATCH] qemu_driver: don't leak a virDomainDeviceDef buffer

2010-01-18 Thread Jim Meyering
Daniel P. Berrange wrote: ... > Your fix is reasonable, but can you leave it out of GIT, because there are > a huge number of other related problems in this bit code which I've got > patches almost ready for. Sure. I'll defer it. -- libvir-list mailing list libvir-list@redhat.com https://www.red

Re: [libvirt] [PATCH] qemu_driver: don't leak a virDomainDeviceDef buffer

2010-01-18 Thread Daniel P. Berrange
On Mon, Jan 18, 2010 at 04:58:37PM +0100, Jim Meyering wrote: > At first I was going to call virDomainDeviceDefFree only "if (dev)", > but saw that it handles a NULL "dev" just fine, so it's better to skip > the test altogether, just as we do for many other free-like functions. > > >From ea8511d70

Re: [libvirt] 0.7.5 errors in configure script

2010-01-18 Thread Avi Weit
Matthias Bolte wrote on 18/01/2010 17:52:15: > Matthias Bolte > 18/01/2010 17:52 > > To > > Frédéric Grelot > > cc > > Avi Weit/Haifa/i...@ibmil, libvir-list@redhat.com > > Subject > > Re: [libvirt] 0.7.5 errors in configure script > > 2010/1/18 Frédéric Grelot : > > > >> checking for dm_task_r

[libvirt] [PATCH] qemu_driver: don't leak a virDomainDeviceDef buffer

2010-01-18 Thread Jim Meyering
At first I was going to call virDomainDeviceDefFree only "if (dev)", but saw that it handles a NULL "dev" just fine, so it's better to skip the test altogether, just as we do for many other free-like functions. >From ea8511d709492f5cdc152a1eaccbccd05f036648 Mon Sep 17 00:00:00 2001 From: Jim Meyer

Re: [libvirt] 0.7.5 errors in configure script

2010-01-18 Thread Matthias Bolte
2010/1/18 Frédéric Grelot : > >> checking for dm_task_run in -ldevmapper... no >> configure: error: You must install device-mapper-devel/libdevmapper >> >= >> 1.0.0 to compile libvirt >> >> /dev/mapper exists on the system. >> > > You need the *-devel version of those packages (they provide include

[libvirt] [PATCH v3] Implement CPU topology support for QEMU driver

2010-01-18 Thread Jiri Denemark
QEMU's command line equivalent for the following domain XML fragment 2 ... is -smp 2,sockets=1,cores=2,threads=1 This syntax was introduced in QEMU-0.12. Version 2 changes: - -smp argument build split into a separate function - always add ",sockets=S,cores=C,t

Re: [libvirt] 0.7.5 errors in configure script

2010-01-18 Thread Frédéric Grelot
> checking for dm_task_run in -ldevmapper... no > configure: error: You must install device-mapper-devel/libdevmapper > >= > 1.0.0 to compile libvirt > > /dev/mapper exists on the system. > You need the *-devel version of those packages (they provide include files in particular). I think it is

Re: [libvirt] 0.7.5 errors in configure script

2010-01-18 Thread Daniel P. Berrange
On Mon, Jan 18, 2010 at 05:04:26PM +0200, Avi Weit wrote: > > Hi, > > I am using Ubuntu 9.10 and downloaded and extracted libvirt.0.7.5. I have > issued: > ./configure --prefix=$HOME/usr --without-xen > > but I get: You must install device-mapper-devel/libdevmapper >= 1.0.0 to > compile libvirt

[libvirt] 0.7.5 errors in configure script

2010-01-18 Thread Avi Weit
Hi, I am using Ubuntu 9.10 and downloaded and extracted libvirt.0.7.5. I have issued: ./configure --prefix=$HOME/usr --without-xen but I get: You must install device-mapper-devel/libdevmapper >= 1.0.0 to compile libvirt Below is a snippet of the final configure output: checking for showmount..

[libvirt] Release 0.4.1 of libvirt-java

2010-01-18 Thread Bryan Kearney
I have just released 0.4.1 of libvirt java. There are 2 main items in this release: - Better null checking in for Scheduled Parameters which should fix the issues reported on the list. - Error Callbacks to provide better handling of errors encountered by libvirt (virConnSetErrorFunc and virSet

[libvirt] [PATCH] logging: confirm that we want to ignore a write error

2010-01-18 Thread Jim Meyering
Ignoring a write failure is a big deal, so when you do that deliberately, it's worth marking in such a way that code analyzers don't report a false positive. Until a year or so ago, people thought using (void) would be enough. But newer gcc warns in spite of that (for functions marked with the wa

Re: [libvirt] [PATCH 18/34] Add device info to serial, parallel, channel, input & fs devices

2010-01-18 Thread Daniel P. Berrange
On Fri, Jan 15, 2010 at 05:26:33PM +0100, Daniel Veillard wrote: > On Fri, Jan 08, 2010 at 05:23:14PM +, Daniel P. Berrange wrote: > > Although the serial, parallel, chanel, input & fs devices do > > not have PCI address info, they can all have device aliases. > > Thus it neccessary to associat

Re: [libvirt] [PATCH 15/34] Auto-add disk controllers based on defined disks

2010-01-18 Thread Daniel P. Berrange
On Fri, Jan 15, 2010 at 04:24:16PM +0100, Daniel Veillard wrote: > On Fri, Jan 08, 2010 at 05:23:11PM +, Daniel P. Berrange wrote: > > Existing applications using libvirt are not aware of the disk > > controller concept. Thus, after parsing the definitions > > in the XML, it is neccessary to c

[libvirt] Bugfix for RHEL 5.4+ ?? -- Re: Synchronous commands block virsh?

2010-01-18 Thread Andreas Kurz
Hi list, I found this thread from December: http://www.mail-archive.com/libvir-list@redhat.com/msg18595.htm that starting with version 0.7.4 libvirtd will no longer block other API calls, which would be extremely useful in HA clusters in combination with live migration. Will this fix f

Re: [libvirt] [PATCH] storage_backend_fs.c: do not ignore probe failure

2010-01-18 Thread Daniel P. Berrange
On Mon, Jan 18, 2010 at 01:37:34PM +0100, Jim Meyering wrote: > Daniel P. Berrange wrote: > > On Mon, Jan 18, 2010 at 10:40:26AM +0100, Jim Meyering wrote: > >> When virStorageBackendProbeTarget fails, it returns -1 or -2. > >> The two uses below obviously intended to handle those cases > >> differ

Re: [libvirt] [PATCH] storage_backend_fs.c: do not ignore probe failure

2010-01-18 Thread Jim Meyering
Daniel P. Berrange wrote: > On Mon, Jan 18, 2010 at 10:40:26AM +0100, Jim Meyering wrote: >> When virStorageBackendProbeTarget fails, it returns -1 or -2. >> The two uses below obviously intended to handle those cases >> differently, but due to a wrong comparison, they always treated a >> "real" (e

Re: [libvirt] [PATCH 14/34] Fixed char device stuff

2010-01-18 Thread Daniel P. Berrange
On Fri, Jan 15, 2010 at 04:17:44PM +0100, Daniel Veillard wrote: > On Fri, Jan 08, 2010 at 05:23:10PM +, Daniel P. Berrange wrote: > > Temp hack > > --- > > src/qemu/qemu_monitor_text.c |9 +++-- > > 1 files changed, 3 insertions(+), 6 deletions(-) > > > > diff --git a/src/qemu/qemu_m

Re: [libvirt] [PATCH] storage_backend_fs.c: do not ignore probe failure

2010-01-18 Thread Daniel P. Berrange
On Mon, Jan 18, 2010 at 10:40:26AM +0100, Jim Meyering wrote: > When virStorageBackendProbeTarget fails, it returns -1 or -2. > The two uses below obviously intended to handle those cases > differently, but due to a wrong comparison, they always treated a > "real" (e.g., open) failure (-1) just lik

Re: [libvirt] [PATCH] remove useless comparisons in lxc_driver, vbox_tmpl.c

2010-01-18 Thread Daniel P. Berrange
On Mon, Jan 18, 2010 at 10:20:18AM +0100, Jim Meyering wrote: > Here are two change sets. > They remove useless comparisons of the style > > -if (def->nets[i]->mac) { > > where the mac member is declared as an array. > > >From d22b04d2684d5a16f797d8df0c2ef036b5b1b2ce Mon Sep 17 00:00:00

Re: [libvirt] [PATCH] secret_driver.c: remove dead cleanup code

2010-01-18 Thread Daniel P. Berrange
On Mon, Jan 18, 2010 at 10:53:31AM +0100, Jim Meyering wrote: > Here's another example of appropriate use of assert. > The while loop removed below is currently guaranteed never > to be executed, since "list" is always NULL at that point. > However, you can argue that simply removing the loop is a

Re: [libvirt] [PATCH v2] Implement CPU topology support for QEMU driver

2010-01-18 Thread Jiri Denemark
On Sun, Jan 17, 2010 at 12:57:12 +, Daniel P. Berrange wrote: > > @@ -2112,8 +2148,13 @@ int qemudBuildCommandLine(virConnectPtr conn, > > ADD_ARG_LIT("-mem-path"); > > ADD_ARG_LIT(driver->hugepage_path); > > } > > + > > +if (!(smp = qemudBuildCommandLineSmp(conn, def

[libvirt] [PATCH] secret_driver.c: remove dead cleanup code

2010-01-18 Thread Jim Meyering
Here's another example of appropriate use of assert. The while loop removed below is currently guaranteed never to be executed, since "list" is always NULL at that point. However, you can argue that simply removing the loop is a little risky: what if someone changes things to "goto cleanup" before

[libvirt] [PATCH] storage_backend_fs.c: do not ignore probe failure

2010-01-18 Thread Jim Meyering
When virStorageBackendProbeTarget fails, it returns -1 or -2. The two uses below obviously intended to handle those cases differently, but due to a wrong comparison, they always treated a "real" (e.g., open) failure (-1) just like an ignorable "wrong file type" failure (-2). FYI, coverity reported

[libvirt] [PATCH] remove useless comparisons in lxc_driver, vbox_tmpl.c

2010-01-18 Thread Jim Meyering
Here are two change sets. They remove useless comparisons of the style -if (def->nets[i]->mac) { where the mac member is declared as an array. >From d22b04d2684d5a16f797d8df0c2ef036b5b1b2ce Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 18 Jan 2010 09:49:57 +0100 Subject: [PATCH

Re: [libvirt] [PATCH 3/3] When testing qemu, unset the SDL driver environment variables.

2010-01-18 Thread Daniel Veillard
On Mon, Dec 28, 2009 at 04:35:56PM +0100, Matthias Bolte wrote: > 2009/12/23 Diego Elio Pettenò : > > With these variables present, the tests would fail because they are not > > expected. > > --- > >  tests/qemuxml2argvtest.c |    2 ++ > >  1 files changed, 2 insertions(+), 0 deletions(-) > > > > d

Re: [libvirt] Current cpu and memory usage for Host and Domains

2010-01-18 Thread Daniel Veillard
On Sun, Jan 17, 2010 at 01:02:33PM +, Daniel P. Berrange wrote: > On Fri, Jan 15, 2010 at 11:52:09AM -0800, su disheng wrote: > > Seem there is no way to get host CPU usage in libvirt API? I can get > > freeMemory by virNodeGetFreeMemory, but no cpu usage API. > > How about add a new api for i