[Libvir] python/libvir.c returning wrong value on error?

2008-02-06 Thread Cole Robinson
Hi all, Looking at python/libvir.c, all the custom functions return VIR_PY_NONE on error. This unfortunately doesn't map well to some of the generated python bindings which expect an error val of -1. So if these commands fail, no exception will be thrown at the python level. (Ex.

Re: [Libvir] python/libvir.c returning wrong value on error?

2008-02-06 Thread Cole Robinson
Daniel P. Berrange wrote: On Wed, Feb 06, 2008 at 03:18:13PM -0500, Cole Robinson wrote: Hi all, Looking at python/libvir.c, all the custom functions return VIR_PY_NONE on error. This unfortunately doesn't map well to some of the generated python bindings which expect an error val of -1. So

[Libvir] [PATCH] Use virErrorMsg in qemudReportError

2008-02-20 Thread Cole Robinson
Currently the qemu driver doesn't use virErrorMsg when raising error messages. This causes some errors to appear as libvir: QEMU error: if a custom string wasn't raised, which isn't all that useful. The patch below fixes this. Thanks, Cole diff --git a/src/qemu_conf.c b/src/qemu_conf.c index

Re: [Libvir] [PATCH] Use virErrorMsg in qemudReportError

2008-02-27 Thread Cole Robinson
Daniel P. Berrange wrote: On Wed, Feb 20, 2008 at 12:28:23PM -0500, Cole Robinson wrote: Currently the qemu driver doesn't use virErrorMsg when raising error messages. This causes some errors to appear as libvir: QEMU error: if a custom string wasn't raised, which isn't all that useful

[Libvir] [PATCH] Fix capabilities xml for topology info

2008-03-03 Thread Cole Robinson
The patch below fixes the capabilities xml generated for the hosts topology info. This was causing virt-install to barf when using the test driver (see attached capabilities xml from before this patch). Thanks, Cole diff --git a/src/capabilities.c b/src/capabilities.c index bedd445..01bb308

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

2008-03-04 Thread Cole Robinson
The attached patch adds xen and hvm guest types to the test driver's capabilities. It was currently set to offer only a 'linux' type which doesn't seem to follow the conventions of the other drivers, so I removed that. Please yell if I'm wrong :) Thanks, Cole diff --git a/src/test.c b/src/test.c

[Libvir] [PATCH] Have xen fv acknowledge boot tag

2008-03-05 Thread Cole Robinson
https://bugzilla.redhat.com/show_bug.cgi?id=428868 Defining a xen fullvirt guest with a boot dev={hd,cdrom,etc.} tag currently ignores this tag and forces in a kernel tag. Dan pointed out the fix in the bz, which I verified does the trick. Patch attached. Thanks, Cole diff --git

Re: [Libvir] [PATCH] Have xen fv acknowledge boot tag

2008-03-06 Thread Cole Robinson
Daniel Veillard wrote: On Wed, Mar 05, 2008 at 05:26:47PM -0500, Cole Robinson wrote: https://bugzilla.redhat.com/show_bug.cgi?id=428868 Defining a xen fullvirt guest with a boot dev={hd,cdrom,etc.} tag currently ignores this tag and forces in a kernel tag. Dan pointed out the fix in the bz

[Libvir] [PATCH] Fix cdrom connect/disconnect for qemu

2008-03-12 Thread Cole Robinson
The attached patch fixes cdrom changing for a live qemu guest. There were a few issues preventing it from working: 1) It didn't anticipate no source block in the xml. 2) No support for ejecting the media 3) Small bug which prevented the running guest xml from being updated. I've tested this via

[Libvir] [PATCH] Implement memory operations for qemu driver

2008-03-17 Thread Cole Robinson
The attached patch implements the following operations for the qemu driver: virDomainGetMaxMemory virDomainSetMaxMemory virDomainSetMemory A few questions/comments: 1) I changed maxmem and memory in the qemu_vm_def struct to unsigned long to match the public api for memory values. Seems to

Re: [Libvir] [PATCH] Implement memory operations for qemu driver

2008-03-18 Thread Cole Robinson
Richard W.M. Jones wrote: 2) Should SetMaxMem be able to be called on a running guest? This code allows it, since maxmem is basically a metavalue that doesn't directly affect a guest. 3) Should maxmem be able to be set lower than the currently allocated mem? This code does not

Re: [Libvir] [PATCH] Implement memory operations for qemu driver

2008-03-18 Thread Cole Robinson
Jim Meyering wrote: Cole Robinson [EMAIL PROTECTED] wrote: The attached patch implements the following operations for the qemu driver: ... +qemudReportError(dom-conn, dom, NULL, VIR_ERR_INVALID_DOMAIN, + no domain with matching uuid '%s', dom-uuid

Re: [Libvir] [PATCH] Implement memory operations for qemu driver

2008-03-18 Thread Cole Robinson
Cole Robinson wrote: The attached patch implements the following operations for the qemu driver: virDomainGetMaxMemory virDomainSetMaxMemory virDomainSetMemory A few questions/comments: 1) I changed maxmem and memory in the qemu_vm_def struct to unsigned long to match the public

[Libvir] [PATCH] Add virNodeGetCellsFreeMemory support to test driver

2008-04-03 Thread Cole Robinson
The attached patch adds support for the command virNodeGetCellsFreeMemory to the test driver. The patch also moves numa cell information into the connection structure rather than hard coding it in GetCapabilities, so the memory values have some place to be stored, and so the driver can be expanded

Re: [Libvir] [PATCH][RFC] libvirt ldoms support

2008-04-10 Thread Cole Robinson
John Levon wrote: (I know I've whined before but it would be awfully nice to have some-one step up and update the schema: then it would be possible to insist all such changes update the schema too.) Yes, but that doesn't excuse developing these extensions in private and then just dumping them

Re: [Libvir] [PATCH][RFC] libvirt ldoms support

2008-04-10 Thread Cole Robinson
John Levon wrote: On Thu, Apr 10, 2008 at 04:19:47PM -0400, Cole Robinson wrote: That's hardly fair. There's a big 'RFC' in the subject and Ryan explicitly said they weren't ready. Eunice has been responding to all your comments. Who's been talking of final solutions? To quote Eunice: I

[Libvir] [PATCH] sound support for qemu and xen

2008-04-21 Thread Cole Robinson
The patch below adds xml support for the soundhw option to qemu and xen. The new xml element takes the form: sound driver='drivername'/ Where driver name can be pcspk, sb16, es1370, or all. Everything seems to be in working order but I have a few implementation questions: 1) Should multiple

Re: [Libvir] [PATCH] sound support for qemu and xen

2008-04-21 Thread Cole Robinson
Daniel P. Berrange wrote: On Mon, Apr 21, 2008 at 01:02:35PM -0400, Cole Robinson wrote: The patch below adds xml support for the soundhw option to qemu and xen. The new xml element takes the form: sound driver='drivername'/ Where driver name can be pcspk, sb16, es1370, or all. I'd like

Re: [Libvir] [PATCH] sound support for qemu and xen

2008-04-22 Thread Cole Robinson
Jerone Young wrote: I was actually thinking about doing this very patch :-) . Are you going to also enable virt-manager to make use of it ? Since it's just good old qemu it will be great for local KVM use. Yeah, I'll probably start adding support for this in virt-install and virt-manager once

Re: [Libvir] [PATCH] sound support for qemu and xen

2008-04-28 Thread Cole Robinson
Cole Robinson wrote: The patch below adds xml support for the soundhw option to qemu and xen. The new xml element takes the form: Here is the updated patch. Took a bit more work to take into account the multiple models, building and parsing the xen soundhw string, checking for duplicates, etc

[Libvir] [PATCH] Implement SetVcpus and DomainGetMaxVcpus for qemu

2008-04-28 Thread Cole Robinson
The attached patch fills in two of the vcpu functions for the qemu driver: virDomainSetVcpus : set the number of vcpus the domain can use virDomainGetMaxVcpus : max number of vcpus that can be assigned to the domain. Code change is only in qemu_driver, as the backend stuff was already in place.

[libvirt] Re: [Libvir] [PATCH] Implement SetVcpus and DomainGetMaxVcpus for qemu

2008-05-07 Thread Cole Robinson
Daniel P. Berrange wrote: /* XXX future KVM will support SMP. Need to probe kernel to figure out KVM module version i guess */ -if (!strcmp(type, kvm)) +if (!strcasecmp(type, kvm)) return 1; This comment is seriously out of date - KVM supports 16 (or was is

[libvirt] [PATCH] Implement autostart commands for xen

2008-05-07 Thread Cole Robinson
The attached patch implements the domain autostart commands for xen. The xen sexpr (since at least 3.0.4 = 1.5 years) has a on_xend_start field which can be used to autostart a domain. A couple things: 1) This works on a running guest, but will only show the sexpr changes after the guest is

[libvirt] [PATCH] Fix PolicyKit.conf example docs

2008-05-07 Thread Cole Robinson
The current docs showing a possible PolicyKit.conf with the example: match action=org.libvirt.unix.manage user=fred return result=yes/ /match With PolicyKit-0.6-2.fc8, polkit-config-file-validate complains about this format. 'man PolicyKit.conf' gives a similar example with the format:

Re: [libvirt] [PATCH] Implement autostart commands for xen

2008-05-08 Thread Cole Robinson
Cole Robinson wrote: The attached patch implements the domain autostart commands for xen. The xen sexpr (since at least 3.0.4 = 1.5 years) has a on_xend_start field which can be used to autostart a domain. Updated patch with fixes Dan recommended. Thanks, Cole diff --git a/src

Re: [libvirt] PATCH: Fix KVM maximum vCPU count

2008-05-13 Thread Cole Robinson
Daniel P. Berrange wrote: On Tue, May 13, 2008 at 01:29:35PM +0900, Atsushi SAKAI wrote: Hi, Dan I think the qemu_driver should check KVM_API_VERSION for SMP support. How do you think? I am worrying about MAX_VCPUS=16 changes to 32 in future. If it increases to 32, then we should

Re: [libvirt] PATCH: Fix KVM maximum vCPU count

2008-05-14 Thread Cole Robinson
Daniel P. Berrange wrote: On Wed, May 14, 2008 at 11:23:08AM +0900, Atsushi SAKAI wrote: Hi, Dan Thank you for commenting. Of course, I agree your point and that you are commiting it. I am commenting it just because 2 month is not old ago in my feeling. Here Is the memo for my

[libvirt] [PATCH] Extract kvm version from qemu-kvm

2008-05-15 Thread Cole Robinson
The patch below provides a way to check the kvm version by parsing the output of qemu-kvm, similar to how the qemu version is parsed. The qemu-kvm binary help info starts with the line: QEMU PC emulator version major.minor.micro (KVM-ver) The patch is kind of ugly, with renamed functions and

[libvirt] [PATCH] Free object after *Destroy in python bindings

2008-05-16 Thread Cole Robinson
The patch below fixes an issue in the python bindings with the vir*Destroy methods. After the object is successfully destroyed, the payload is cleared, using 'self._o = None'. This unfortunately screws up virt object reference counts, as the payload should be free'd using the appropriate vir*Free

Re: [libvirt] PATCH: Support initial boot time CPU affinity mask

2008-05-16 Thread Cole Robinson
Stefan de Konink wrote: On Fri, 16 May 2008, Daniel P. Berrange wrote: The XML format allows for an initial CPU mask to be specified for a guests vCPUs. eg with this XML: vcpu cpuset='1-4,8-20,525'1/vcpu Since we have CPU pinning support from my previous patch, adding in the initial

Re: [libvirt] [PATCH] Free object after *Destroy in python bindings

2008-05-19 Thread Cole Robinson
Cole Robinson wrote: The patch below fixes an issue in the python bindings with the vir*Destroy methods. After the object is successfully destroyed, the payload is cleared, using 'self._o = None'. This unfortunately screws up virt object reference counts, as the payload should be free'd

Re: [libvirt] [PATCH] Free object after *Destroy in python bindings

2008-05-19 Thread Cole Robinson
Daniel P. Berrange wrote: On Mon, May 19, 2008 at 04:21:55PM -0400, Cole Robinson wrote: Cole Robinson wrote: The patch below fixes an issue in the python bindings with the vir*Destroy methods. After the object is successfully destroyed, the payload is cleared, using 'self._o = None

[libvirt] [PATCH] Domain/Net object cleanups after remote error

2008-05-19 Thread Cole Robinson
Domain and Net objects were not being cleaned up properly when reporting errors from the remote driver. Attached patch fixes this. Thanks, Cole diff --git a/src/remote_internal.c b/src/remote_internal.c index 51e8eb7..80f6ce6 100644 --- a/src/remote_internal.c +++ b/src/remote_internal.c @@

Re: [libvirt] [PATCH] Domain/Net object cleanups after remote error

2008-05-19 Thread Cole Robinson
Cole Robinson wrote: Domain and Net objects were not being cleaned up properly when reporting errors from the remote driver. Attached patch fixes this. Stupid typo. Correct patch attached. - Cole diff --git a/src/remote_internal.c b/src/remote_internal.c index 51e8eb7..80f6ce6 100644

Re: [libvirt] [PATCH] Free object after *Destroy in python bindings

2008-05-19 Thread Cole Robinson
Daniel P. Berrange wrote: On Mon, May 19, 2008 at 04:21:55PM -0400, Cole Robinson wrote: Cole Robinson wrote: The patch below fixes an issue in the python bindings with the vir*Destroy methods. After the object is successfully destroyed, the payload is cleared, using 'self._o = None

Re: [libvirt] [PATCH] Domain/Net object cleanups after remote error

2008-05-20 Thread Cole Robinson
Daniel P. Berrange wrote: On Tue, May 20, 2008 at 10:44:52AM +0100, Richard W.M. Jones wrote: On Mon, May 19, 2008 at 04:58:38PM -0400, Cole Robinson wrote: diff --git a/src/remote_internal.c b/src/remote_internal.c index 51e8eb7..80f6ce6 100644 --- a/src/remote_internal.c +++ b/src

Re: [libvirt] autostarting xend domains

2008-05-20 Thread Cole Robinson
Wolfgang Rosenauer wrote: Hi, I found that support for setting autostart parameters for xend managed guests has been added to libvirt (https://www.redhat.com/archives/libvir-list/2008-May/msg00060.html) So I tried that but failed with virsh's autostart command (and also virt-manager)

Re: [libvirt] [PATCH] Domain/Net object cleanups after remote error

2008-05-20 Thread Cole Robinson
Richard W.M. Jones wrote: On Tue, May 20, 2008 at 09:57:02AM -0400, Cole Robinson wrote: I'll try this again from the original unpatched state and try to figure out exactly what was happening. Do you trigger an error at any point in the testing? You could try doing that (eg. try migrating

Re: [libvirt] [PATCH] Fix destroy command memory leaks

2008-05-20 Thread Cole Robinson
Cole Robinson wrote: Some pieces of libvirt currently assume that the vir*Destroy functions will free the passed object upon success. In practice none of the current drivers seem to do this, resulting in memory leaks. The attached patch fixes the leaks I could find, as well as changes

Re: [libvirt] [PATCH] Free object after *Destroy in python bindings

2008-05-20 Thread Cole Robinson
Daniel P. Berrange wrote: On Mon, May 19, 2008 at 05:17:07PM -0400, Cole Robinson wrote: Daniel P. Berrange wrote: On Mon, May 19, 2008 at 04:21:55PM -0400, Cole Robinson wrote: Cole Robinson wrote: The patch below fixes an issue in the python bindings with the vir*Destroy methods. After

Re: [libvirt] [PATCH] kvm 32bit guest on 64bit host

2008-06-03 Thread Cole Robinson
Gerd v. Egidy wrote: Hi Dan, Thanks for looking at my patch. I understand that KVM does not offer a i686 host cpu but allows x86_64 and i686 guests. The reason for my patch was that I could not create i686 guests on a x86_64 host with KVM, the only option offered was using qemu. Yes you

[libvirt] [PATCH] Fix UUIDString for python bindings

2008-06-05 Thread Cole Robinson
The attached patch fixes a few issues in the python bindings. First, UUIDString has, to my understanding, never worked. It expected to be passed a buffer to fill with the uuid, which through my tests isn't realistically doable from python. I added custom bindings to fix this, and it now works as

Re: [libvirt] what is the net model syntax

2008-06-09 Thread Cole Robinson
Farkas Levente wrote: hi, how can i define the emulated network card model in libvirt's xml config files? i can't find it in the docs. thanks. You can see an example of the model syntax in the test xml files used by libvirt:

[libvirt] [PATCH] Fix enabling storage driver

2008-06-09 Thread Cole Robinson
As of a couple weeks ago, the storage driver is only registered if the WITH_LIBVIRTD macro is defined. The configure option --with-libvirtd actually wasn't defining this macro. The attached patch fixes this. Thanks, Cole diff --git a/configure.in b/configure.in index 47633b0..64c6013 100644 ---

Re: [libvirt] Release?

2008-06-10 Thread Cole Robinson
Daniel Veillard wrote: On Tue, Jun 10, 2008 at 12:40:50PM +0100, Richard W.M. Jones wrote: So is it time for a release? Yes, I guess it makes sense :-) I will try to push a new release before the end of the week. Do we have patches pending which should be incorporated before ? I yes

Re: [libvirt] Release?

2008-06-10 Thread Cole Robinson
Daniel Veillard wrote: On Tue, Jun 10, 2008 at 10:45:56AM -0400, Cole Robinson wrote: Daniel Veillard wrote: On Tue, Jun 10, 2008 at 12:40:50PM +0100, Richard W.M. Jones wrote: So is it time for a release? Yes, I guess it makes sense :-) I will try to push a new release before the end

[libvirt] [PATCH] Fix storage pool autostart python binding

2008-06-10 Thread Cole Robinson
The attached patch fixes a few issues with the storage api python bindings. The pool GetAutostart is now generated as intended. Also the libvirtError class now accepts the pool or vol object passed to it when a command fails. Thanks, Cole diff --git a/python/libvir.py b/python/libvir.py index

Re: [libvirt] PATCH: Generic internal API for domain XML parser/formatter

2008-06-26 Thread Cole Robinson
Daniel P. Berrange wrote: Given an XML document describing a network, parses the doc and generates a virDomainDefPtr to represent it in memory. This is a little more advanced than the network parser because the various hypervisor drivers have slightly varying capabilities. So we pass a

[libvirt] [PATCH] Fix pool-create for netfs format 'auto'

2008-07-16 Thread Cole Robinson
Trying to pool-create a netfs pool with the format type 'auto' (as in, to autodetect the format) runs the command mount -t auto munged-source-path '-t auto' seems to do its job for regular file systems, but actually fails with nfs or cifs (I assume anything that required an external mount

Re: [libvirt] some unsorted questions

2008-07-17 Thread Cole Robinson
Daniel P. Berrange wrote: On Thu, Jul 17, 2008 at 01:29:45AM +0200, Stefan de Konink wrote: If this gets implemented I would suggest a call that fetches all domains from a running system and not only the defined or only the active ones. This is a good idea regardless. The current APIs

Re: [libvirt] default networking issues

2008-07-30 Thread Cole Robinson
Bryan Kearney wrote: Need some help about where to look next. I am running a Fedora 9 machine, up to date on the releaed rpms. SELinux is permissive, iptables is stopped. I have followed the instructions for NAT forwarding [1]. When I launch a guest in virt manager it uses the default

Re: [libvirt] When are volumes 'detected' / refreshed

2008-08-03 Thread Cole Robinson
Stefan de Konink wrote: At what time are volumes currently detected on NetFS? I see there is some sort of storage now going on, since deleting files from NFS doesn't delete them from vol-list directly. (If this is fixed in a recent version... I'm sorry to bother) I haven't scoured the

[libvirt] [PATCH] Install default storage pool

2008-08-06 Thread Cole Robinson
The attached patch adds a default pool definition to install with libvirt. The pool is a directory pool, hardcoded to use /var/lib/libvirt/images, though this is replaced with %{_localstatedir}/lib/libvirt/images if installing via rpm. Since /var/lib/libvirt/images may not exist if installing

Re: [libvirt] Qemu Monitor

2008-08-10 Thread Cole Robinson
Listen wrote: Hi all, A simple question, I hope ;) Is it possible to enable the qemu monitor in libvirt's xml? It need the monitor, to dynamically add a usb device to a windows vm. Regards, Eric -- Libvir-list mailing list Libvir-list@redhat.com

[libvirt] [PATCH] Change disk type 'dos' to 'msdos'

2008-08-10 Thread Cole Robinson
parted doesn't seem to want the label 'dos', instead wanting 'msdos'. Patch is basically s/dos/msdos/ Thanks, Cole diff --git a/docs/storage.html.in b/docs/storage.html.in index 40e8e80..8cab480 100644 --- a/docs/storage.html.in +++ b/docs/storage.html.in @@ -258,7 +258,7 @@ libvirt. /p

[libvirt] [PATCH] Ensure parted doesn't prompt if labeling disk

2008-08-10 Thread Cole Robinson
Trying to 'build' a disk pool uses 'parted mklabel' which can prompt for confirmation. Patch adds the '--script' option to remove the chance of this happening. Thanks, Cole diff --git a/src/storage_backend_disk.c b/src/storage_backend_disk.c index d6548eb..39b857c 100644 ---

Re: [libvirt] [PATCH] Ensure parted doesn't prompt if labeling disk

2008-08-11 Thread Cole Robinson
Daniel P. Berrange wrote: On Sun, Aug 10, 2008 at 10:40:30PM -0400, Cole Robinson wrote: Trying to 'build' a disk pool uses 'parted mklabel' which can prompt for confirmation. Patch adds the '--script' option to remove the chance of this happening. Can you double-check this works on RHEL-5

Re: [libvirt] [PATCH] Change disk type 'dos' to 'msdos'

2008-08-11 Thread Cole Robinson
Jim Meyering wrote: Cole Robinson [EMAIL PROTECTED] wrote: parted doesn't seem to want the label 'dos', instead wanting 'msdos'. Patch is basically s/dos/msdos/ Hi Cole, This definitely needs to be fixed. FYI, dos appears to be the preferred name for that partition table type (google

[libvirt] [PATCH] Implement vol delete for disk pools

2008-08-11 Thread Cole Robinson
The patch below implements virStorageVolDelete for volumes on a disk pool. The only interesting thing here is that parted wants a partition number to delete, so we need to peel off the end of the volume's target path which will be of the form '/dev/sda1' or similar (I assume. If not, it's still

[libvirt] [PATCH] Fix python error reporting for some storage operations

2008-08-11 Thread Cole Robinson
In the python bindings, all vir* classes expect to be passed a virConnect object when instantiated. Before the storage stuff, these classes were only instantiated in virConnect methods, so the generator is hardcoded to pass 'self' as the connection instance to these classes. Problem is there are

Re: [libvirt] [PATCH] Implement vol delete for disk pools

2008-08-12 Thread Cole Robinson
Daniel P. Berrange wrote: On Mon, Aug 11, 2008 at 03:58:41PM -0400, Cole Robinson wrote: The patch below implements virStorageVolDelete for volumes on a disk pool. The only interesting thing here is that parted wants a partition number to delete, so we need to peel off the end

Re: [libvirt] [PATCH] Change disk type 'dos' to 'msdos'

2008-08-12 Thread Cole Robinson
Daniel Veillard wrote: On Tue, Aug 12, 2008 at 11:12:07AM +0100, Daniel P. Berrange wrote: On Mon, Aug 11, 2008 at 10:01:16AM -0400, Cole Robinson wrote: Jim Meyering wrote: Cole Robinson [EMAIL PROTECTED] wrote: parted doesn't seem to want the label 'dos', instead

[libvirt] [PATCH] Fix size reporting for disk pools without partitions

2008-08-12 Thread Cole Robinson
The attached patch updates parthelper to print size information for a disk device if it doesn't have any allocated partitions. The current code starts by requesting the first partition, then iterating from there. But if there is no first partition, that whole info reporting thing never happens :)

[libvirt] [PATCH] Ignore specified target path when creating logical vol

2008-08-12 Thread Cole Robinson
Specifying a target path when creating a storage volume has no effect, since volumes only really use the pool's target path and 'name' field to establish the volume's target. Logical volumes expect a target path to be passed, and it can only cause problems. The attached patch erases the passed

Re: [libvirt] PATCH: 1/5: Improved error reporting

2008-08-13 Thread Cole Robinson
Daniel P. Berrange wrote: There are several system calls in the virExec function for which we don't or can't report errors. This patch does a couple of things to improve the situation. It moves the code for setting non-block/close-exec to before the fork() so we can report errors for it. It

Re: [libvirt] Re: virsh/virt-install for dummies

2008-08-19 Thread Cole Robinson
Jun Koi wrote: On Tue, Aug 19, 2008 at 12:00 PM, Cole Robinson [EMAIL PROTECTED] wrote: Jun Koi wrote: On Mon, Aug 18, 2008 at 9:59 PM, Cole Robinson [EMAIL PROTECTED] wrote: Yes, virsh works well: it returns few pages of xml data. However, virt-install still has problem like below

Re: [libvirt] Use existing QEMU image with libvirt?

2008-08-19 Thread Cole Robinson
Jun Koi wrote: Hi, I have some existing QEMU images. Now I want to use it with libvirt/virsh. Is there any easy way to do that? I suppose that we need an XML file for each image, but dont want to craft them from scratch. Thanks, Jun There isn't really an official way to do this,

Re: [libvirt] networking

2008-08-20 Thread Cole Robinson
James Bardin wrote: Hello, I'm having trouble digging up some documentation on libvirt's network config. I'm not sure where to set this up, but I have a bridged device br0 that I would like to have available in virt-manager/virsh. Right now, I can edit the VM's xml interface element

Re: [libvirt] networking

2008-08-20 Thread Cole Robinson
James Bardin wrote: Cole Robinson wrote: Make sure hald (or some equivalently named service) is running. Bar that, you'll probably have to ask the ubuntu folks. It's running. I'll see if I can figure out where this went wrong. Does this apply to virsh as well? Thanks -jim

[libvirt] [PATCH] Don't list capabilities entries if emulators can't be accessed

2008-08-20 Thread Cole Robinson
The patch below fixes capabilities xml generation for the qemu driver if the emulators aren't found in the hardcoded paths. Current behavior will add a guest entry for the emulator even if it does not exist, patch fixes this to check that we actually have access. This brings up another issue,

[libvirt] [PATCH] Add success output to virsh attach/detach commands

2008-08-21 Thread Cole Robinson
The virsh attach-* and detach-* commands don't say anything if the operation succeeds, which doesn't seem very polite. The attached adds some simple feedback. Thanks, Cole commit eda28c5de3d367d001ca89ffc969fcc3c0185abb Author: Cole Robinson [EMAIL PROTECTED] Date: Thu Aug 21 17:59:13 2008

[libvirt] [PATCH] Set correct device type when parsing input devices

2008-08-21 Thread Cole Robinson
In virDomainDeviceDefParse, parsing an input device was actually setting it's type as DEVICE_DISK. The attached patch fixes this. Thanks, Cole commit 75150ac2536c427f74875fc563abf2fc06595dda Author: Cole Robinson [EMAIL PROTECTED] Date: Thu Aug 21 13:27:38 2008 -0400 Fix setting input

[libvirt] [PATCH] Check disk target collision when parsing domain xml

2008-08-21 Thread Cole Robinson
The current domain xml parsing doesn't check if disks are specified with duplicate targets (hda etc.). The attached patch adds a check for this. Thanks, Cole commit 27df1653474738a2ce83c89e7bdb2c4f7327f9b6 Author: Cole Robinson [EMAIL PROTECTED] Date: Thu Aug 21 14:58:04 2008 -0400 Check

[libvirt] [PATCH] Fix cd eject segfault

2008-08-21 Thread Cole Robinson
The cdrom eject code was trying to dereference the NULL source of an empty cdrom. Attached patch fixes this. Thanks, Cole commit 5925689b5b94b29a520dcfbc7f4f1cfa0a0a0183 Author: Cole Robinson [EMAIL PROTECTED] Date: Thu Aug 21 17:56:25 2008 -0400 Prevent cdrom eject from segfaulting when

[libvirt] [PATCH] Update domain xml after usb hotplug

2008-08-21 Thread Cole Robinson
The recently added usb hostdev and mass storage device hotplug code doesn't append the devices to the running guests xml if the hotplug succeeds. The attached patch fixes this. Thanks, Cole commit 8df17db8b36a2c1e8efa430a0493f66825b6b80e Author: Cole (Work Acct) [EMAIL PROTECTED] Date: Thu Aug

Re: [libvirt] [PATCH] Add success output to virsh attach/detach commands

2008-08-22 Thread Cole Robinson
Daniel P. Berrange wrote: On Fri, Aug 22, 2008 at 09:26:13AM +0100, Richard W.M. Jones wrote: On Thu, Aug 21, 2008 at 11:19:29PM -0400, Cole Robinson wrote: The virsh attach-* and detach-* commands don't say anything if the operation succeeds, which doesn't seem very polite

[libvirt] [PATCH] xen: fix domain lookup after define

2008-08-27 Thread Cole Robinson
Defining a xen domain will succeed, but report error because we weren't properly passing the domain's name to the post-define lookup. Attached patch fixes this, and also adds a debug statement to show the sexpr we create from the passed xml. Thanks, Cole diff --git a/src/xend_internal.c

Re: [libvirt] [PATCH] Fix ejecting cdroms with latest qemu syntax

2008-08-29 Thread Cole Robinson
Jim Meyering wrote: Cole Robinson [EMAIL PROTECTED] wrote: ... Okay, second cut attached. I followed your recommendations: ... With all of Dan's comments addressed, this should be fine. diff --git a/src/domain_conf.c b/src/domain_conf.c ... +int virDiskNameToBusDeviceIndex

Re: [libvirt] [PATCH] Attempt to detect cdrom change failures

2008-09-03 Thread Cole Robinson
Cole Robinson wrote: If a 'change' or 'eject' qemu monitor command fails, an error message is printed to the monitor of the form device {not found, is locked, is not removable}. This is really the only indication we have that the command errored out, so scrape the monitor reply for \ndevice

Re: [libvirt] [PATCH] Fix vnc port determining for xend

2008-09-04 Thread Cole Robinson
Daniel P. Berrange wrote: On Thu, Sep 04, 2008 at 07:51:51AM +0200, Daniel Veillard wrote: On Thu, Aug 28, 2008 at 04:48:06PM -0400, Cole Robinson wrote: Current libvirt checks xenstore for a xen guests fixed vnc port on xend 3.0.3. At least on f8 though, hvm guests don't store

Re: [libvirt] [PATCH] Fix vnc port determining for xend

2008-09-04 Thread Cole Robinson
Cole Robinson wrote: Current libvirt checks xenstore for a xen guests fixed vnc port on xend 3.0.3. At least on f8 though, hvm guests don't store the vnc port in xenstore, it is stored in the sexpr. Patch fixes the logic to look in the sexpr if the xenstore lookup appears to fail

Re: [libvirt] [PATCH] kvm: maxVCPU runtime detection

2008-09-05 Thread Cole Robinson
Guido Günther wrote: Guido Günther wrote: Hi, On Fri, Aug 22, 2008 at 02:27:58PM +0100, Daniel P. Berrange wrote: On Fri, Aug 22, 2008 at 03:16:42PM +0200, Guido G?nther wrote: Hi, with recent linux kernels we can detect the maximum number of virtual cpus at runtime via an ioctl. Possible

[libvirt] [PATCH] Determine kvm max vcpus via version number

2008-09-05 Thread Cole Robinson
The attached patch is a slimmed down version of a patch I posted a while back. This expands qemu help message parsing to look for a kvm version number, which can be used to determine maximum supported vcpus. A kvmVersion field is added to the qemu_driver structure, and a check to determine the

Re: [libvirt] [PATCH] Implement vol delete for disk pools

2008-09-05 Thread Cole Robinson
Daniel P. Berrange wrote: On Tue, Aug 12, 2008 at 11:58:07PM -0400, Cole Robinson wrote: Daniel P. Berrange wrote: This isn't correct because the target path is not guarenteed to point to the master device name /dev/sda1. The user could have configured it to use a stable path

Re: [libvirt] domain type kvm error

2008-09-07 Thread Cole Robinson
Rakotomandimby Mihamina wrote: Hi all, I use ubuntu hardy but I dont think the problem is specific to the distribution I use. I installed KVM and libvirt as described here: https://help.ubuntu.com/community/KVM Following that method, created a domain, which dumps like this: domain

Re: [libvirt][solved] domain type kvm error

2008-09-07 Thread Cole Robinson
Rakotomandimby Mihamina wrote: Cole Robinson wrote: I use ubuntu hardy but I dont think the problem is specific to the distribution I use. I installed KVM and libvirt as described here: https://help.ubuntu.com/community/KVM Following that method, created a domain, which dumps like

Re: [libvirt] domain type kvm error

2008-09-07 Thread Cole Robinson
Rakotomandimby Mihamina wrote: Cole Robinson wrote: You can't just change the domain type, you also have to change the emulator tag. My guess is, this new 'kvm' command is still using the plain qemu emulator and not '/usr/bin/kvm' Given that, how will I choose if I want to launch a 32bit

[libvirt] [PATCH] Fix segfault if no qemu emulator passed

2008-09-08 Thread Cole Robinson
There is unfortunately a pretty prevalent segfault in the latest libvirt. If a qemu domain is defined without an emulator specified, libvirtd crashes. This is doubly unfortunate since current virtinst generates an emulator-less config for all qemu and kvm guests (I'm about to fix this upstream

Re: [libvirt] [PATCH] Fix segfault if no qemu emulator passed

2008-09-09 Thread Cole Robinson
Daniel P. Berrange wrote: On Mon, Sep 08, 2008 at 11:10:17PM -0400, Cole Robinson wrote: There is unfortunately a pretty prevalent segfault in the latest libvirt. If a qemu domain is defined without an emulator specified, libvirtd crashes. This is doubly unfortunate since current virtinst

[libvirt] ANNOUNCE: New release virt-manager 0.6.0

2008-09-10 Thread Cole Robinson
I'm happy to announce a new virt-manager release, version 0.6.0. The release can be downloaded from: http://virt-manager.org/download.html The direct download link is: http://virt-manager.org/download/sources/virt-manager/virt-manager-0.6.0.tar.gz This release includes: - Remote storage

Re: [libvirt] [PATCH] kvm: maxVCPU runtime detection

2008-09-17 Thread Cole Robinson
Richard W.M. Jones wrote: On Wed, Sep 17, 2008 at 01:38:49PM +0200, Guido Günther wrote: On Fri, Aug 22, 2008 at 03:16:42PM +0200, Guido Günther wrote: Hi, with recent linux kernels we can detect the maximum number of virtual cpus at runtime via an ioctl. Possible patch attached. It does this

Re: [libvirt] [PATCH] Determine kvm max vcpus via version number

2008-09-17 Thread Cole Robinson
Daniel Veillard wrote: On Fri, Sep 05, 2008 at 12:25:16PM -0400, Cole Robinson wrote: The attached patch is a slimmed down version of a patch I posted a while back. This expands qemu help message parsing to look for a kvm version number, which can be used to determine maximum supported vcpus

[libvirt] [PATCH] Don't remove devel files in spec

2008-09-17 Thread Cole Robinson
The second iteration of the spec file enhancements didn't fully remove some pieces that were dependent on the devel package switch. The attached patch fixes 'make rpm' to work again. Thanks, Cole diff --git a/libvirt.spec.in b/libvirt.spec.in index cc5aca5..954ea77 100644 --- a/libvirt.spec.in

[libvirt] [PATCH] Sanitize qemu monitor reads

2008-09-23 Thread Cole Robinson
Reading from the qemu monitor pulls in a whole bunch of useless control characters. For example, sending the command 'somecomm' to the monitor returns: somecomm unknown command: 'somecomm' (qemu) Which is 36 characters, however we end up reading over 200. The amount we read actually grows

Re: [libvirt] [PATCH] Sanitize qemu monitor reads

2008-09-24 Thread Cole Robinson
Richard W.M. Jones wrote: It looks to me like tmpbuf is leaked on the two error paths. garbage.collection++ Rich. ah foo, sorry about that. Fixed version attached. Thanks, Cole diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 9d8f75a..b7c8e70 100644 --- a/src/qemu_driver.c +++

Re: [libvirt] [PATCH] Fix 1 char device for qemu VM

2008-09-29 Thread Cole Robinson
Cole Robinson wrote: Trying to start a qemu guest with more than 1 character device (serial or parallel, doesn't count for console) always times out. There was an error in the code that would strip the pty path qemu spits out, which confused the parsing after being called more than twice

Re: [libvirt] [PATCH] Fix 1 char device for qemu VM

2008-10-02 Thread Cole Robinson
Daniel Veillard wrote: On Mon, Sep 29, 2008 at 12:48:30PM -0400, Cole Robinson wrote: Cole Robinson wrote: Trying to start a qemu guest with more than 1 character device (serial or parallel, doesn't count for console) always times out. There was an error in the code that would strip the pty

[libvirt] [PATCH] Centralize use of DEBUG macros

2008-10-02 Thread Cole Robinson
1a19564d054f3903201a7c65ff0f46c6b169f9c3 Author: Cole Robinson [EMAIL PROTECTED] Date: Thu Oct 2 11:18:00 2008 -0400 Move debug macros to internal.h, rather than duplicate everywhere. diff --git a/qemud/remote.c b/qemud/remote.c index 3e43dcf..8acd95d 100644 --- a/qemud/remote.c +++ b/qemud/remote.c @@ -52,8 +52,6 @@ #include

[libvirt] [PATCH] Clean up some uses qemudDebug

2008-10-02 Thread Cole Robinson
The patch cleans up some uses of qemudDebug, moving them over to use the DEBUG macros. There are still lots of uses of qemudDebug in qemud/*, but I don't know if they can/should be moved over to use DEBUG. Thanks, Cole commit 99c6268b660f00eb906d936248df83348befa5ab Author: Cole Robinson [EMAIL

[libvirt] [PATCH] Unify *ReportError logic

2008-10-02 Thread Cole Robinson
Currently, most src/* files have their own ReportError function. Some support printf style arguments, others only allow reporting a single string message. The code for all of them does virtually the same thing, possibly passing a different constant off to another function. The attached patch adds

  1   2   3   4   5   6   7   8   9   10   >