Re: [libvirt] Some problem with the save function

2009-09-24 Thread Paolo Bonzini
On 09/18/2009 03:09 AM, Charles Duffy wrote: Daniel P. Berrange wrote: Hmm, bad error message :-( We might also need todo a chown() in the restore path to allow QEMU to read it. NB there is no compatability between QEMU version, so if you have upgraded your install of QEMU between the time you s

Re: [libvirt] [PATCH 2/9] Extend element with controller information

2009-09-24 Thread Matthias Bolte
2009/9/24 Daniel P. Berrange : > > Outside the scope of your patches, I think it would be > worth adding a 'name' attribute to all devices in the > libvirt XML as a standardized unique identifier. We > already have to keep track of a 'name' internally for > NIC hotplug with QEMU, and with QEMU's qd

Re: [libvirt] Miscellaneous fixes to build with -Werror

2009-09-24 Thread Charles Duffy
Chris Lalancette wrote: I didn't see the error about the virStrcpy one, so I would still be curious as to what you are seeing there. As the context of the patch implies, this was a link-time issue -- but I find myself unable to reproduce it. I'll continue this thread should that change in the

Re: [libvirt] [PATCH] Remove hand-crafted UUID parsers

2009-09-24 Thread Matthias Bolte
2009/9/24 Daniel P. Berrange : > * src/libvirt.c: Remove hand-crafted UUID parsers in favour of >  calling virParseUUID s/virParseUUID/virUUIDParse/ > --- >  src/libvirt.c |   56 +--- >  1 files changed, 5 insertions(+), 51 deletions(-) > > diff

Re: [libvirt] PATCH] Stop double free

2009-09-24 Thread Mark Hamzy
The stack trace is as follows: Program received signal SIGABRT, Aborted. 0x0035ad830265 in raise () from /lib64/libc.so.6 (gdb) bt #0 0x0035ad830265 in raise () from /lib64/libc.so.6 #1 0x0035ad831d10 in abort () from /lib64/libc.so.6 #2 0x0035ad86a84b in __libc_message () from

Re: [libvirt] 0.7.1 compile fails on opensuse 11.1

2009-09-24 Thread Jim Fehlig
Pritesh Kothari wrote: >> it seems openSuSE 11.1 does not come with a pkgconfig for the >> device-mapper-devel package. I created a bug [1] for opensuse but was >> also told to mention it here so configure.in could be patched once the >> bug was fixed. >> > > Hi All, > > Just fixed this for ub

[libvirt] node device devicekit backend

2009-09-24 Thread Dave Allan
I've been looking at implementing a libudev backed node device, and I noticed that the devicekit node device backend doesn't build. Since I believe DeviceKit is deprecated for this sort of use, and AFAIK the DeviceKit support was never functionally equivalent to the HAL support, I'm wondering

[libvirt] [PATCH] Remove hand-crafted UUID parsers

2009-09-24 Thread Daniel P. Berrange
* src/libvirt.c: Remove hand-crafted UUID parsers in favour of calling virParseUUID --- src/libvirt.c | 56 +--- 1 files changed, 5 insertions(+), 51 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 9fb0617..74d62a4 100644 --- a

[libvirt] [PATCH 01/27] Pull QEMU monitor interaction out to separate file

2009-09-24 Thread Daniel P. Berrange
Pull out all the QEMU monitor interaction code to a separate file. This will make life easier when we need to drop in a new implementation for the forthcoming QMP machine friendly monitor support. Next step is to add formal APIs for each monitor command, and remove direct commands for sending/rece

[libvirt] [PATCH 22/27] Add API for issuing 'pci_add nic' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_conf.c: Remove separator from qemuBuildNicStr() args, and remove hardcoded 'nic' prefix. Leave it upto callers instead * src/qemu/qemu_driver.c: Switch over to using the new qemuMonitorAddPCINetwork() method for NIC hotplug * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: A

[libvirt] [PATCH 13/27] Add API for running 'info migration' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorGetMigrationStatus() command. * src/qemu/qemu_driver.c: Use new qemuMonitorGetMigrationStatus() command to check completion status. --- src/qemu/qemu_driver.c | 15 +-- src/qemu/qemu_monitor_text.c | 91 ++

[libvirt] [PATCH 23/27] Add API for issuing 'host_net_add' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_conf.h, src/qemu/qemu_conf.c: Remove prefix arg from qemuBuildHostNetStr which is no longer required * src/qemu/qemu_driver.c: Refactor to use qemuMonitorAddHostNetwork() API for adding host network * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorAddHost

[libvirt] [PATCH 06/27] Add API for the 'system_powerdown' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_driver.c: Remove use of 'system_powerdown' * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add a new qemuMonitorSystemPowerdown() api call --- src/qemu/qemu_driver.c |8 ++-- src/qemu/qemu_monitor_text.c | 14 ++ src/qemu/qemu_monitor_text.h |2

[libvirt] [PATCH 10/27] Add APIs for issuing 'memsave' and 'pmemsave' monitor commands

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add new APIs qemuMonitorSaveVirtualMemory() and qemuMonitorSavePhysicalMemory() * src/qemu/qemu_driver.c: Use the new qemuMonitorSaveVirtualMemory() and qemuMonitorSavePhysicalMemory() APIs --- src/qemu/qemu_driver.c | 21

[libvirt] [PATCH 08/27] Add API for issuing 'balloon' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorSetBalloon() based on existing code in qemudDomainSetMemoryBalloon * src/qemu/qemu_driver.c: Remove use of qemudDomainSetMemoryBalloon() in favour of qemuMonitorSetBalloon(). Fix error code when balloon is not supported

[libvirt] [PATCH 09/27] Add APIs for issuing 'eject' and 'change dev' monitor commands

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new APis qemuMonitorChangeMedia and qemuMonitorEjectMedia. Pull in code for qemudEscape * src/qemu/qemu_driver.c: Remove code that directly issues 'eject' and 'change' commands in favour of API calls. --- src/qemu/qemu_driver.c |

[libvirt] [PATCH 24/27] Add API for issuing 'host_net_remove' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add new qemuMonitorRemoveHostNetwork() command for removing host networks * src/qemu/qemu_driver.c: Convert NIC hotplug methods over to use qemuMonitorRemoveHostNetwork() --- src/qemu/qemu_driver.c | 65 ++---

[libvirt] [PATCH 07/27] Add API for running 'info balloon' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Pull old qemudDomainGetMemoryBalloon() code into a new method called qemuMonitorGetBalloonInfo() * src/qemu/qemu_driver.c: Update to call qemuMonitorGetBalloonInfo() and remove qemudDomainGetMemoryBalloon(). --- src/qemu/qemu_driver.c

[libvirt] [PATCH 04/27] Rename qemudMonitorSendCont to qemuMonitorStartCPUs

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Rename Rename qemudMonitorSendCont to qemuMonitorStartCPUs * src/qemu/qemu_driver.c: Update callers for new name --- src/qemu/qemu_driver.c | 18 +- src/qemu/qemu_monitor_text.c |2 +- src/qemu/qemu_monitor_text.h |

[libvirt] [PATCH 26/27] Standardize debugging messages in QEMU monitor code

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor_text.c: Always print command and reply in qemuMonitorCommandWithHandler. Print all args in each monitor command API & remove redundant relpy printing --- src/qemu/qemu_monitor_text.c | 82 ++--- 1 files changed, 60 insertions(+), 22

[libvirt] [PATCH 12/27] Add API for issuing the 'migrate_set_speed' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_driver.c: Use new qemuMonitorSetMigrationSpeed() API during migration * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add new qemuMonitorSetMigrationSpeed() API --- src/qemu/qemu_driver.c | 11 +++ src/qemu/qemu_monitor_text.c | 28

[libvirt] [PATCH 14/27] Add API for issuing a 'migrate' monitor command for TCP

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new API qemuMonitorMigrateToHost() for doing TCP migration * src/qemu/qemu_driver.c: Convert to use qemuMonitorMigrateToHost(). Also handle proper URIs (tcp:// as well as tcp:) --- src/qemu/qemu_driver.c | 40 -

[libvirt] [PATCH 02/27] Add API for 'info cpus' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Add a new qemuMonitorGetCPUInfo() command * src/qemu/qemu_driver.c: Refactor qemudDetectVcpuPIDs to use qemuMonitorGetCPUInfo() --- src/qemu/qemu_driver.c | 114 ++ src/qemu/qemu_monitor_text.c |

[libvirt] [PATCH 11/27] Add API for issuing 'info blockstats' command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add a new qemuMonitorGetBlockStatsInfo() command * src/qemu/qemu_driver.c: Remove directly use of blockstats in favour of calling qemuMonitorGetBlockStatsInfo() --- src/qemu/qemu_driver.c | 95 +++-- sr

[libvirt] [PATCH 00/27] Refactor QEMU monitor command handling

2009-09-24 Thread Daniel P. Berrange
In the QEMU driver source code the methods which talk to the QEMU monitor currently all just call qemudMonitorCommand() directly with the raw command string, and then parse the raw reply. In the not too distant future QEMU is introducing a new machine parsable monitor syntax. With the current way

[libvirt] [PATCH 16/27] Add API for using 'usb_add' for disk devices

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorAddUSBDisk() API * src/qemu/qemu_driver.c: Switch USB disk hotplug to the new src/qemu/qemu_driver.c API. --- src/qemu/qemu_driver.c | 41 ++- src/qemu/qemu_monitor_text.c | 43

[libvirt] [PATCH 03/27] Add API for 'change vnc password' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add a new qemuMonitorSetVNCPassword() API * src/qemu/qemu_driver.c: Refactor qemudInitPasswords to call qemuMonitorSetVNCPassword() --- src/qemu/qemu_driver.c | 24 src/qemu/qemu_monitor_text.c | 15

[libvirt] [PATCH 27/27] Fix crash in device hotplug cleanup code

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_driver.c: Fix crash in scenario where XML parsing of hotplugged device failed & thus 'dev' is NULL --- src/qemu/qemu_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index da72913..7dc9353 100644 --

[libvirt] [PATCH 19/27] Add API for issuing 'pci_del' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new API qemuMonitorRemovePCIDevice() for removing PCI device * src/qemu/qemu_driver.c: Convert all places removing PCI devices over to new qemuMonitorRemovePCIDevice() API --- src/qemu/qemu_driver.c | 120 --

[libvirt] [PATCH 18/27] Add API for issugin 'pci_add host' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new API qemuMonitorAddPCIHostDevice() * src/qemu/qemu_driver.c: Switch to using qemuMonitorAddPCIHostDevice() for PCI host device hotplug --- src/qemu/qemu_driver.c | 46 +++- src/qemu/qemu_monitor_text.c | 121 ++

[libvirt] [PATCH 20/27] Add API for issuing 'pci_add storage' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new API qemuMonitorAddPCIDisk() * src/qemu/qemu_driver.c: Convert over to using the new qemuMonitorAddPCIDisk() method, and remove now obsolete qemudEscape() method --- src/qemu/qemu_driver.c | 130 ++-

[libvirt] [PATCH 15/27] Add API for issugin 'migrate' command with exec protocol

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorMigrateToCommand() API * src/qemu/qemu_driver.c: Switch over to using the qemuMonitorMigrateToCommand() API for core dumps and save to file APIs --- src/libvirt_private.syms |1 + src/qemu/qemu_driver.c | 1

[libvirt] [PATCH 17/27] Add APIs for sending 'usb_add' command for host devices

2009-09-24 Thread Daniel P. Berrange
One API adds an exact device based on bus+dev, the other adds any device matching vendor+product * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorAddUSBDeviceExact() and qemuMonitorAddUSBDeviceMatch() commands. * src/qemu/qemu_driver.c: Switch over to using the new qe

[libvirt] [PATCH 25/27] Remove low level monitor APIs from header file

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.h: Remove qemudMonitorCommand, qemudMonitorCommandWithFd, qemudMonitorCommandWithHandler, qemudMonitorCommandExtra low level APIs * src/qemu/qemu_monitor.c: Replace s/qemud/qemuMonitor/ --- src/qemu/qemu_monitor_text.c | 166 ++

[libvirt] [PATCH 21/27] Add API for issuing 'getfd' and 'closefd' monitor commands

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new qemuMonitorCloseFileHandle and qemuMonitorSendFileHandle APIs for processing file handles * src/qemu/qemu_driver.c: Convert NIC hotplug method over to use qemuMonitorCloseFileHandle and qemuMonitorSendFileHandle --- src/qemu/qemu_

[libvirt] [PATCH 05/27] Add API for 'stop' monitor command

2009-09-24 Thread Daniel P. Berrange
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add a new qemuMonitorStopCPUs() API * src/qemu/qemu_driver.c: Replace direct monitor commands for 'stop' with qemuMonitorStopCPUs() --- src/qemu/qemu_driver.c | 28 src/qemu/qemu_monitor_text.c | 13

Re: [libvirt] [PATCH 9/9] Implement disk- and controller hotremove

2009-09-24 Thread Daniel P. Berrange
On Fri, Sep 18, 2009 at 05:26:16PM +0200, Wolfgang Mauerer wrote: > Since both disks and disk controllers can be dynamically > added to the system, it makes sense to be also able to remove > them. This is the main patch which requires additional support in QEMu if I'm understanding your patcheset

Re: [libvirt] Miscellaneous fixes to build with -Werror

2009-09-24 Thread Chris Lalancette
Charles Duffy wrote: > HACKING suggests compiling with --enable-compile-warnings=error before > submitting any patches; however, current master fails for me on this > account (CentOS 5.3; gcc 4.1.2). > > Please see attached. I suspect most of these should be uncontroversial > -- but wonder if p

Re: [libvirt] [PATCH 7/9] Remove surprises in the semantics of disk-hotadd

2009-09-24 Thread Daniel P. Berrange
On Fri, Sep 18, 2009 at 05:26:14PM +0200, Wolfgang Mauerer wrote: > When a disk is added without an explicitly specified > controller as host, then try to find the first available > controller. If none exists, do not (as in previous versions) > add a new PCI controller device with the disk attached

Re: [libvirt] [PATCH 5/9] Implement controller hotplugging

2009-09-24 Thread Daniel P. Berrange
On Fri, Sep 18, 2009 at 05:26:12PM +0200, Wolfgang Mauerer wrote: > This enables to hot-add disk controllers without attached > disks into the system. Previously, it was only possible to > (implicitly) add disk controllers in the static machine > configuration. > > Notice that the actual functiona

Re: [libvirt] [PATCH 3/9] Add new domain device: "controller"

2009-09-24 Thread Daniel P. Berrange
On Fri, Sep 18, 2009 at 05:26:10PM +0200, Wolfgang Mauerer wrote: > This augments virDomainDevice with a element > that is used to represent disk controllers (e.g., scsi > controllers). The XML format is given by > > > > > > where type denotes the disk interface (scsi, ide,...), id > is an

Re: [libvirt] [PATCH 2/9] Extend element with controller information

2009-09-24 Thread Daniel P. Berrange
On Fri, Sep 18, 2009 at 05:26:09PM +0200, Wolfgang Mauerer wrote: > This allows us to connect a disk with a specific controller, > which is required for disk hotadd/remove. A new XML child > element is added to the container: > > > ... >unit=""/> > > > Either id _or_ pci_addr can be sp

Re: [libvirt] [PATCH 1/9] Clarify documentation for private symbols

2009-09-24 Thread Daniel P. Berrange
On Fri, Sep 18, 2009 at 05:26:08PM +0200, Wolfgang Mauerer wrote: > The instruction "See Makefile.am" in libvirt.private_syms > always makes me think that this file is autogenerated > and should not be touched manually. This patch spares > every reader of libvirt.private_syms the hassle of > readin

Re: [libvirt] qemu_driver migrateuri handling broken?

2009-09-24 Thread Gregor Schaffrath
On Wed, Sep 23, 2009 at 10:05:36AM +0200, Chris Lalancette wrote: > >> We are working on a new tunnelled migration scheme that will be > >> uniform across drivers. > > ic - To be honest, I was confused by the migrateuri anyhow, since I > > considered the situation where libvirt traffic is tunneled

Re: [libvirt] [PATCH] Fix a typo in virDiskHasValidPciAddr()

2009-09-24 Thread Mark McLoughlin
On Wed, 2009-09-23 at 18:46 +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/conf/domain_conf.h |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h > index 09368d9..d494e54 100644 > --- a/src/conf/do

Re: [libvirt] Miscellaneous fixes to build with -Werror

2009-09-24 Thread Mark McLoughlin
Interesting that gcc-4.41 isn't giving me any warnings On Wed, 2009-09-23 at 12:32 -0500, Charles Duffy wrote: > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c > index af215ca..25d983e 100644 > --- a/src/qemu/qemu_driver.c > +++ b/src/qemu/qemu_driver.c > @@ -6132,7 +6132,7 @@ static

Re: [libvirt] Miscellaneous fixes to build with -Werror

2009-09-24 Thread Chris Lalancette
Chris Lalancette wrote: > Charles Duffy wrote: >> HACKING suggests compiling with --enable-compile-warnings=error before >> submitting any patches; however, current master fails for me on this >> account (CentOS 5.3; gcc 4.1.2). >> >> Please see attached. I suspect most of these should be uncontr

Re: [libvirt] [PATCH] Fix a typo in virDiskHasValidPciAddr()

2009-09-24 Thread Chris Lalancette
Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/conf/domain_conf.h |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h > index 09368d9..d494e54 100644 > --- a/src/conf/domain_conf.h > +++ b/src/conf/domain

Re: [libvirt] Miscellaneous fixes to build with -Werror

2009-09-24 Thread Chris Lalancette
Charles Duffy wrote: > HACKING suggests compiling with --enable-compile-warnings=error before > submitting any patches; however, current master fails for me on this > account (CentOS 5.3; gcc 4.1.2). > > Please see attached. I suspect most of these should be uncontroversial > -- but wonder if p

Re: [libvirt] Re: OpenVZ : The restriction of domain name should be addressed

2009-09-24 Thread Yuji NISHIDA
Thanks, Chris and Daniel I corrected the code that I posted here according to your comments. Chris, I now need to handle openvz containers by character(name) not integer(id) at all. diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 54bcaa9..3b8505d 100644 --- a/src/op