Re: [libvirt] [PATCH] Compressed save image format for Qemu.

2009-08-17 Thread Chris Lalancette
Daniel P. Berrange wrote: On Thu, Aug 13, 2009 at 10:47:18AM +0200, Chris Lalancette wrote: Implement a compressed save image format for qemu. While ideally we would have the choice between compressed/non-compressed available to the libvirt API, unfortunately there is no flags parameter to

Re: [libvirt] remote_protocol.c not compiling

2009-08-17 Thread Kenneth Nagin
Thanks this was extremely helpful. I wish I had this when I first started working with libvirt. Incidental, I have not shared the api that I created with the libvirt community because I think it was premature and that there is a better approach than the creating a new api. Specifically, I

Re: [libvirt] libvirt socket closed unexpectedly (code=39) libvirt: Broken pipe (code=38)

2009-08-17 Thread Daniel P. Berrange
On Sat, Aug 15, 2009 at 10:02:21AM -0700, dave c wrote: Hello everyone, I'm trying to get eucalyptus v1.5.2 working on debian lenny 64bit, the relevant info I can give you is as follows: --- libvirtd conf file 01:/etc/libvirt# cat libvirtd.conf|grep -v '#' unix_sock_group =

Re: [libvirt] [PATCH 0/8] Various KVM PCI device assignment improvements

2009-08-17 Thread Mark McLoughlin
On Sun, 2009-08-16 at 22:13 +0200, Mirko Raasch wrote: ==8823== Invalid read of size 8 ==8823==at 0x420C04: qemuCheckPciHostDevice (qemu_driver.c:1337) ==8823==by 0x4E48CA7: pciResetDevice (pci.c:606) ==8823==by 0x4229D5: qemudShutdownVMDaemon (qemu_driver.c:1479) ==8823==by

[libvirt] [PATCH] Small fixes for qemu save compression.

2009-08-17 Thread Chris Lalancette
Fix up a small memory leak pointed out by DanB; I was forgetting to release memory allocated to driver-saveImageFormat. Also add the save_image_format and security entries to the augeas lens. Signed-off-by: Chris Lalancette clala...@redhat.com --- qemud/libvirtd_qemu.aug |2 ++

Re: [libvirt] XenStore fix take 2

2009-08-17 Thread Jonas Eriksson
Hi, just woundering of the status of this patch in good time before 0.7.1. Regards, Jonas On Thu, Jul 30, 2009 at 05:35:24PM +0200 Daniel Veillard wrote: On Thu, Jul 30, 2009 at 05:15:09PM +0200, Jonas Eriksson wrote: Something like this works for me. Did test each patch individualy as well.

[libvirt] [PATCH] Fix up connection reference counting.

2009-08-17 Thread Chris Lalancette
Currently the reference counting for connections is busted. I first noticed it while trying to use virConnectRef; it would eventually cause a crash in the remote_internal driver, although that was really just a victim. Really, we should only call the close callbacks on the methods when the

[libvirt] [PATCH] Re-name remote_internal.c:driver to remote_driver

2009-08-17 Thread Mark McLoughlin
Confused me when poking at another 'driver' variable in gdb which gcc had optimized away * src/remote_internal.c: rename driver to remote_driver --- src/remote_internal.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/remote_internal.c b/src/remote_internal.c

[libvirt] [PATCH 4/8] Reset PCI host devices after hot-unplug

2009-08-17 Thread Mark McLoughlin
When we hot-unplug a PCI host device from a guest, we should reset it. Both managed and unmanaged devices should be reset, but only managed devices should be re-attached. * src/qemu_driver.c: reset devices in qemudDomainDetachHostPciDevice() --- src/qemu_driver.c | 22 +-

[libvirt] [PATCH 3/8] Reset unmanaged PCI host devices before hotplug

2009-08-17 Thread Mark McLoughlin
Right now we're only resetting managed devices before hotplug, but we should reset them irrespective of whether they are managed. * src/qemu_driver.c: reset all PCI hostdevs before hotplug --- src/qemu_driver.c | 27 +-- 1 files changed, 13 insertions(+), 14

[libvirt] [PATCH 00/08] More misc device assignment fixes

2009-08-17 Thread Mark McLoughlin
Hey, I had a little change of heart about the patches committed last week to allow pciResetDevice() reset multiple devices. The callback to check whether a device is active is much to cumbersome, instead we should maintain a list of active devices. Patch 2 reverts two commits from last

[libvirt] [PATCH 7/8] Simplify PCI hostdev prepare/re-attach using a pciDeviceList type

2009-08-17 Thread Mark McLoughlin
The qemuPrepareHostDevices() and qemuDomainReAttachHostDevices() functions are clutter with a bunch of calls to pciGetDevice() and pciFreeDevice() obscuring the basic logic. Add a pciDeviceList type and add a qemuGetPciHostDeviceList() function to build a list from a domain definition. Use this

[libvirt] [PATCH 2/8] Revert changes to allow pciResetDevice() reset multiple devices

2009-08-17 Thread Mark McLoughlin
It turns out that the previous attempt at this doesn't work well in the case of hotplug. We need qemuCheckPciHostDevice() to disallow the reset affecting devices already attach to the guest, but we still need to avoid double locking the virDomainObjPtr. This is all getting messy, I've a better

[libvirt] [PATCH 6/8] Use pci_addr=auto with QEMU's pci_add monitor command

2009-08-17 Thread Mark McLoughlin
Newer versions of QEMU accept 'pci_add auto', but older versions require 'pci_add pci_addr=auto' * src/qemu_driver.c: use pci_addr= in qemudDomainAttachHostPciDevice() for older versions of QEMU --- src/qemu_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[libvirt] [PATCH 5/8] Fix thinko in PCI hostdev detach

2009-08-17 Thread Mark McLoughlin
* src/qemu_driver.c: Add missing break statement in qemudDomainDetachHostDevice() --- src/qemu_driver.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 187497f..048e1c0 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@

[libvirt] PATCH: Don't blindly reorder disk drives

2009-08-17 Thread Daniel P. Berrange
Calling qsort() on the disks array causes disk to be unneccessarily re-ordered, potentially breaking the ability to boot if the boot disk gets moved later in the list. The new algorithm will insert a new disk as far to the end of the list as possible, while being ordered correctly wrt other disks

[libvirt] PATCH: Support setting a disk drive serial (number)

2009-08-17 Thread Daniel P. Berrange
All hard disks (IDE, SCSI, USB, VirtIO) have a concept of a serial number which is intended to uniquely identify them. If you mean this off, QEMU just makes up a serial on the fly. THis is not guarenteed to be stable across guest reboots with hardware changes. It is thus desirable to be able to

Re: [libvirt] PATCH: Support setting a disk drive serial (number)

2009-08-17 Thread Dave Allan
Daniel P. Berrange wrote: All hard disks (IDE, SCSI, USB, VirtIO) have a concept of a serial number which is intended to uniquely identify them. If you mean this off, QEMU just makes up a serial on the fly. THis is not guarenteed to be stable across guest reboots with hardware changes. It is

Re: [libvirt] PATCH: Support setting a disk drive serial (number)

2009-08-17 Thread Daniel P. Berrange
On Mon, Aug 17, 2009 at 02:37:48PM -0400, Dave Allan wrote: Daniel P. Berrange wrote: All hard disks (IDE, SCSI, USB, VirtIO) have a concept of a serial number which is intended to uniquely identify them. If you mean this off, QEMU just makes up a serial on the fly. THis is not guarenteed to

Re: [libvirt] PATCH: Support setting a disk drive serial (number)

2009-08-17 Thread Dave Allan
Daniel P. Berrange wrote: On Mon, Aug 17, 2009 at 02:37:48PM -0400, Dave Allan wrote: Daniel P. Berrange wrote: All hard disks (IDE, SCSI, USB, VirtIO) have a concept of a serial number which is intended to uniquely identify them. If you mean this off, QEMU just makes up a serial on the fly.

Re: [libvirt] [PATCH] Fix up connection reference counting.

2009-08-17 Thread Daniel P. Berrange
On Mon, Aug 17, 2009 at 12:57:17PM +0200, Chris Lalancette wrote: Currently the reference counting for connections is busted. I first noticed it while trying to use virConnectRef; it would eventually cause a crash in the remote_internal driver, although that was really just a victim. Really,

Re: [libvirt] [PATCH] Cosmetic change to 'virsh nodedev-list --tree' output

2009-08-17 Thread Daniel P. Berrange
On Mon, Aug 17, 2009 at 03:06:26PM +0100, Mark McLoughlin wrote: Maybe it's just me, but I try to select an item from the tree using double-click and get annoyed when +- gets included in the selection. Haha, yeah, that's bugged the hell out of me. Dunno why I didn't change it myself already !

Re: [libvirt] [PATCH] Re-name remote_internal.c:driver to remote_driver

2009-08-17 Thread Daniel P. Berrange
On Mon, Aug 17, 2009 at 03:06:27PM +0100, Mark McLoughlin wrote: Confused me when poking at another 'driver' variable in gdb which gcc had optimized away * src/remote_internal.c: rename driver to remote_driver --- src/remote_internal.c |4 ++-- 1 files changed, 2 insertions(+), 2

Re: [libvirt] Share storage using iscsi [EDIT as I cut off part]

2009-08-17 Thread Dave Allan
Łukasz Mierzwa wrote: 2009/8/14 Dave Allan dal...@redhat.com mailto:dal...@redhat.com Łukasz Mierzwa wrote: Hi Łukasz, I will try to answer your questions inline. Hi, I'm trying to setup pool of machines (nodes) for virtual machines hosting and I got

Re: [libvirt] [PATCH 1/8] Fix list updating after disk/network/hostdev hot-unplug

2009-08-17 Thread Daniel P. Berrange
On Mon, Aug 17, 2009 at 03:10:14PM +0100, Mark McLoughlin wrote: The current code makes a poor effort at updating the device arrays after hot-unplug. Fix that and combine the two code paths into one. * src/qemu_driver.c: fix list updating in qemudDomainDetachNetDevice(),

Re: [libvirt] [PATCH 3/8] Reset unmanaged PCI host devices before hotplug

2009-08-17 Thread Daniel P. Berrange
On Mon, Aug 17, 2009 at 03:10:16PM +0100, Mark McLoughlin wrote: Right now we're only resetting managed devices before hotplug, but we should reset them irrespective of whether they are managed. * src/qemu_driver.c: reset all PCI hostdevs before hotplug --- src/qemu_driver.c | 27

Re: [libvirt] [PATCH 4/8] Reset PCI host devices after hot-unplug

2009-08-17 Thread Daniel P. Berrange
On Mon, Aug 17, 2009 at 03:10:17PM +0100, Mark McLoughlin wrote: When we hot-unplug a PCI host device from a guest, we should reset it. Both managed and unmanaged devices should be reset, but only managed devices should be re-attached. * src/qemu_driver.c: reset devices in

Re: [libvirt] [PATCH 5/8] Fix thinko in PCI hostdev detach

2009-08-17 Thread Daniel P. Berrange
On Mon, Aug 17, 2009 at 03:10:18PM +0100, Mark McLoughlin wrote: * src/qemu_driver.c: Add missing break statement in qemudDomainDetachHostDevice() --- src/qemu_driver.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/qemu_driver.c b/src/qemu_driver.c index

Re: [libvirt] [PATCH 6/8] Use pci_addr=auto with QEMU's pci_add monitor command

2009-08-17 Thread Daniel P. Berrange
On Mon, Aug 17, 2009 at 03:10:19PM +0100, Mark McLoughlin wrote: Newer versions of QEMU accept 'pci_add auto', but older versions require 'pci_add pci_addr=auto' Ah yes, storage already does that too * src/qemu_driver.c: use pci_addr= in qemudDomainAttachHostPciDevice() for older

Re: [libvirt] [PATCH 7/8] Simplify PCI hostdev prepare/re-attach using a pciDeviceList type

2009-08-17 Thread Daniel P. Berrange
On Mon, Aug 17, 2009 at 03:10:20PM +0100, Mark McLoughlin wrote: The qemuPrepareHostDevices() and qemuDomainReAttachHostDevices() functions are clutter with a bunch of calls to pciGetDevice() and pciFreeDevice() obscuring the basic logic. Add a pciDeviceList type and add a

Re: [libvirt] [PATCH 8/8] Maintain a list of active PCI hostdevs and use it in pciResetDevice()

2009-08-17 Thread Daniel P. Berrange
On Mon, Aug 17, 2009 at 03:10:21PM +0100, Mark McLoughlin wrote: As we start/shutdown guests, or hotplug/hot-unplug devices, we can add or delete devices as appropriate from a list of active devices. Then, in pciReset(), we can use this to determine whether its safe to reset a device as a

Re: [libvirt] Share storage using iscsi [EDIT as I cut off part]

2009-08-17 Thread Daniel P. Berrange
On Mon, Aug 17, 2009 at 03:03:12PM -0400, Dave Allan wrote: As a side note, I don't object to creating functionality to allow libvirt to manage iSCSI targets, extending the volume create/delete code to interface with the target. However, I don't want to try to create code to manage every

Re: [libvirt] Share storage using iscsi [EDIT as I cut off part]

2009-08-17 Thread Łukasz Mierzwa
Dnia poniedziałek 17 sierpień 2009 o 21:03:12 Dave Allan napisał(a): Łukasz Mierzwa wrote: [...] Let me make that little more clear: 1. Lets assume I have one storage node that is acting as a iscsi target. 2. This storage node has one big block device (RAID of some kind) that will be used