Re: [Libvir] API confusion...

2008-04-08 Thread Richard W.M. Jones
On Tue, Apr 08, 2008 at 03:47:05PM -0600, Spencer Parker wrote: > Since I am kind of an idiot and don't know what I am doing...I am having > trouble with getting network stats to work in Python. I have everything > correct...but I am just not sure exactly what it is looking for. I get this > erro

Re: [Libvir] e1000 - Specifying model in XML Configs

2008-04-08 Thread Jim Paris
Henri Cook wrote: > Hi guys, > > I just tried to port a few customers over to this libvirt setup i'm > hoping to run and I couldn't get their machines started because there's > no mechanism to specify a model in the XML! > > I know redhat have changed KVM's default driver to e1000, which I think

[Libvir] [PATCH 2/2] lxc: Shutdown and destroy container

2008-04-08 Thread Dave Leskovec
This is a repost of the shutdown and destroy container support. Changes in this version: * Moved state changes to after the signal is successfully sent rather than restoring if it failed. * Signal handling in lxc_container goes away since the tty forwarding process is no longer the container root

[Libvir] [PATCH 1/2] lxc: start container

2008-04-08 Thread Dave Leskovec
This is a repost of the start container support. Changes from the last version: * Report an error when allocation for init string fails in lxcExecContainerInit() * Change to find by name in lxcStartDomain() * Move tty forwarding process outside of the container. This allows consolidating the fo

[Libvir] [PATCH 0/2] Start, shutdown and destroy linux containers

2008-04-08 Thread Dave Leskovec
Reposting the patches to start, shutdown and destroy containers with updates for feedback received so far. Thanks! -- Best Regards, Dave Leskovec IBM Linux Technology Center Open Virtualization -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-lis

Re: [Libvir] Don't fail to read a file because it's non-seekable (e.g., a pipe).

2008-04-08 Thread Jim Meyering
"Richard W.M. Jones" <[EMAIL PROTECTED]> wrote: > On Tue, Apr 08, 2008 at 05:12:28PM +0200, Jim Meyering wrote: >> And if someone does e.g. virsh define DIR_NAME >> on a system that lets you read directories, they >> won't be too surprised that the contents of the >> directory is invalid XML. >> >>

[Libvir] API confusion...

2008-04-08 Thread Spencer Parker
Since I am kind of an idiot and don't know what I am doing...I am having trouble with getting network stats to work in Python. I have everything correct...but I am just not sure exactly what it is looking for. I get this error: libvir: Xen error : invalid argument in xenHypervisorDomainInterface

Re: [Libvir] Don't fail to read a file because it's non-seekable (e.g., a pipe).

2008-04-08 Thread Richard W.M. Jones
On Tue, Apr 08, 2008 at 05:12:28PM +0200, Jim Meyering wrote: > And if someone does e.g. virsh define DIR_NAME > on a system that lets you read directories, they > won't be too surprised that the contents of the > directory is invalid XML. > > Here's the updated patch: Patch looks good. What are

[Libvir] [PATCH] Have xenDaemonDetachDevice() remove device configuration

2008-04-08 Thread Ryan Scott
When a user runs 'virsh detach-disk' on a running domain, the disk is removed, but reappears after the domain is rebooted. This seems odd, as someone who types detach-disk most likely wants the change to be permanent. This patch updates the code in xenDaemonDetachDevice() to pass the rm_cfg

[Libvir] [PATCH] (for discussion only) KVM migration v1

2008-04-08 Thread Richard W.M. Jones
This patch implements KVM to KVM migration. It is for discussion only, partly because it doesn't work for some reason I can't quite work out at the moment. We implement a second version of the migration protocol. This second version has two differences: (1) Prepare step is replaced by Prepare2,

[Libvir] FYI: configure.in (ALL_LINGUAS): Fix typo: s/Latn/latin/

2008-04-08 Thread Jim Meyering
FYI, I committed this: Mon Apr 8 17:32:07 CET 2008 Jim Meyering <[EMAIL PROTECTED]> + * configure.in (ALL_LINGUAS): Fix typo: s/Latn/latin/. + Don't fail to read a file because it's non-seekable (e.g., a pipe). * src/util.c (fread_file_lim): New function. (__virFil

Re: [Libvir] Zombie KVMs?

2008-04-08 Thread Richard W.M. Jones
On Tue, Apr 08, 2008 at 05:51:46PM +0100, Henri Cook wrote: > Does anyone ever see: > > root 18628 3.2 0.0 0 0 ?Z17:30 0:40 \_ > [kvm] > > Zombie copies of KVM under libvirtd? They're unkillable (without > restarting libvirtd) - although libvirt all still functions

[Libvir] Zombie KVMs?

2008-04-08 Thread Henri Cook
Hey all, Does anyone ever see: root 18628 3.2 0.0 0 0 ?Z17:30 0:40 \_ [kvm] Zombie copies of KVM under libvirtd? They're unkillable (without restarting libvirtd) - although libvirt all still functions as normal Henri -- Libvir-list mailing list Libvir-list@redhat

Re: [Libvir] Don't fail to read a file because it's non-seekable (e.g., a pipe).

2008-04-08 Thread Daniel P. Berrange
On Tue, Apr 08, 2008 at 04:04:53PM +0100, Richard W.M. Jones wrote: > On Tue, Apr 08, 2008 at 05:00:03PM +0200, Jim Meyering wrote: > > This fix addresses a problem exposed in an ovirt script whereby > > trying to use bash process substitution, e.g., in > > virsh define <(command to generate xml) >

Re: [Libvir] [PATCH] Allow selection of the NIC model in QEMU/KVM

2008-04-08 Thread Daniel P. Berrange
On Tue, Apr 08, 2008 at 03:16:08PM +0100, Richard W.M. Jones wrote: > On Tue, Apr 08, 2008 at 02:57:15PM +0100, Daniel P. Berrange wrote: > > This patch seems incomplete - there's no code to include the tag > > when dumping the XML. > > Yeah, agreed - forgot about that :-( Oh, you may also find

Re: [Libvir] Don't fail to read a file because it's non-seekable (e.g., a pipe).

2008-04-08 Thread Jim Meyering
"Richard W.M. Jones" <[EMAIL PROTECTED]> wrote: > On Tue, Apr 08, 2008 at 05:00:03PM +0200, Jim Meyering wrote: >> This fix addresses a problem exposed in an ovirt script whereby >> trying to use bash process substitution, e.g., in >> virsh define <(command to generate xml) >> would fail. >> >> Oo

Re: [Libvir] Don't fail to read a file because it's non-seekable (e.g., a pipe).

2008-04-08 Thread Richard W.M. Jones
On Tue, Apr 08, 2008 at 05:00:03PM +0200, Jim Meyering wrote: > This fix addresses a problem exposed in an ovirt script whereby > trying to use bash process substitution, e.g., in > virsh define <(command to generate xml) > would fail. > > Oops. Just noticed that the indentation in the added func

Re: [Libvir] Don't fail to read a file because it's non-seekable (e.g., a pipe).

2008-04-08 Thread Jim Meyering
Jim Meyering <[EMAIL PROTECTED]> wrote: > FYI, I expect to add fread_file_lim or something like it to gnulib, > and it already has some unit tests (passed). > I removed the "* tab-width: 4" line because it seriously > mangled the code that I initially added. Besides saying "tab-width 4" > is cont

[Libvir] Don't fail to read a file because it's non-seekable (e.g., a pipe).

2008-04-08 Thread Jim Meyering
FYI, I expect to add fread_file_lim or something like it to gnulib, and it already has some unit tests (passed). I removed the "* tab-width: 4" line because it seriously mangled the code that I initially added. Besides saying "tab-width 4" is contradictory with the "indent-tabs-mode: nil" setting

Re: [Libvir] [PATCH] Allow selection of the NIC model in QEMU/KVM

2008-04-08 Thread Pau Garcia i Quiles
Quoting "Richard W.M. Jones" <[EMAIL PROTECTED]>: This patch allows selection of the NIC model for QEMU/KVM domains. The selection is done by adding a element to the XML, as in this example: The model type string is only checked to make sure it's a short alpha-numeric

Re: [Libvir] [PATCH] Allow selection of the NIC model in QEMU/KVM

2008-04-08 Thread Richard W.M. Jones
On Tue, Apr 08, 2008 at 02:57:15PM +0100, Daniel P. Berrange wrote: > This patch seems incomplete - there's no code to include the tag > when dumping the XML. Yeah, agreed - forgot about that :-( > We should also implement the same for Xen driver really, since that has the > choice of ne2k/rtl81

Re: [Libvir] [PATCH] Allow selection of the NIC model in QEMU/KVM

2008-04-08 Thread Henri Cook
I'm sorry , didn't read the patch properly first! Richard W.M. Jones wrote: > This patch allows selection of the NIC model for QEMU/KVM domains. > The selection is done by adding a element to the XML, as in > this example: > > > > > > > The model type string is only ch

Re: [Libvir] [PATCH] Allow selection of the NIC model in QEMU/KVM

2008-04-08 Thread Henri Cook
What about when the model name doesn't include an underscore? like e1000 H Richard W.M. Jones wrote: > This patch allows selection of the NIC model for QEMU/KVM domains. > The selection is done by adding a element to the XML, as in > this example: > > > > > > > The model

Re: [Libvir] [PATCH] Catch qemu VM-start errors

2008-04-08 Thread Daniel P. Berrange
On Tue, Apr 08, 2008 at 12:50:39PM +0100, Richard W.M. Jones wrote: > Patch to fix the aforementioned problem when qemu subprocess fails to > start. ACK Dan. -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o-

Re: [Libvir] [PATCH] Allow selection of the NIC model in QEMU/KVM

2008-04-08 Thread Daniel P. Berrange
On Tue, Apr 08, 2008 at 02:17:56PM +0100, Richard W.M. Jones wrote: > This patch allows selection of the NIC model for QEMU/KVM domains. > The selection is done by adding a element to the XML, as in > this example: > > > > > > > The model type string is only checked to ma

Re: [Libvir] [PATCH] Allow selection of the NIC model in QEMU/KVM

2008-04-08 Thread Daniel Veillard
On Tue, Apr 08, 2008 at 02:17:56PM +0100, Richard W.M. Jones wrote: > This patch allows selection of the NIC model for QEMU/KVM domains. > The selection is done by adding a element to the XML, as in > this example: > > > > > > > The model type string is only checked to ma

[Libvir] [PATCH] Allow selection of the NIC model in QEMU/KVM

2008-04-08 Thread Richard W.M. Jones
This patch allows selection of the NIC model for QEMU/KVM domains. The selection is done by adding a element to the XML, as in this example: The model type string is only checked to make sure it's a short alpha-numeric + underscore, since it seems impractical to extract t

Re: [Libvir] [PATCH] Catch qemu VM-start errors

2008-04-08 Thread Daniel Veillard
On Tue, Apr 08, 2008 at 12:50:39PM +0100, Richard W.M. Jones wrote: > Patch to fix the aforementioned problem when qemu subprocess fails to > start. Fine by me, +1, Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://l

[Libvir] [PATCH] Catch qemu VM-start errors

2008-04-08 Thread Richard W.M. Jones
Patch to fix the aforementioned problem when qemu subprocess fails to start. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. htt

Re: [Libvir] e1000 - Specifying model in XML Configs

2008-04-08 Thread Henri Cook
Sorry - I tried to make a patch, but it appears it makes libvirtd segfault (it starts but when i try to use virsh -c qemu:///system create vm.cfg it segfaults). Also - when building my own copy of libvirt - I can connect via virsh -c qemu:///system, but just 'virsh' says it cannot connect to the h

Re: [Libvir] e1000 - Specifying model in XML Configs

2008-04-08 Thread Pau Garcia i Quiles
Quoting "Richard W.M. Jones" <[EMAIL PROTECTED]>: On Mon, Apr 07, 2008 at 10:51:56PM +0100, Henri Cook wrote: I just tried to port a few customers over to this libvirt setup i'm hoping to run and I couldn't get their machines started because there's no mechanism to specify a model in the XML!

Re: [Libvir] e1000 - Specifying model in XML Configs

2008-04-08 Thread Henri Cook
There's nothing in brctl show for virbr0 - br0 still exists but that's in use (And shouldn't be causing the problem?) Maybe it's a one off - i'll try to recreate It could be a patch, maybe, I think bits of it are really bad C (i.e. hackery at its worst) - i'll make sure it works then see if i can

Re: [Libvir] e1000 - Specifying model in XML Configs

2008-04-08 Thread Richard W.M. Jones
On Tue, Apr 08, 2008 at 10:19:02AM +0100, Henri Cook wrote: > I've made a hack for this in the meantime that adds the You have a patch? > Is there a way to fix this without rebooting? ifconfig virbr0 0.0.0.0 > down && brctl delbr virbr0 - doesn't seem to be enough, what did I miss? This should

Re: [Libvir] [PATCH] Add xen and hvm guest types to test drive caps

2008-04-08 Thread Daniel Veillard
On Fri, Apr 04, 2008 at 10:47:08AM -0400, Cole Robinson wrote: > Daniel P. Berrange wrote: > > On Tue, Mar 04, 2008 at 04:17:34PM -0500, Cole Robinson wrote: > >> The attached patch adds xen and hvm guest types to the test driver's > >> capabilities. It was currently set to offer only a 'linux' ty

Re: [Libvir] e1000 - Specifying model in XML Configs

2008-04-08 Thread Henri Cook
I've made a hack for this in the meantime that adds the option to the section and allows me to pass in any string for addition - since I really wanted this functionality. Obviously this means i'm now compiling my Ubuntu package from source which isn't ideal, it'll probably get overwritten by apt

Re: [Libvir] e1000 - Specifying model in XML Configs

2008-04-08 Thread Richard W.M. Jones
On Tue, Apr 08, 2008 at 04:45:23AM -0400, Daniel Veillard wrote: > Then what happen if you pass a wrong string ? Is there any way to get a > meaningful error back from qemu and report it. Thet would IMHO be quite > better than tracking the evolution of the emulation in QEmu, plus the > added benefi

Re: [Libvir] e1000 - Specifying model in XML Configs

2008-04-08 Thread Daniel Veillard
On Tue, Apr 08, 2008 at 09:05:41AM +0100, Richard W.M. Jones wrote: > On Mon, Apr 07, 2008 at 10:51:56PM +0100, Henri Cook wrote: > > I just tried to port a few customers over to this libvirt setup i'm > > hoping to run and I couldn't get their machines started because there's > > no mechanism to s

Re: [Libvir] e1000 - Specifying model in XML Configs

2008-04-08 Thread Richard W.M. Jones
On Mon, Apr 07, 2008 at 10:51:56PM +0100, Henri Cook wrote: > I just tried to port a few customers over to this libvirt setup i'm > hoping to run and I couldn't get their machines started because there's > no mechanism to specify a model in the XML! > > I know redhat have changed KVM's default dri

Re: [Libvir] Wiki Pages?

2008-04-08 Thread Daniel Veillard
On Mon, Apr 07, 2008 at 09:14:03PM +0100, Daniel P. Berrange wrote: > On Mon, Apr 07, 2008 at 03:35:51PM -0400, Daniel Veillard wrote: > > Well if you have maintainance experience, why not ... except libvirt.org > > is a RHEL-4 box, i.e. not the easiest for bleeding edge stuff. > > if you feel this