Re: [libvirt] [PATCH V8 3/6] add interface virCgroupGetMemSwapUsage

2012-11-12 Thread Richard W.M. Jones
On Mon, Nov 12, 2012 at 03:02:25PM +0800, Gao feng wrote: 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

Re: [libvirt] [PATCH V8 4/6] add interface virCgroupGetAppRoot

2012-11-12 Thread Richard W.M. Jones
On Mon, Nov 12, 2012 at 03:02:26PM +0800, Gao feng wrote: 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:

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

2012-11-12 Thread Richard W.M. Jones
On Mon, Nov 12, 2012 at 03:02:23PM +0800, Gao feng wrote: add a configure option --with-fuse to prepare introduction of fuse support for libvirt lxc. With help from Daniel and Richard. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- configure.ac| 29

Re: [libvirt] [PATCH V8 5/6] make /proc/meminfo isolate with host through fuse

2012-11-12 Thread Richard W.M. Jones
On Mon, Nov 12, 2012 at 03:02:27PM +0800, Gao feng wrote: +len = strlen(new_line); + +if (copied + len size) +len = size - copied; + +memcpy(buf + copied, new_line, len); +copied += len; +memset(line, 0, sizeof(line)); +if

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

2012-11-12 Thread Richard W.M. Jones
On Mon, Nov 12, 2012 at 03:02:24PM +0800, Gao feng wrote: 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

Re: [libvirt] [PATCH v2 3/3] qemu/qemu_command.c: fix indent of label

2012-11-12 Thread Jiri Denemark
On Sat, Nov 10, 2012 at 02:40:25 +0100, Alon Levy wrote: --- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a1a4523..02a28b3 100644 --- a/src/qemu/qemu_command.c +++

Re: [libvirt] [PATCH v2 1/3] qemu: refactor graphics code to not hardcode a single display

2012-11-12 Thread Jiri Denemark
On Sat, Nov 10, 2012 at 02:40:23 +0100, Alon Levy wrote: The check for a single display remains so no new functionality is added. --- v2 changes: removed enum, use virReportOOMError directly. use --patience added a one line label fix patch. The second patch changes a string that needs

Re: [libvirt] [PATCH v2 2/3] qemu: graphics support for simultaneous one of each sdl, vnc, spice

2012-11-12 Thread Jiri Denemark
On Sat, Nov 10, 2012 at 02:40:24 +0100, Alon Levy wrote: --- src/qemu/qemu_command.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index ba99c7a..a1a4523 100644 --- a/src/qemu/qemu_command.c

Re: [libvirt] [PATCH V8 5/6] make /proc/meminfo isolate with host through fuse

2012-11-12 Thread Gao feng
于 2012年11月12日 16:48, Richard W.M. Jones 写道: On Mon, Nov 12, 2012 at 03:02:27PM +0800, Gao feng wrote: +len = strlen(new_line); + +if (copied + len size) +len = size - copied; + +memcpy(buf + copied, new_line, len); +copied += len; +

[libvirt] [PATCH]Support virtio-scsi disk XML with tag 'model'

2012-11-12 Thread Chen Hanxiao
From: ChenHanxiao chenhanx...@cn.fujitsu.com If we add a virtio-disk, we need to add a SCSI controller with model 'virtio-scsi'. This patch allows libvirt to analyze disks XML with tag 'model': disk type='block' device='disk' driver name='qemu' type='raw'/ source dev='/dev/sdb'/

Re: [libvirt] [PATCH v2 2/3] qemu: graphics support for simultaneous one of each sdl, vnc, spice

2012-11-12 Thread Jiri Denemark
On Sat, Nov 10, 2012 at 15:20:24 +0100, Jiri Denemark wrote: On Sat, Nov 10, 2012 at 02:40:24 +0100, Alon Levy wrote: ACK with that removed. Actually, the ACK might have been a bit premature? What QEMU version is needed to support multiple graphics devices? And what happens if we try to use

Re: [libvirt] [PATCH v2] qemu: Allow migration to be cancelled at prepare phase

2012-11-12 Thread Jiri Denemark
On Thu, Nov 08, 2012 at 14:53:31 +0100, Michal Privoznik wrote: Currently, if user calls virDomainAbortJob we just issue 'migrate_cancel' and hope for the best. However, if user calls the API in wrong phase when migration hasn't been started yet (perform phase) the cancel request is just

Re: [libvirt] [PATCH v2 1/3] qemu: refactor graphics code to not hardcode a single display

2012-11-12 Thread Alon Levy
[snip] I'd prefer if the refactoring of qemuBuildCommandLine was separated from removing the limit for number of graphics cards. But since I already reviewed the patch and I don't want to do that again, I'm giving a formal ACK to this version (with the small issues fixed, of course).

Re: [libvirt] [PATCH v2] qemu: Allow migration to be cancelled at prepare phase

2012-11-12 Thread Michal Privoznik
On 12.11.2012 10:35, Jiri Denemark wrote: On Thu, Nov 08, 2012 at 14:53:31 +0100, Michal Privoznik wrote: Currently, if user calls virDomainAbortJob we just issue 'migrate_cancel' and hope for the best. However, if user calls the API in wrong phase when migration hasn't been started yet

Re: [libvirt] [PATCH v2 2/3] qemu: graphics support for simultaneous one of each sdl, vnc, spice

2012-11-12 Thread Daniel P. Berrange
On Mon, Nov 12, 2012 at 10:23:18AM +0100, Jiri Denemark wrote: On Sat, Nov 10, 2012 at 15:20:24 +0100, Jiri Denemark wrote: On Sat, Nov 10, 2012 at 02:40:24 +0100, Alon Levy wrote: ACK with that removed. Actually, the ACK might have been a bit premature? What QEMU version is needed to

Re: [libvirt] [PATCH]Support virtio-scsi disk XML with tag 'model'

2012-11-12 Thread Daniel P. Berrange
On Mon, Nov 12, 2012 at 05:18:41PM +0800, Chen Hanxiao wrote: From: ChenHanxiao chenhanx...@cn.fujitsu.com If we add a virtio-disk, we need to add a SCSI controller with model 'virtio-scsi'. This patch allows libvirt to analyze disks XML with tag 'model': disk type='block' device='disk'

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

2012-11-12 Thread Peter Krempa
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. --- tests/qemumonitortestutils.c | 13 + 1 file changed, 13 insertions(+) diff --git

Re: [libvirt] [PATCH v2 2/3] qemu: graphics support for simultaneous one of each sdl, vnc, spice

2012-11-12 Thread Alon Levy
On Sat, Nov 10, 2012 at 15:20:24 +0100, Jiri Denemark wrote: On Sat, Nov 10, 2012 at 02:40:24 +0100, Alon Levy wrote: ACK with that removed. Actually, the ACK might have been a bit premature? What QEMU version is needed to support multiple graphics devices? And what happens if we try

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

2012-11-12 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),

Re: [libvirt] [PATCH RESEND V8 5/6] make /proc/meminfo isolate with host through fuse

2012-11-12 Thread Richard W.M. Jones
On Mon, Nov 12, 2012 at 07:52:01PM +0800, Gao feng wrote: 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,

Re: [libvirt] [Qemu-devel] qemu-kvm not listed by command virsh list --all

2012-11-12 Thread Stefan Hajnoczi
On Mon, Nov 12, 2012 at 9:01 AM, Peter Cheung mcheun...@hotmail.com wrote: Dear All Run a VM by qemu-kvm, and then i cannot list it by command virsh list --all. Why? I am sure the VM is running because i can vnc to it. Libvirt does not manage qemu-kvm processes that were started outside

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

2012-11-12 Thread Peter Krempa
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 temporary folder. --- tests/qemumonitortestutils.c | 60

Re: [libvirt] [PATCHv2 1/3] nodeinfo: Add check and workaround to guarantee valid cpu topologies

2012-11-12 Thread Peter Krempa
On 11/09/12 10:58, Peter Krempa wrote: Lately there were a few reports of the output of the virsh nodeinfo command being inaccurate. This patch tries to avoid that by checking if the topology actually makes sense. If it doesn't we then report a synthetic topology that indicates to the user that

[libvirt] [PATCH] sanlock: Retry after EINPROGRESS

2012-11-12 Thread Michal Privoznik
It may take some time for sanlock to add a lockspace. And if user restart libvirtd service meanwhile, the fresh daemon can fail adding the same lockspace with EINPROGRESS. Hence, we should retry a few times before claiming an error. This issue can be easily reproduced: for i in {1..1000} ; do

[libvirt] [PATCH v2 0/3] storage: allow metadata preallocation when creating qcow2 images

2012-11-12 Thread Ján Tomko
Add support for preallocating metadata when creating qcow2 images. Diff to V1: * A flag for virStorageVolCreateXML and virStorageVolCreateXMLFrom is used instead of guessing from the allocation element. * The flag is exposed and documented in virsh. Ján Tomko (3): storage: add a flag for

[libvirt] [PATCH v2 3/3] virsh: allow metadata preallocation when creating volumes

2012-11-12 Thread Ján Tomko
Add --prealloc-metadata flag to these commands: vol-clone vol-create vol-create-as vol-create-from --- tools/virsh-volume.c | 25 + tools/virsh.pod | 11 --- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/tools/virsh-volume.c

[libvirt] [PATCH v2 2/3] storage: allow metadata preallocation for qcow2 images

2012-11-12 Thread Ján Tomko
Metadata preallocation is supported both for creating new images or converting existing ones. Bug: https://bugzilla.redhat.com/show_bug.cgi?id=684793 --- src/storage/storage_backend.c | 46 1 files changed, 32 insertions(+), 14 deletions(-) diff --git

[libvirt] [PATCH v2 1/3] storage: add a flag for metadata preallocation to VolCreate

2012-11-12 Thread Ján Tomko
--- include/libvirt/libvirt.h.in |4 src/libvirt.c|4 ++-- src/storage/storage_backend.h|3 ++- src/storage/storage_backend_fs.c | 16 ++-- src/storage/storage_driver.c |6 +++--- 5 files changed, 21 insertions(+), 12 deletions(-)

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

2012-11-12 Thread Michal Privoznik
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(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1e96982..440fd62 100644 ---

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

2012-11-12 Thread Nedko Arnaudov
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: Error launching details:

[libvirt] [PATCHv3 0/5] Add initial support for reverting snapshots

2012-11-12 Thread Peter Krempa
This series adds basic support for reverting to a snapshot. For more advanced support we need the creation of snapshot branches. As of now, we will be able just to invalidate the snapshot tree from the point we're reverting to. I'll follow up with patches that add ability to delete children

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

2012-11-12 Thread Peter Krempa
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 mixed snapshots are forbidden for now we need to check

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

2012-11-12 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. --- Previous version ACKed. Just a repost. --- src/qemu/qemu_driver.c | 53

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

2012-11-12 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. --- - fixed libvirt.c and virsh.pod docs. --- include/libvirt/libvirt.h.in | 1 +

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

2012-11-12 Thread Peter Krempa
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 management apps to reconnect. This flag is

Re: [libvirt] [PATCH 1/6] v6-6: put dnsmasq parameters into a file

2012-11-12 Thread Laine Stump
On 11/09/2012 08:39 AM, Gene Czarcinski wrote: On 11/09/2012 07:36 AM, Guido Günther wrote: On Thu, Nov 08, 2012 at 04:13:41PM -0500, Gene Czarcinski wrote: This patch changes how parameters are passed to dnsmasq. Instead of being on the command line, the parameters are put into a file (one

[libvirt] [PATCHv3 5/5] snapshot: qemu: Implement reverting of external snapshots

2012-11-12 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

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

2012-11-12 Thread Eric Blake
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 temporary folder. ---

Re: [libvirt] [PATCHv2 1/3] nodeinfo: Add check and workaround to guarantee valid cpu topologies

2012-11-12 Thread Eric Blake
On 11/09/2012 02:58 AM, Peter Krempa wrote: Lately there were a few reports of the output of the virsh nodeinfo command being inaccurate. This patch tries to avoid that by checking if the topology actually makes sense. If it doesn't we then report a synthetic topology that indicates to the

Re: [libvirt] [PATCH] sanlock: Retry after EINPROGRESS

2012-11-12 Thread Eric Blake
On 11/12/2012 09:01 AM, Michal Privoznik wrote: It may take some time for sanlock to add a lockspace. And if user restart libvirtd service meanwhile, the fresh daemon can fail adding the same lockspace with EINPROGRESS. Hence, we should retry a few times before claiming an error. This issue

Re: [libvirt] [PATCHv2 1/3] nodeinfo: Add check and workaround to guarantee valid cpu topologies

2012-11-12 Thread Peter Krempa
On 11/12/12 23:31, Eric Blake wrote: On 11/09/2012 02:58 AM, Peter Krempa wrote: Lately there were a few reports of the output of the virsh nodeinfo command being inaccurate. This patch tries to avoid that by checking if the topology actually makes sense. If it doesn't we then report a

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

2012-11-12 Thread Eric Blake
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 definitely been hitting it. ---

Re: [libvirt] [PATCH]Support virtio-scsi disk XML with tag 'model'

2012-11-12 Thread Chen HanXiao
-Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Monday, November 12, 2012 6:31 PM To: Chen Hanxiao Cc: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH]Support virtio-scsi disk XML with tag 'model' On Mon, Nov 12, 2012 at 05:18:41PM +0800, Chen

Re: [libvirt] [PATCH RESEND V8 5/6] make /proc/meminfo isolate with host through fuse

2012-11-12 Thread Gao feng
于 2012年11月12日 20:05, Richard W.M. Jones 写道: On Mon, Nov 12, 2012 at 07:52:01PM +0800, Gao feng wrote: 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