Re: [libvirt] [PATCH 1/2] init qemu_driver's qemuImgBinary field

2012-11-13 Thread Doug Goldstein
On Tue, Nov 13, 2012 at 9:03 PM, liguang wrote: > Signed-off-by: liguang > --- > src/qemu/qemu_domain.c |2 +- > src/qemu/qemu_driver.c |3 +++ > 2 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c > index a5592b9..eb5a3d1 100

[libvirt] [PATCH] qemu conf: Use host-model for cpu mode by default

2012-11-13 Thread Ichikawa, Ken
Now, qemu guest's default cpu model is qemu32/64 and it can be configured per domain. In some case, host-model mode is suitable for getting enough performance in the guest because of features from cpu spec. This patch adds a config option to qemu.conf to use 'host-model' mode as default and allow

[libvirt] [PATCH 1/2] init qemu_driver's qemuImgBinary field

2012-11-13 Thread liguang
Signed-off-by: liguang --- src/qemu/qemu_domain.c |2 +- src/qemu/qemu_driver.c |3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index a5592b9..eb5a3d1 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@

[libvirt] [PATCH 2/2] help to create disk images of non-shared migration

2012-11-13 Thread liguang
try to do non-shared migration without bothering to create disk images at target by hand. consider this situation: 1. non-shared migration virsh migrate --copy-storage-all ... 2. migration fails 3. create disk images required qemu-img create ... 4 migration run smoothly so, try do remove st

Re: [libvirt] [PATCH] qemu: Don't force port=0 for SPICE

2012-11-13 Thread Eric Blake
On 11/12/2012 10:40 AM, Michal Privoznik wrote: > If domain uses only TLS port we don't want to add > 'port=0' explicitly to command line. > --- > src/qemu/qemu_command.c | 12 > 1 files changed, 8 insertions(+), 4 deletions(-) ACK. -- Eric Blake ebl...@redhat.com+1-919-301

Re: [libvirt] [v0.10.2-maint][PATCH] qemu: Always format CPU topology

2012-11-13 Thread Eric Blake
On 11/13/2012 08:22 AM, Michal Privoznik wrote: > From: Jiri Denemark > > When libvirt cannot find a suitable CPU model for host CPU (easily > reproducible by running libvirt in a guest), it would not provide CPU > topology in capabilities XML either. Even though CPU topology is known > and can b

Re: [libvirt] [RFC PATCH 1/n] snapshot: add revert-and-create branching of external snapshots

2012-11-13 Thread Eric Blake
On 11/13/2012 08:26 AM, Peter Krempa wrote: > On 11/09/12 05:47, Eric Blake wrote: >> Right now, libvirt refuses to revert to the state at the time >> of an external snapshot, because doing so would reset things so >> that the next time the domain boots, we are using the backing >> file; but modify

Re: [libvirt] [PATCH 4/4] snapshot: implement new filter sets

2012-11-13 Thread Peter Krempa
On 11/13/12 20:09, Eric Blake wrote: Relatively straight-forward. And since qemu was already using VIR_DOMAIN_SNAPSHOT_FILTERS_ALL, with 6 different APIs all calling into this common code, I've instantly added all 5 flags to 6 APIs. * src/conf/snapshot_conf.h (VIR_DOMAIN_SNAPSHOT_FILTERS_ALL):

Re: [libvirt] [PATCH 3/4] snapshot: expose location through virsh snapshot-info

2012-11-13 Thread Peter Krempa
On 11/13/12 20:09, Eric Blake wrote: Now that we can filter on this information, we should also make it easy to get at. * tools/virsh-snapshot.c (cmdSnapshotInfo): Add another output row. --- tools/virsh-snapshot.c | 32 +++- 1 file changed, 27 insertions(+), 5 del

Re: [libvirt] [libvirt-glib] Add gvir_domain_update_device() and enums needed for it

2012-11-13 Thread Zeeshan Ali (Khattak)
On Tue, Nov 13, 2012 at 8:06 PM, Christophe Fergeau wrote: > On Tue, Nov 13, 2012 at 07:22:35PM +0100, Zeeshan Ali (Khattak) wrote: >> On Tue, Nov 13, 2012 at 7:10 PM, Alexander Larsson wrote: >> > This is a wrapper for virDomainUpdateDeviceFlags. >> >> Looks good. ACK. >> >> > diff --git a/libvi

Re: [libvirt] [PATCH 2/4] snapshot: add virsh back-compat support for new filters

2012-11-13 Thread Peter Krempa
On 11/13/12 20:09, Eric Blake wrote: Snapshot filtering based on types is useful enough to add back-compat support into virsh. It is also rather easy - all versions of libvirt that don't understand the new filter flags already gave us sufficient information in a single XML field to reconstruct a

Re: [libvirt] [PATCH 1/4] snapshot: add two more filter sets to API

2012-11-13 Thread Peter Krempa
On 11/13/12 20:09, Eric Blake wrote: As we enable more modes of snapshot creation, it becomes more important to be able to quickly filter based on snapshot properties. This patch introduces new filter flags; subsequent patches will introduce virsh back-compat filtering, as well as actual libvirt

Re: [libvirt] [PATCHv3 4/5] snapshot: Add flag to allow hypervisor restart when reverting snapshots

2012-11-13 Thread Eric Blake
On 11/13/2012 08:28 AM, Peter Krempa wrote: > > I should have added code to libvirt.c that will set the _RESPAWN flag > when force is specified to save hassle. I will do it in the next version > if this idea doesn't get NACKed to oblivion. I'm still thinking about the original patch, but _don't_

Re: [libvirt] [PATCHv3 3/5] snapshot: Add flag VIR_DOMAIN_SNAPSHOT_REVERT_STOPPED

2012-11-13 Thread Eric Blake
On 11/12/2012 10:49 AM, Peter Krempa wrote: > The current snapshot reverting api supported changing the state of the > machine after the snapshot was reverted to either started or paused. > > This patch adds the ability to revert the state but to stopped state. > --- > - fixed libvirt.c and virsh.

Re: [libvirt] [PATCHv3 1/5] qemu: Split out guts of qemuDomainSaveImageStartVM() to allow reuse

2012-11-13 Thread Eric Blake
On 11/12/2012 10:49 AM, Peter Krempa wrote: > The workhorse part of qemuDomainSaveImageStartVM can be reused while > loading external snapshots. This patch splits the code out into a new > function qemuDomainSaveImageLoad that is free of setting lifecycle > events. > --- > Previous version ACKed. J

Re: [libvirt] [PATCHv3 2/5] snapshot: qemu: Fix detection of external snapshots when deleting

2012-11-13 Thread Peter Krempa
On 11/13/12 20:06, Eric Blake wrote: On 11/12/2012 10:49 AM, Peter Krempa wrote: This patch adds a helper to determine if snapshots are external and uses the helper to fix detection of those in snapshot deletion code. Snapshots are external if they have an external memory image or if the disk l

[libvirt] [PATCH 0/4] add more snapshot-list filters

2012-11-13 Thread Eric Blake
Depends on this patch being applied first: https://www.redhat.com/archives/libvir-list/2012-November/msg00598.html Adds the ability for virsh to filter on whether a snapshot was offline, online, or disk-only; and whether it was internal or external. Eric Blake (4): snapshot: add two more filter

[libvirt] [PATCH 2/4] snapshot: add virsh back-compat support for new filters

2012-11-13 Thread Eric Blake
Snapshot filtering based on types is useful enough to add back-compat support into virsh. It is also rather easy - all versions of libvirt that don't understand the new filter flags already gave us sufficient information in a single XML field to reconstruct all the information we need (that is, it

[libvirt] [PATCH 3/4] snapshot: expose location through virsh snapshot-info

2012-11-13 Thread Eric Blake
Now that we can filter on this information, we should also make it easy to get at. * tools/virsh-snapshot.c (cmdSnapshotInfo): Add another output row. --- tools/virsh-snapshot.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/tools/virsh-snaps

[libvirt] [PATCH 1/4] snapshot: add two more filter sets to API

2012-11-13 Thread Eric Blake
As we enable more modes of snapshot creation, it becomes more important to be able to quickly filter based on snapshot properties. This patch introduces new filter flags; subsequent patches will introduce virsh back-compat filtering, as well as actual libvirt filtering. * include/libvirt/libvirt.

[libvirt] [PATCH 4/4] snapshot: implement new filter sets

2012-11-13 Thread Eric Blake
Relatively straight-forward. And since qemu was already using VIR_DOMAIN_SNAPSHOT_FILTERS_ALL, with 6 different APIs all calling into this common code, I've instantly added all 5 flags to 6 APIs. * src/conf/snapshot_conf.h (VIR_DOMAIN_SNAPSHOT_FILTERS_ALL): Enable new filters. * src/conf/snapshot

Re: [libvirt] [PATCHv3 2/5] snapshot: qemu: Fix detection of external snapshots when deleting

2012-11-13 Thread Eric Blake
On 11/12/2012 10:49 AM, Peter Krempa wrote: > This patch adds a helper to determine if snapshots are external and uses > the helper to fix detection of those in snapshot deletion code. > > Snapshots are external if they have an external memory image or if the > disk locations are external. As mixe

Re: [libvirt] [libvirt-glib] Add gvir_domain_update_device() and enums needed for it

2012-11-13 Thread Christophe Fergeau
On Tue, Nov 13, 2012 at 07:22:35PM +0100, Zeeshan Ali (Khattak) wrote: > On Tue, Nov 13, 2012 at 7:10 PM, Alexander Larsson wrote: > > This is a wrapper for virDomainUpdateDeviceFlags. > > Looks good. ACK. > > > diff --git a/libvirt-gobject/libvirt-gobject.sym > > b/libvirt-gobject/libvirt-gobj

Re: [libvirt] [libvirt-glib] Add gvir_domain_update_device() and enums needed for it

2012-11-13 Thread Zeeshan Ali (Khattak)
On Tue, Nov 13, 2012 at 7:10 PM, Alexander Larsson wrote: > This is a wrapper for virDomainUpdateDeviceFlags. Looks good. ACK. > diff --git a/libvirt-gobject/libvirt-gobject.sym > b/libvirt-gobject/libvirt-gobject.sym > index 3a40a8a..2034e89 100644 > --- a/libvirt-gobject/libvirt-gobject.sym >

Re: [libvirt] [libvirt-glib 3/5] gobject: Fix handle leak on wrapper object creation

2012-11-13 Thread Zeeshan Ali (Khattak)
On Tue, Nov 13, 2012 at 6:30 PM, Christophe Fergeau wrote: > When creating an object wrapping a libvirt object (GVirDomain, > GVirStoragePool, GVirStorageVol), libvirt-gobject gets a reference > to a libvirt object to be used as a handle, and then creates the wrapper > object by calling g_object_n

[libvirt] [libvirt-glib] Add gvir_domain_update_device() and enums needed for it

2012-11-13 Thread Alexander Larsson
This is a wrapper for virDomainUpdateDeviceFlags. --- libvirt-gobject/libvirt-gobject-domain.c | 42 libvirt-gobject/libvirt-gobject-domain.h | 17 + libvirt-gobject/libvirt-gobject.sym | 7 ++ 3 files changed, 66 insertions(+) diff --git a/l

Re: [libvirt] [libvirt-glib 1/5] Don't call g_type_init on newer glib

2012-11-13 Thread Christophe Fergeau
On Tue, Nov 13, 2012 at 06:53:48PM +0100, Zeeshan Ali (Khattak) wrote: > On Tue, Nov 13, 2012 at 6:30 PM, Christophe Fergeau > wrote: > > diff --git a/libvirt-gconfig/tests/test-domain-parse.c > > b/libvirt-gconfig/tests/test-domain-parse.c > > index 11880de..33fc7be 100644 > > --- a/libvirt-gco

Re: [libvirt] [libvirt-glib] Introduce gvir_warning/gvir_critical

2012-11-13 Thread Zeeshan Ali (Khattak)
On Tue, Nov 6, 2012 at 1:41 PM, Christophe Fergeau wrote: > They are similar to g_warning/g_critical, but also log the last > libvirt error. They are meant to be called right after a libvirt > call failed, in other cases g_warning/g_critical are still to be > used. More detailed warnings/critical

Re: [libvirt] [libvirt-glib 2/5] gobject: Error out on NULL name in gvir_storage_pool_get_volume

2012-11-13 Thread Zeeshan Ali (Khattak)
On Tue, Nov 13, 2012 at 6:30 PM, Christophe Fergeau wrote: > Without this change, gvir_storage_pool_get_volume segfaults when > trying to do the hash table lookup with a NULL 'name' key. ACK -- Regards, Zeeshan Ali (Khattak) FSF member#5124 -- libvir-list mailing list libvir-list@redhat.com h

Re: [libvirt] [libvirt-glib 5/5] stream: Fix small error in gvir_stream_receive doc

2012-11-13 Thread Zeeshan Ali (Khattak)
On Tue, Nov 13, 2012 at 6:30 PM, Christophe Fergeau wrote: > --- ACK -- Regards, Zeeshan Ali (Khattak) FSF member#5124 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [libvirt-glib 1/5] Don't call g_type_init on newer glib

2012-11-13 Thread Zeeshan Ali (Khattak)
On Tue, Nov 13, 2012 at 6:30 PM, Christophe Fergeau wrote: > This function call is deprecated and calling it causes a compilation > warning. > --- > libvirt-gconfig/Makefile.am | 1 + > libvirt-gconfig/libvirt-gconfig-compat.h | 32 > +++ > libvirt-gco

Re: [libvirt] [libvirt-glib] gobject: Add gvir_storage_pool_get_{active, persistent}

2012-11-13 Thread Zeeshan Ali (Khattak)
On Tue, Nov 13, 2012 at 6:27 PM, Christophe Fergeau wrote: > --- > > This goes on top of the "[libvirt-glib 1/4] gobject: don't try to use > pool's volumes before a successful refresh" series. ACK. -- Regards, Zeeshan Ali (Khattak) FSF member#5124 -- libvir-list mailing list libvir-list@redha

Re: [libvirt] [libvirt-glib 1/4] gobject: don't try to use pool's volumes before a successful refresh

2012-11-13 Thread Zeeshan Ali (Khattak)
On Tue, Nov 6, 2012 at 1:45 PM, Christophe Fergeau wrote: > gvir_storage_pool_refresh must be called and must be successful before > trying to use gvir_storage_pool_get_volume, > gvir_storage_pool_get_volumes and gvir_storage_pool_create_volume. > As the storage pool refresh can fail for reasons e

[libvirt] [libvirt-glib 5/5] stream: Fix small error in gvir_stream_receive doc

2012-11-13 Thread Christophe Fergeau
--- libvirt-gobject/libvirt-gobject-stream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libvirt-gobject/libvirt-gobject-stream.c b/libvirt-gobject/libvirt-gobject-stream.c index f0e43d0..2cb8967 100644 --- a/libvirt-gobject/libvirt-gobject-stream.c +++ b/libvirt-gobject

[libvirt] [libvirt-glib 4/5] gobject: Fix GMutex leak

2012-11-13 Thread Christophe Fergeau
When GLib deprecated g_mutex_new/g_mutex_free, we introduced a compatibility wrapper to implement these using non-deprecated functions. This was done by allocating 0-filled memory by the mutex, and then letting GLib initialize the structure when needed. However, we must call g_mutex_clear when dest

[libvirt] [libvirt-glib 3/5] gobject: Fix handle leak on wrapper object creation

2012-11-13 Thread Christophe Fergeau
When creating an object wrapping a libvirt object (GVirDomain, GVirStoragePool, GVirStorageVol), libvirt-gobject gets a reference to a libvirt object to be used as a handle, and then creates the wrapper object by calling g_object_new(..., "handle", handle, NULL); However, the underlying libvirt ob

[libvirt] [libvirt-glib] miscellaneous fixes

2012-11-13 Thread Christophe Fergeau
This series does misc leak fixes in libvirt-glib, as well as an API doc fix, and a deprecation warning fix. Christophe -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [libvirt-glib 1/5] Don't call g_type_init on newer glib

2012-11-13 Thread Christophe Fergeau
This function call is deprecated and calling it causes a compilation warning. --- libvirt-gconfig/Makefile.am | 1 + libvirt-gconfig/libvirt-gconfig-compat.h | 32 +++ libvirt-gconfig/libvirt-gconfig-main.c| 1 + libvirt-gconfig/tests/test-domain-pa

[libvirt] [libvirt-glib 2/5] gobject: Error out on NULL name in gvir_storage_pool_get_volume

2012-11-13 Thread Christophe Fergeau
Without this change, gvir_storage_pool_get_volume segfaults when trying to do the hash table lookup with a NULL 'name' key. --- libvirt-gobject/libvirt-gobject-storage-pool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libvirt-gobject/libvirt-gobject-storage-pool.c b/libvirt-gobject/libvi

Re: [libvirt] [libvirt-glib 1/4] gobject: don't try to use pool's volumes before a successful refresh

2012-11-13 Thread Christophe Fergeau
Ping for these 4 patches? On Tue, Nov 06, 2012 at 01:45:12PM +0100, Christophe Fergeau wrote: > gvir_storage_pool_refresh must be called and must be successful before > trying to use gvir_storage_pool_get_volume, > gvir_storage_pool_get_volumes and gvir_storage_pool_create_volume. > As the storage

[libvirt] [libvirt-glib] gobject: Add gvir_storage_pool_get_{active, persistent}

2012-11-13 Thread Christophe Fergeau
--- This goes on top of the "[libvirt-glib 1/4] gobject: don't try to use pool's volumes before a successful refresh" series. Christophe libvirt-gobject/libvirt-gobject-storage-pool.c | 15 +++ libvirt-gobject/libvirt-gobject-storage-pool.h | 2 ++ libvirt-gobject/libvirt-gobject.s

Re: [libvirt] [libvirt-glib] Introduce gvir_warning/gvir_critical

2012-11-13 Thread Christophe Fergeau
Ping? Christophe On Tue, Nov 06, 2012 at 01:41:01PM +0100, Christophe Fergeau wrote: > They are similar to g_warning/g_critical, but also log the last > libvirt error. They are meant to be called right after a libvirt > call failed, in other cases g_warning/g_critical are still to be > used. > --

Re: [libvirt] [PATCHv3 4/5] snapshot: Add flag to allow hypervisor restart when reverting snapshots

2012-11-13 Thread Peter Krempa
On 11/12/12 18:49, Peter Krempa wrote: Some hypervisors require a respawn of the hypervisor to allow reverting to some snapshot states. This patch adds flag to remove the default safe approach to not allow this. When this flag is specified the hypervisor driver should re-emit events to allow mana

Re: [libvirt] [RFC PATCH 1/n] snapshot: add revert-and-create branching of external snapshots

2012-11-13 Thread Peter Krempa
On 11/09/12 05:47, Eric Blake wrote: Right now, libvirt refuses to revert to the state at the time of an external snapshot, because doing so would reset things so that the next time the domain boots, we are using the backing file; but modifying the backing file invalidates all qcow2 files that ar

[libvirt] [v0.10.2-maint][PATCH] qemu: Always format CPU topology

2012-11-13 Thread Michal Privoznik
From: Jiri Denemark When libvirt cannot find a suitable CPU model for host CPU (easily reproducible by running libvirt in a guest), it would not provide CPU topology in capabilities XML either. Even though CPU topology is known and can be queried by virNodeGetInfo. With this patch, CPU topology w

Re: [libvirt] [PATCH 0/5] VirtualBox version 4.2 support for libvirt vbox driver

2012-11-13 Thread Peter Krempa
On 11/12/12 18:03, Nedko Arnaudov wrote: I've tried the patches (kindly applied by pkrempa to a virtualbox-4.2 git branch) against latest master and I was able to control machines through virsh and virt-manager. I cannot open machines in virt-manager but this is probably a virt-manager bug. I get

Re: [libvirt] [PATCH 0/5] VirtualBox version 4.2 support for libvirt vbox driver

2012-11-13 Thread Peter Krempa
On 10/02/12 11:00, ryan woodsmall wrote: This patch set adds VirtualBox 4.2 initial support for the libvirt vbox driver. I've tested enough to check capabilities, create a VM, destroy it, etc. Five patches total: - Patch 1 is the C API header file from Oracle, cleaned up for libvirt. - Patch 2 i

[libvirt] [PATCHv3 3/4] python: Use virNodeGetCPUMap where possible

2012-11-13 Thread Viktor Mihajlovski
Modified the places where virNodeGetInfo was used for the purpose of obtaining the maximum node CPU number. Transparently falling back to virNodeGetInfo in case of failure. Wrote a utility function getPyNodeCPUCount for that purpose. Signed-off-by: Viktor Mihajlovski --- V2 Changes: Implemented E

[libvirt] [PATCHv3 2/4] qemu, lxc: Change host CPU number detection logic.

2012-11-13 Thread Viktor Mihajlovski
The drivers for QEMU and LXC use virNodeGetInfo only to determine the number of host CPUs. On Linux hosts nodeGetCPUCount has less overhead. --- V3 Changes: Commit message wording, since Peter's fix, nodeGetInfo will return correct/consistent topology. Still, this here is more efficient. V2 Change

[libvirt] [PATCHv3 0/4] Use nodeGetCPUCount/virNodeGetCPUMap where appropriate

2012-11-13 Thread Viktor Mihajlovski
This series concludes the introduction of the virNodeGetCPUMap API by replacing the usage of virNodeGetInfo for computing the maximum number of node CPUs with either nodeGetCPUCount or virNodeGetCPUMap. It's basically a resend of the original 3-patch series plus the nodeGetCPUCount fix. Event in t

[libvirt] [PATCHv3 1/4] nodeinfo: enable nodeGetCPUCount for older kernels

2012-11-13 Thread Viktor Mihajlovski
Since /sys/devices/system/cpu/present is not available on older kernels like on RHEL 5.x nodeGetCPUCount will fail there. The fallback implemented is to scan for /sys/devices/system/cpu/cpuNN entries. Signed-off-by: Viktor Mihajlovski --- src/nodeinfo.c | 33 - 1

[libvirt] [PATCHv3 4/4] virsh: Use virNodeGetCPUMap if possible

2012-11-13 Thread Viktor Mihajlovski
Modified the places where virNodeGetInfo was used for the purpose of obtaining the maximum node CPU number. Transparently falling back to virNodeGetInfo in case of failure. Wrote utility function vshNodeGetCPUCount to compute node CPU number. Signed-off-by: Viktor Mihajlovski --- V2 Changes: Impl

Re: [libvirt] [PATCH] tests: Fix qemumonitorjsontest deadlock when the machine is under load

2012-11-13 Thread Peter Krempa
On 11/13/12 01:07, Eric Blake wrote: On 11/12/2012 03:40 AM, Peter Krempa wrote: When doing the qemumonitorjsontest on a machine under heavy load the test tends to deadlock from time to time. This patch adds the hack to break the event loop that is used in virsh. Thanks for fixing this; I have

Re: [libvirt] [PATCH] tests: Remove temporary directories in qemumonitorjsontest

2012-11-13 Thread Peter Krempa
On 11/12/12 23:27, Eric Blake wrote: On 11/12/2012 07:38 AM, Peter Krempa wrote: qemumonitorjsontest creates a temporary directory to hold the socket that is simulating the monitor socket. The directory containing the socket wasn't disposed properly at the end of the test leaving garbage in the