Re: [libvirt] [PATCH v11] support offline migration

2012-10-23 Thread li guang
ping ... 在 2012-10-18四的 08:42 +0800,liguang写道: original migration did not aware of offline case, so, try to support offline migration quietly (did not disturb original migration) by pass VIR_MIGRATE_OFFLINE flag to migration APIs if only the domain is really inactive, and migration process

[libvirt] [PATCH v4 1/6] add a configure option --with-fuse to prepare introduction of fuse support for libvirt lxc

2012-10-23 Thread Gao feng
add a configure option --with-fuse to prepare introduction of fuse support for libvirt lxc. With help from Daniel Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- configure.ac| 36 libvirt.spec.in |9 + 2 files changed, 45 insertions(+),

[libvirt] [PATCH v4 3/6] add interface virCgroupGetMemSwapUsage

2012-10-23 Thread Gao feng
virCgroupGetMemSwapUsage is used to get container's swap usage, with this interface,we can get swap usage in fuse filesystem. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/libvirt_private.syms |1 + src/util/cgroup.c| 20 src/util/cgroup.h|

[libvirt] [PATCH v4 4/6] add interface virCgroupGetAppRoot

2012-10-23 Thread Gao feng
because libvirt_lxc's cgroup mountpoint is what it shown in /proc/self/cgroup. we can get container's cgroup through virCgroupNew(/, group), add interface virCgroupGetAppRoot to help container to get it's cgroup. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/libvirt_private.syms |1

[libvirt] [PATCH v4 5/6] make /proc/meminfo isolate with host through fuse

2012-10-23 Thread Gao feng
with this patch,container's meminfo will be shown based on containers' mem cgroup. Right now,it's impossible to virtualize all values in meminfo, I collect some values such as MemTotal,MemFree,Cached,Active, Inactive,Active(anon),Inactive(anon),Active(file),Inactive(anon),

[libvirt] [PATCH v4 6/6] Mount fuse's meminfo file to container's /proc/meminfo

2012-10-23 Thread Gao feng
we already have virtualize meminfo for container through fuse filesystem, add function lxcContainerMountProcFuse to mount this meminfo file to the container's /proc/meminfo. So we can isolate container's /proc/meminfo from host now. Signed-off-by: Gao feng gaof...@cn.fujitsu.com ---

[libvirt] [PATCH v4 2/6] add fuse support for libvirt lxc

2012-10-23 Thread Gao feng
this patch addes fuse support for libvirt lxc. we can use fuse filesystem to generate sysinfo dynamically, So we can isolate /proc/meminfo,cpuinfo and so on through fuse filesystem. we mount fuse filesystem for every container.the mount name is Lxc-containename-fuse,mount point is

Re: [libvirt] [PATCH] build: use correct printf types for uid/gid

2012-10-23 Thread Michal Privoznik
On 22.10.2012 22:49, Eric Blake wrote: Fixes a build failure on cygwin: cc1: warnings being treated as errors security/security_dac.c: In function 'virSecurityDACSetProcessLabel': security/security_dac.c:862:5: error: format '%u' expects type 'unsigned int', but argument 7 has type 'uid_t'

[libvirt] [PATCH] qemu: Report errors from iohelper

2012-10-23 Thread Michal Privoznik
Currently, we use iohelper when saving/restoring a domain. However, if there's some kind of error (like I/O) it is not propagated to libvirt. Since it is not qemu who is doing the actual write() it will not get error. The iohelper does. Therefore we should check for iohelper errors as it makes

[libvirt] [PATCH] docs: Add detailed notes snapshots, blockcommit, blockpull

2012-10-23 Thread Kashyap Chamarthy
More elaborate notes on snapshots, blockpull, blockcommit. Much of this is derived from various dicussions with Eric Blake, Jeff Cody, Kevin Wolf (thanks a lot!) several others on IRC and mailing lists and a lot of adhoc testing. I didn't wanted this to get lost. I also plan to add notes for

Re: [libvirt] [PATCHv2] Fix disabling of apparmor/selinux security drivers

2012-10-23 Thread Christophe Fergeau
On Mon, Oct 22, 2012 at 02:59:14PM -0600, Eric Blake wrote: On 10/22/2012 03:49 AM, Christophe Fergeau wrote: When using --without-$name --without-secdriver-$name with $name being selinux or apparmor, configure will fail saying that AppArmor/SELinux development package must be installed.

Re: [libvirt] [PATCH] selinux: Don't fail RestoreAll if file doesn't have a default label

2012-10-23 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/22/2012 04:13 PM, Cole Robinson wrote: On 10/22/2012 11:51 AM, Eric Blake wrote: On 10/21/2012 02:44 PM, Cole Robinson wrote: When restoring selinux labels after a VM is stopped, any non-standard path that doesn't have a default selinux

Re: [libvirt] [PATCH] selinux: Don't fail RestoreAll if file doesn't have a default label

2012-10-23 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/22/2012 04:13 PM, Cole Robinson wrote: On 10/22/2012 11:51 AM, Eric Blake wrote: On 10/21/2012 02:44 PM, Cole Robinson wrote: When restoring selinux labels after a VM is stopped, any non-standard path that doesn't have a default selinux

[libvirt] [PATCH] storage: don't shadow global 'wait' declaration

2012-10-23 Thread Ján Tomko
Rename the 'wait' parameter to 'loop'. This silences the warning: storage/storage_backend.c:1348:34: error: declaration of 'wait' shadows a global declaration [-Werror=shadow] and fixes the build with -Werror. -- Note: loop is pool backwards. --- src/storage/storage_backend.c |8

Re: [libvirt] [PATCH] storage: don't shadow global 'wait' declaration

2012-10-23 Thread Peter Krempa
On 10/23/12 13:33, Ján Tomko wrote: Rename the 'wait' parameter to 'loop'. This silences the warning: storage/storage_backend.c:1348:34: error: declaration of 'wait' shadows a global declaration [-Werror=shadow] and fixes the build with -Werror. -- Note: loop is pool backwards. ---

Re: [libvirt] [PATCHv4 3/3] qemu_migration: Transport OVS per-port data during live migration

2012-10-23 Thread Michal Privoznik
On 22.10.2012 23:30, Laine Stump wrote: From: Kyle Mestery kmest...@cisco.com Transport Open vSwitch per-port data during live migration by using the utility functions virNetDevOpenvswitchGetMigrateData() and virNetDevOpenvswitchSetMigrateData(). Signed-off-by: Kyle Mestery

Re: [libvirt] [PATCHv4 1/3] qemu_migration: Add hooks to transport network data during migration

2012-10-23 Thread Michal Privoznik
On 22.10.2012 23:30, Laine Stump wrote: From: Kyle Mestery kmest...@cisco.com Add the ability for the Qemu V3 migration protocol to include transporting network configuration. A generic framework is proposed with this patch to allow for the transfer of opaque data. Signed-off-by: Kyle

Re: [libvirt] [PATCHv4 2/3] openvswitch: Add utility functions for getting and setting Open vSwitch per-port data

2012-10-23 Thread Michal Privoznik
On 22.10.2012 23:30, Laine Stump wrote: From: Kyle Mestery kmest...@cisco.com Add utility functions for Open vSwitch to both save per-port data before a live migration, and restore the per-port data after a live migration. Signed-off-by: Kyle Mestery kmest...@cisco.com ---

[libvirt] [PATCH] xml: omit domain name from comment if it contains double hyphen

2012-10-23 Thread Ján Tomko
We put a comment containing virsh edit domain_name at the start of the XML. W3C recommendation forbids the use of -- in comments [1] and libvirt can't parse it either. This patch omits the domain name if it contains a double hyphen. [1] http://www.w3.org/TR/REC-xml/#sec-comments ---

Re: [libvirt] [PATCHv4 2/3] openvswitch: Add utility functions for getting and setting Open vSwitch per-port data

2012-10-23 Thread Michal Privoznik
On 23.10.2012 14:07, Michal Privoznik wrote: On 22.10.2012 23:30, Laine Stump wrote: From: Kyle Mestery kmest...@cisco.com +/** + * virNetDevOpenvswitchSetMigrateData: + * @migrate: the data which was transferred during migration + * @ifname: the name of the interface the data is associated

Re: [libvirt] [PATCH] xml: omit domain name from comment if it contains double hyphen

2012-10-23 Thread Michal Privoznik
On 23.10.2012 14:16, Ján Tomko wrote: We put a comment containing virsh edit domain_name at the start of the XML. W3C recommendation forbids the use of -- in comments [1] and libvirt can't parse it either. This patch omits the domain name if it contains a double hyphen. [1]

[libvirt] [PATCH v2] put dnsmasq parameters into a file instead of the command line

2012-10-23 Thread Gene Czarcinski
This patch changes the way parameters are passed to dnsmasq. They are put into a conf-file instead of being on the dnsmasq command line. **NOTE ** This has updated the related tests for the new data format, etc. **NOTE** This patch does NOT include specifying interface= The command line now

Re: [libvirt] [PATCH v2] put dnsmasq parameters into a file instead of the command line

2012-10-23 Thread Michal Privoznik
On 23.10.2012 14:25, Gene Czarcinski wrote: This patch changes the way parameters are passed to dnsmasq. They are put into a conf-file instead of being on the dnsmasq command line. **NOTE ** This has updated the related tests for the new data format, etc. **NOTE** This patch does NOT

Re: [libvirt] patch option needs clarification

2012-10-23 Thread Gene Czarcinski
On 10/22/2012 04:32 PM, Laine Stump wrote: On 10/22/2012 04:25 PM, Laine Stump wrote: On 10/22/2012 03:59 PM, Gene Czarcinski wrote: Oops. But then I am not sure how to do it. The new code changes everything. If you want, I can go back and remove it ... make yet-another-patch on top of the

[libvirt] Add device operations support for libvirt (lxc)

2012-10-23 Thread Heiher
Hello, Currently, libvirt is not support device operations for lxc. This is a patch that add device operations support for libvirt 0.10.2. 1. lxcDomainAttachDevice 2. lxcDomainAttachDeviceFlags 3. lxcDomainDetachDevice 4. lxcDomainDetachDeviceFlags 5. lxcDomainUpdateDeviceFlags In live mode,

[libvirt] Need new maintainer for libvirt on MacPorts

2012-10-23 Thread Justin Clift
Hi all, Is anyone up for being the new owner/maintainer for libvirt on OSX MacPorts? The MacPorts guys have pinged us, suggesting we update the libvirt port there to something recent: https://trac.macports.org/ticket/36691 I'm still very engaged on the Homebrew side, but have next to no

Re: [libvirt] [PATCH v2] put dnsmasq parameters into a file instead of the command line

2012-10-23 Thread Gene Czarcinski
On 10/23/2012 08:46 AM, Michal Privoznik wrote: This will downgrade the gnulib module Eric's just updated. You can avoid this by 'git submodule update'. It will disappear from 'git diff' then. I haven't look any closer on the pach itself. I keep learning more and more about using git. If I

Re: [libvirt] [PATCH v2] put dnsmasq parameters into a file instead of the command line

2012-10-23 Thread Michal Privoznik
On 23.10.2012 15:29, Gene Czarcinski wrote: On 10/23/2012 08:46 AM, Michal Privoznik wrote: This will downgrade the gnulib module Eric's just updated. You can avoid this by 'git submodule update'. It will disappear from 'git diff' then. I haven't look any closer on the pach itself. I keep

[libvirt] vbox hypervisor driver not found

2012-10-23 Thread p . venkatasrinivas
Hi, I installed Virtual box software in linux open suse. Unable to connect to the vbox hypervisor driver. Version-Release number of selected component (if applicable): libvirt-0.9.0 How reproducible: when i am giving the following command for virsh: virsh -connect vbox:///session then

[libvirt] vbox Hypervisor driver not found

2012-10-23 Thread p . venkatasrinivas
Hi, I installed Libvirt. We need virtualbox support for libvirt. But we are unable to see the vbox option in virt-manager. How we can find vbox hypervisor driver? And also we already compiled libvirt with vbox option.(--with-vbox). But that didn't work. And also when we are creating the

Re: [libvirt] [PATCH] build: use correct printf types for uid/gid

2012-10-23 Thread Eric Blake
On 10/23/2012 03:25 AM, Michal Privoznik wrote: -VIR_DEBUG(Dropping privileges of DEF to %u:%u, user, group); +VIR_DEBUG(Dropping privileges of DEF to %u:%u, + (unsigned int) user, (unsigned int) group); if (virSetUIDGID(user, group) 0) return -1; @@

Re: [libvirt] [PATCH] qemu: Report errors from iohelper

2012-10-23 Thread Eric Blake
On 10/23/2012 03:39 AM, Michal Privoznik wrote: Currently, we use iohelper when saving/restoring a domain. However, if there's some kind of error (like I/O) it is not propagated to libvirt. Since it is not qemu who is doing the actual write() it will not get error. The iohelper does.

Re: [libvirt] [PATCHv4 2/3] openvswitch: Add utility functions for getting and setting Open vSwitch per-port data

2012-10-23 Thread Eric Blake
On 10/23/2012 06:15 AM, Michal Privoznik wrote: +virBufferAsprintf(buf, external_ids:PortData=%s, migrate); + +cmd = virCommandNewArgList(OVSVSCTL, --timeout=5, set, Interface, ifname, + virBufferCurrentContent(buf), NULL); Again, if we ran OOM

Re: [libvirt] [PATCH] selinux: Don't fail RestoreAll if file doesn't have a default label

2012-10-23 Thread Cole Robinson
On 10/23/2012 06:56 AM, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/22/2012 04:13 PM, Cole Robinson wrote: On 10/22/2012 11:51 AM, Eric Blake wrote: On 10/21/2012 02:44 PM, Cole Robinson wrote: When restoring selinux labels after a VM is stopped, any

Re: [libvirt] [PATCH] selinux: Don't fail RestoreAll if file doesn't have a default label

2012-10-23 Thread Cole Robinson
On 10/22/2012 11:51 AM, Eric Blake wrote: On 10/21/2012 02:44 PM, Cole Robinson wrote: When restoring selinux labels after a VM is stopped, any non-standard path that doesn't have a default selinux label causes the process to stop and exit early. This isn't really an error condition IMO. Of

Re: [libvirt] [PATCH] nodeinfo: Add workaround if kernel reports bogous numa topology.

2012-10-23 Thread Eric Blake
On 10/23/2012 06:40 AM, Peter Krempa wrote: This patch adds a workaround for the cpu topology detection code if the kernel reports incorrect count of numa nodes or any other reason that might result in duplicate core ID's in one socket. Do we know what versions of kernels have this bug? If it

[libvirt] [PATCH 1/2] v3: put dnsmasq parameters into a file instead of the command line

2012-10-23 Thread Gene Czarcinski
This patch changes the way parameters are passed to dnsmasq. They are put into a conf-file instead of being on the dnsmasq command line. **NOTE ** This has updated the related tests for the new data format, etc. **NOTE** This patch does NOT include specifying interface= The command line now

[libvirt] [PATCH 05/20] qemu: Split out code to save domain memory to allow reuse

2012-10-23 Thread Peter Krempa
The code that saves domain memory by migration to file can be reused while doing external snapshots of a machine. This patch extracts the common code and places it in a separate function. --- src/qemu/qemu_driver.c | 225 - 1 file changed, 127

[libvirt] [PATCH 06/20] snapshot: Add flag to enable creating checkpoints in paused state

2012-10-23 Thread Peter Krempa
The default behavior while creating external checkpoints is to let the guest run while the memory state is caputred. This leads to a larger save file but minimizes the time needed to take the checkpoint. This patch adds a flag that causes the guest to be paused before taking the snapshot.

[libvirt] [PATCH 08/20] snapshot: qemu: Rename qemuDomainSnapshotCreateActive

2012-10-23 Thread Peter Krempa
By now, libvirt supported only internal snapshots for active guests. This patch renames this function to qemuDomainSnapshotCreateActiveInternal to prepare the grounds for external active snapshots. --- src/qemu/qemu_driver.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-)

[libvirt] [PATCH 11/20] qemu: snapshot: Clean up snapshot retrieval to use the new helper

2012-10-23 Thread Peter Krempa
Two other places were left with the old code to look up snapshots. Change them to use the snapshot lookup helper. --- src/qemu/qemu_driver.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 51b0391..287e2f8

[libvirt] [PATCH 07/20] snapshot: qemu: Add async job type for snapshots

2012-10-23 Thread Peter Krempa
The new external system checkpoints will require an async job while the snapshot is taken. This patch adds QEMU_ASYNC_JOB_SNAPSHOT to track this job type. --- src/qemu/qemu_domain.c | 3 +++ src/qemu/qemu_domain.h | 1 + src/qemu/qemu_process.c | 19 +++ 3 files changed, 23

[libvirt] [PATCH 09/20] snapshot: qemu: Add support for external checkpoints

2012-10-23 Thread Peter Krempa
This patch adds support to take external system checkpoints. The functionality is layered on top of the previous disk-only snapshot code. When the checkpoint is requested the domain memory is saved to the memory image file using live migration to file. (The user may specify to do take the memory

Re: [libvirt] [PATCH] qemu: Report errors from iohelper

2012-10-23 Thread Michal Privoznik
On 23.10.2012 16:51, Eric Blake wrote: On 10/23/2012 03:39 AM, Michal Privoznik wrote: Currently, we use iohelper when saving/restoring a domain. However, if there's some kind of error (like I/O) it is not propagated to libvirt. Since it is not qemu who is doing the actual write() it will not

[libvirt] [PATCH 2/2] v3: add dnsmasq interface= parameter so bind-interfaces works

2012-10-23 Thread Gene Czarcinski
The problem is that, without interface=, bind-interfaces does not work. Bind-interfaces uses SO_BINDTODEVICE. Unless this in in effect, there is no guarantee that the kernel will route DHCP (v4 or v6) packets to the correct instance of dnsmasq, when there is more than one. **NOTE** This patch

[libvirt] [PATCH 04/20] snapshot: merge pre-snapshot checks

2012-10-23 Thread Peter Krempa
From: Eric Blake ebl...@redhat.com Both system checkpoint snapshots and disk snapshots were iterating over all disks, doing a final sanity check before doing any work. But since future patches will allow offline snapshots to be either external or internal, it makes sense to share the pass over

[libvirt] [PATCH 19/20] snapshot: qemu: Add support for external snapshot deletion.

2012-10-23 Thread Peter Krempa
This patch adds limited support for deleting external snaphots. The machine must not be active and only whole subtrees of snapshots can be deleted as reparenting was not yet implemented for external snapshots. --- src/qemu/qemu_domain.c | 122 ++---

[libvirt] [PATCH 10/20] snapshot: qemu: Remove restrictions preventing external snapshots

2012-10-23 Thread Peter Krempa
Some of the pre-snapshot check have restrictions wired in regarding configuration options that influence taking of external checkpoints. This patch removes restrictions that would inhibit taking of such a snapshot. --- src/qemu/qemu_driver.c | 27 --- 1 file changed, 12

[libvirt] [PATCH 03/20] snapshot: populate new XML info for qemu snapshots

2012-10-23 Thread Peter Krempa
From: Eric Blake ebl...@redhat.com Now that the XML supports listing internal snapshots, it is worth always populating the memory and disks element to match. * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML): Always parse disk info and set memory info. --- src/qemu/qemu_driver.c | 47

[libvirt] [PATCH 01/20] snapshot: new XML for external system checkpoint

2012-10-23 Thread Peter Krempa
From: Eric Blake ebl...@redhat.com Each domainsnapshot can now contain an optional memory element that describes how the VM state was handled, similar to disk snapshots. The new element will always appear in output; for back-compat, an input that lacks the element will assume 'no' or 'internal'

[libvirt] [PATCH 17/20] snapshot: qemu: Add detail option for PMSUSPENDED event.

2012-10-23 Thread Peter Krempa
This patch adds an event to be raised if a PM suspended guest is restored from a snapshot. --- examples/domain-events/events-c/event-test.c | 3 +++ include/libvirt/libvirt.h.in | 2 ++ 2 files changed, 5 insertions(+) diff --git a/examples/domain-events/events-c/event-test.c

[libvirt] [PATCH 16/20] conf: Add helper to determine if snapshot is external

2012-10-23 Thread Peter Krempa
Snapshots are external if they are disk snapshots or if they have an external memory image. Other possibilities are not supported (yet). --- src/conf/snapshot_conf.c | 11 +++ src/conf/snapshot_conf.h | 2 ++ src/libvirt_private.syms | 1 + 3 files changed, 14 insertions(+) diff --git

[libvirt] [PATCH 02/20] snapshot: improve disk align checking

2012-10-23 Thread Peter Krempa
From: Eric Blake ebl...@redhat.com There were not previous callers with require_match set to true. I originally implemented this bool with the intent of supporting ESX snapshot semantics, where the choice of internal vs. external vs. non-checkpointable must be made at domain start, but as ESX has

[libvirt] [PATCH 13/20] snapshot: qemu: Add flag VIR_DOMAIN_SNAPSHOT_REVERT_STOPPED

2012-10-23 Thread Peter Krempa
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. --- include/libvirt/libvirt.h.in | 1 + src/libvirt.c| 9 +

[libvirt] [PATCH 14/20] snapshot: qemu: Add support for external inactive snapshots

2012-10-23 Thread Peter Krempa
This patch adds support for external disk snapshots of inactive domains. The snapshot is created by calling qemu-img create -o backing_file=/path/to/disk /path/snapshot_file on each of the disks selected for snapshotting. --- src/qemu/qemu_driver.c | 108

[libvirt] [PATCH 18/20] snapshot: qemu: Fix detection of external snapshots when deleting

2012-10-23 Thread Peter Krempa
Only external disk snapshots were taken into account while checking if snapshot deletion is possible. This patch adds checking also for external checkpoint.s --- src/qemu/qemu_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH 0/2] v3: dnsmasq conf-file and interface= patches

2012-10-23 Thread Gene Czarcinski
I am sorry about the clutter with my multiple patch submissions. I am just trynig to get it right so that, the next time, I will not make so many stupid mistakes. Gene Czarcinski (2): v3: put dnsmasq parameters into a file instead of the command line v3: add dnsmasq interface= parameter so

[libvirt] [PATCH 20/20] snapshot: qemu: Implement reverting of external snapshots

2012-10-23 Thread Peter Krempa
This patch adds support for reverting of external snapshots. The support is somewhat limited yet (you can only revert to a snapshot that has no children or delete the children that would have their image chains invalidated). While reverting an external snapshot, the domain has to be taken offline

[libvirt] [PATCH 00/20] Support for external checkpoints

2012-10-23 Thread Peter Krempa
This set consists of multiple parts: The first 4 patches are a rebase of Eric's series to add external checkpoint support to the XML. I posted them as I had some conflicts to solve when rebasing them lately. Patches 5-10 are a re-send of my previously posted series to add ability to create

[libvirt] [PATCH 15/20] conf: Fix private symbols exported by files in conf

2012-10-23 Thread Peter Krempa
Some of the functions were moved to other files but the private symbol file wasn't tweaked to reflect that. --- src/libvirt_private.syms | 47 --- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/src/libvirt_private.syms

Re: [libvirt] RFC: advertising graphics support (vnc, spice, sdl)

2012-10-23 Thread Daniel P. Berrange
On Sun, Oct 21, 2012 at 04:26:39PM -0400, Cole Robinson wrote: On 10/19/2012 02:31 AM, Doug Goldstein wrote: Currently consumers of libvirt's APIs must assume/attempt to define a VM that uses spice, vnc, or sdl without knowing if the actual hypervisor supports it. Obviously my discussion is

[libvirt] [PATCH 12/20] qemu: Split out guts of qemuDomainSaveImageStartVM() to allow reuse

2012-10-23 Thread Peter Krempa
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. --- src/qemu/qemu_driver.c | 53 ++

Re: [libvirt] [PATCH 00/20] Support for external checkpoints

2012-10-23 Thread Peter Krempa
On 10/23/12 17:12, Peter Krempa wrote: This set consists of multiple parts: The first 4 patches are a rebase of Eric's series to add external checkpoint support to the XML. I posted them as I had some conflicts to solve when rebasing them lately. Patches 5-10 are a re-send of my previously

Re: [libvirt] [PATCH] xml: omit domain name from comment if it contains double hyphen

2012-10-23 Thread Daniel P. Berrange
On Tue, Oct 23, 2012 at 02:16:44PM +0200, Ján Tomko wrote: We put a comment containing virsh edit domain_name at the start of the XML. W3C recommendation forbids the use of -- in comments [1] and libvirt can't parse it either. This patch omits the domain name if it contains a double hyphen.

Re: [libvirt] [PATCH] qemu: Do not require hostuuid in migration cookie

2012-10-23 Thread Daniel P. Berrange
On Fri, Oct 19, 2012 at 04:31:44PM +0200, Jiri Denemark wrote: Having hostuuid in migration cookie is a nice bonus since it provides an easy way of detecting migration to the same host. However, requiring it breaks backward compatibility with older libvirt releases. Really ? I think I had the

Re: [libvirt] [PATCH v2 1/2] Qemu/Gluster: Add Gluster protocol as supported network disk formats.

2012-10-23 Thread Daniel P. Berrange
On Mon, Oct 22, 2012 at 05:05:19PM +0530, Harsh Bora wrote: On 10/05/2012 03:13 AM, Daniel P. Berrange wrote: On Thu, Oct 04, 2012 at 09:17:08PM +0530, Deepak C Shetty wrote: +virBufferAsprintf(opt, gluster+%s://, +

Re: [libvirt] [PATCH 1/2] Introduce a lock for libxl long-running api

2012-10-23 Thread Daniel P. Berrange
On Mon, Oct 22, 2012 at 04:22:53PM -0600, Jim Fehlig wrote: Bamvor Jian Zhang wrote: This patch introduce a lock for protecting the long-running api (save, dump, migration and so on) from the other api which may update the status of the virtual machine. Hi Bamvor, Thanks for the

Re: [libvirt] [PATCH v11] support offline migration

2012-10-23 Thread Daniel P. Berrange
On Thu, Oct 18, 2012 at 01:11:19AM -0500, Doug Goldstein wrote: On Wed, Oct 17, 2012 at 7:42 PM, liguang lig.f...@cn.fujitsu.com wrote: original migration did not aware of offline case, so, try to support offline migration quietly (did not disturb original migration) by pass

Re: [libvirt] [PATCH] nodeinfo: Add workaround if kernel reports bogous numa topology.

2012-10-23 Thread Peter Krempa
On 10/23/12 17:07, Eric Blake wrote: On 10/23/2012 06:40 AM, Peter Krempa wrote: This patch adds a workaround for the cpu topology detection code if the kernel reports incorrect count of numa nodes or any other reason that might result in duplicate core ID's in one socket. Do we know what

Re: [libvirt] [RFC] [PATCH v3 2/6] add fuse support for libvirt lxc

2012-10-23 Thread Daniel P. Berrange
On Thu, Oct 18, 2012 at 01:25:30PM +0800, Gao feng wrote: 于 2012年10月16日 20:23, Daniel P. Berrange 写道: On Mon, Oct 08, 2012 at 08:43:28AM +0800, Gao feng wrote: 于 2012年09月26日 02:37, Daniel P. Berrange 写道: On Tue, Sep 11, 2012 at 10:54:48AM +0800, Gao feng wrote: this patch addes fuse

Re: [libvirt] [PATCH] storage: don't shadow global 'wait' declaration

2012-10-23 Thread Cole Robinson
On 10/23/2012 07:33 AM, Ján Tomko wrote: Rename the 'wait' parameter to 'loop'. This silences the warning: storage/storage_backend.c:1348:34: error: declaration of 'wait' shadows a global declaration [-Werror=shadow] and fixes the build with -Werror. -- Note: loop is pool backwards. ---

Re: [libvirt] [PATCH] selinux: Don't fail RestoreAll if file doesn't have a default label

2012-10-23 Thread Eric Blake
On 10/23/2012 08:57 AM, Cole Robinson wrote: if (getContext(newpath, buf.st_mode, fcon) 0) { +/* Any user created path likely does not have a default label, + * which makes this an expected non error + */ VIR_WARN(cannot lookup default selinux label for

Re: [libvirt] [PATCH] qemu: Do not require hostuuid in migration cookie

2012-10-23 Thread Eric Blake
On 10/23/2012 09:22 AM, Daniel P. Berrange wrote: On Fri, Oct 19, 2012 at 04:31:44PM +0200, Jiri Denemark wrote: Having hostuuid in migration cookie is a nice bonus since it provides an easy way of detecting migration to the same host. However, requiring it breaks backward compatibility with

Re: [libvirt] [PATCH] selinux: Don't fail RestoreAll if file doesn't have a default label

2012-10-23 Thread Cole Robinson
On 10/23/2012 11:42 AM, Eric Blake wrote: On 10/23/2012 08:57 AM, Cole Robinson wrote: if (getContext(newpath, buf.st_mode, fcon) 0) { +/* Any user created path likely does not have a default label, + * which makes this an expected non error + */

Re: [libvirt] [PATCH 1/2] v3: put dnsmasq parameters into a file instead of the command line

2012-10-23 Thread Laine Stump
On 10/23/2012 11:07 AM, Gene Czarcinski wrote: This patch changes the way parameters are passed to dnsmasq. They are put into a conf-file instead of being on the dnsmasq command line. I was thinking about this last night after I learned from you that the conf file *isn't* reread when dnsmasq

Re: [libvirt] [PATCH] xml: omit domain name from comment if it contains double hyphen

2012-10-23 Thread Eric Blake
On 10/23/2012 09:31 AM, Daniel P. Berrange wrote: On Tue, Oct 23, 2012 at 02:16:44PM +0200, Ján Tomko wrote: We put a comment containing virsh edit domain_name at the start of the XML. W3C recommendation forbids the use of -- in comments [1] and libvirt can't parse it either. This patch omits

Re: [libvirt] Add device operations support for libvirt (lxc)

2012-10-23 Thread Cole Robinson
On 10/23/2012 08:53 AM, Heiher wrote: Hello, Currently, libvirt is not support device operations for lxc. This is a patch that add device operations support for libvirt 0.10.2. 1. lxcDomainAttachDevice 2. lxcDomainAttachDeviceFlags 3. lxcDomainDetachDevice 4. lxcDomainDetachDeviceFlags

Re: [libvirt] [PATCH] storage: don't shadow global 'wait' declaration

2012-10-23 Thread Eric Blake
On 10/23/2012 09:48 AM, Cole Robinson wrote: On 10/23/2012 07:33 AM, Ján Tomko wrote: Rename the 'wait' parameter to 'loop'. This silences the warning: storage/storage_backend.c:1348:34: error: declaration of 'wait' shadows a global declaration [-Werror=shadow] and fixes the build with

Re: [libvirt] [PATCHv4 1/3] qemu_migration: Add hooks to transport network data during migration

2012-10-23 Thread Laine Stump
On 10/23/2012 08:07 AM, Michal Privoznik wrote: On 22.10.2012 23:30, Laine Stump wrote: From: Kyle Mestery kmest...@cisco.com Add the ability for the Qemu V3 migration protocol to include transporting network configuration. A generic framework is proposed with this patch to allow for the

Re: [libvirt] [PATCH 2/2] Add lock in libxl api

2012-10-23 Thread Eric Blake
On 10/22/2012 05:10 PM, Jim Fehlig wrote: Bamvor Jian Zhang wrote: Add long-running jobs for save, dump. Add normal job for the api maybe modify the domain. Signed-off-by: Bamvor Jian Zhang bjzh...@suse.com + +if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) 0) +goto

Re: [libvirt] [PATCH] xml: omit domain name from comment if it contains double hyphen

2012-10-23 Thread Daniel P. Berrange
On Tue, Oct 23, 2012 at 09:59:42AM -0600, Eric Blake wrote: On 10/23/2012 09:31 AM, Daniel P. Berrange wrote: On Tue, Oct 23, 2012 at 02:16:44PM +0200, Ján Tomko wrote: We put a comment containing virsh edit domain_name at the start of the XML. W3C recommendation forbids the use of -- in

Re: [libvirt] [PATCHv4 1/3] qemu_migration: Add hooks to transport network data during migration

2012-10-23 Thread Laine Stump
On 10/23/2012 12:11 PM, Laine Stump wrote: On 10/23/2012 08:07 AM, Michal Privoznik wrote: On 22.10.2012 23:30, Laine Stump wrote: From: Kyle Mestery kmest...@cisco.com Add the ability for the Qemu V3 migration protocol to include transporting network configuration. A generic framework is

Re: [libvirt] [PATCH 1/2] v3: put dnsmasq parameters into a file instead of the command line

2012-10-23 Thread Gene Czarcinski
On 10/23/2012 12:01 PM, Laine Stump wrote: On 10/23/2012 11:07 AM, Gene Czarcinski wrote: This patch changes the way parameters are passed to dnsmasq. They are put into a conf-file instead of being on the dnsmasq command line. I was thinking about this last night after I learned from you that

Re: [libvirt] [PATCH 1/2] v3: put dnsmasq parameters into a file instead of the command line

2012-10-23 Thread Laine Stump
On 10/23/2012 12:57 PM, Gene Czarcinski wrote: On 10/23/2012 12:01 PM, Laine Stump wrote: On 10/23/2012 11:07 AM, Gene Czarcinski wrote: This patch changes the way parameters are passed to dnsmasq. They are put into a conf-file instead of being on the dnsmasq command line. I was thinking

[libvirt] [PATCHv5 0/3] Transport Open vSwitch per-port data during live migration

2012-10-23 Thread Laine Stump
In-Reply-To: This is an update (of an update :-) of Kyle Mestery's patch series v3 by the same name: https://www.redhat.com/archives/libvir-list/2012-October/msg00014.html I've updated it according to the comments in the review of patch 1/3 of that series:

[libvirt] [PATCHv5 1/3] qemu_migration: Add hooks to transport network data during migration

2012-10-23 Thread Laine Stump
From: Kyle Mestery kmest...@cisco.com Add the ability for the Qemu V3 migration protocol to include transporting network configuration. A generic framework is proposed with this patch to allow for the transfer of opaque data. Signed-off-by: Kyle Mestery kmest...@cisco.com Signed-off-by: Laine

[libvirt] [PATCH] Fix detection of Xen sysctl version 9

2012-10-23 Thread Jim Fehlig
In commit 371ddc98, I mistakenly added the check for sysctl version 9 after setting the hypercall version to 1, which will fail with error : xenHypervisorDoV1Op:967 : Unable to issue hypervisor ioctl 3166208: Function not implemented This check should be included along with the others that use

[libvirt] [PATCHv5 2/3] openvswitch: Add utility functions for getting and setting Open vSwitch per-port data

2012-10-23 Thread Laine Stump
From: Kyle Mestery kmest...@cisco.com Add utility functions for Open vSwitch to both save per-port data before a live migration, and restore the per-port data after a live migration. Signed-off-by: Kyle Mestery kmest...@cisco.com --- src/libvirt_private.syms| 2 ++

[libvirt] [PATCHv5 3/3] qemu_migration: Transport OVS per-port data during live migration

2012-10-23 Thread Laine Stump
From: Kyle Mestery kmest...@cisco.com Transport Open vSwitch per-port data during live migration by using the utility functions virNetDevOpenvswitchGetMigrateData() and virNetDevOpenvswitchSetMigrateData(). Signed-off-by: Kyle Mestery kmest...@cisco.com --- src/qemu/qemu_migration.c | 25

Re: [libvirt] [PATCHv4 0/3] Transport Open vSwitch per-port data during live migration

2012-10-23 Thread Laine Stump
On 10/22/2012 05:30 PM, Laine Stump wrote: This is an update of Kyle Mestery's patch series v3 by the same name: https://www.redhat.com/archives/libvir-list/2012-October/msg00014.html And I've just posted a new spin based on Michal and Eric's comments. Please test that version instead:

[libvirt] [PATCHv2 01/11] util: add VIR_(INSERT|DELETE)_ELEMENTS_N

2012-10-23 Thread Laine Stump
I noticed when writing the backend functions for virNetworkUpdate that I was repeating the same sequence of memmove, VIR_REALLOC, nXXX-- (and messed up the args to memmove at least once), and had seen the same sequence in a lot of other places, so I decided to write a couple utility

[libvirt] [PATCHv2 00/11] util: add VIR_(INSERT|DELETE)_ELEMENTS_N

2012-10-23 Thread Laine Stump
This is a repost of https://www.redhat.com/archives/libvir-list/2012-October/msg01080.html with PATCH 03/12 squashed into 01/12. There are no other changes. PATCH 01/11 defines a couple new macros/functions to simplify inserting/deleting items in the

Re: [libvirt] [PATCHv4 0/3] Transport Open vSwitch per-port data during live migration

2012-10-23 Thread Kyle Mestery (kmestery)
On Oct 23, 2012, at 12:37 PM, Laine Stump la...@laine.org wrote: On 10/22/2012 05:30 PM, Laine Stump wrote: This is an update of Kyle Mestery's patch series v3 by the same name: https://www.redhat.com/archives/libvir-list/2012-October/msg00014.html And I've just posted a new spin based on

[libvirt] [PATCHv2 04/11] conf: use VIR_DELETE_ELEMENTS_N to remove devices from domain lists

2012-10-23 Thread Laine Stump
--- src/conf/domain_conf.c | 68 +- 1 file changed, 6 insertions(+), 62 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index dda37fd..2a9dd80 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7830,19

[libvirt] [PATCHv2 08/11] util: use VIR_(APPEND|DELETE)_ELEMENTS_N for hardware device lists

2012-10-23 Thread Laine Stump
In both pci and usb cases, the count that held the size of the list was int so it had to be changed to size_t. --- src/util/hostusb.c | 24 ++-- src/util/pci.c | 30 +- 2 files changed, 15 insertions(+), 39 deletions(-) diff --git

[libvirt] [PATCHv2 05/11] xen: Use VIR_DELETE_ELEMENTS_N for disk/net devices

2012-10-23 Thread Laine Stump
The stock remove functions in domain_conf.c already use VIR_DELETE_ELEMENTS_N. This does the same in a xen file. FIXME: This should be modified to call the helper functions in domain_conf.c. --- src/xen/xm_internal.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff

[libvirt] [PATCHv2 03/11] conf: use VIR_(APPEND|DELETE)_ELEMENTS_N for vcpupin list

2012-10-23 Thread Laine Stump
nvcpupin was declared as int, as were the nvcpupin args in several functions. These were all changed to size_t. virDomainVcpuPinAdd() was leaking a cpumask if VIR_REALLOC_N failed. This is completely inconsequential (since the only reason for failure was OOM, so we would already be dead at this

[libvirt] [PATCHv2 06/11] xen: use VIR_DELETE_ELEMENTS_N for xen domain and watch lists

2012-10-23 Thread Laine Stump
Replaces memmove/VIR_REALLOC_N for xenUnifiedDomainList and XenStoreWatchList. --- src/xen/xen_driver.c | 14 +- src/xen/xen_driver.h | 4 ++-- src/xen/xen_inotify.c | 16 +++- src/xen/xs_internal.c | 14 ++ src/xen/xs_internal.h | 2 +- 5 files changed, 9

[libvirt] [PATCHv2 09/11] util: use VIR_DELETE_ELEMENTS_N for list of win32 waiting events

2012-10-23 Thread Laine Stump
--- src/util/threads-win32.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/util/threads-win32.c b/src/util/threads-win32.c index 142aa4f..cfeb1a0 100644 --- a/src/util/threads-win32.c +++ b/src/util/threads-win32.c @@ -1,7 +1,7 @@ /* * threads-win32.c:

[libvirt] [PATCHv2 02/11] conf: use VIR_(INSERT_DELETE)_ELEMENTS in virNetworkUpdate backend

2012-10-23 Thread Laine Stump
The already-written backend functions for virNetworkUpdate that add and delete items into lists within the a network were already debugged to work properly, but future such functions will use VIR_(INSERT|DELETE)_ELEMENTS_N instead, so these are changed for uniformity. --- src/conf/network_conf.c

  1   2   >