Re: [libvirt] [PATCH] qemu: Set arch to i686 if qemu-system-i386 is found

2012-10-19 Thread Guido Günther
On Thu, Oct 18, 2012 at 09:34:17PM -0600, Eric Blake wrote: On 10/18/2012 05:24 PM, Guido Günther wrote: If we can't probe the architecture from QMP we parse the architecture from the qemu binaries name. This results in the architecture being i386 instead of i686 which then results in

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

2012-10-19 Thread Doug Goldstein
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 very QEMU oriented but it would be good to leave expansion for the future. I was thinking that under the guest

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

2012-10-19 Thread Michal Privoznik
On 19.10.2012 08:31, 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 very QEMU oriented but it would be good to leave expansion for the

[libvirt] [PATCH] qemu: set seamless migration capability

2012-10-19 Thread Michal Privoznik
As we switched to setting capabilities based on QMP communication, qemu seamless-migration capability was not set. In the -help output this knob is called seamless-migration=[on|off]. The equivalent in QMP world is SPICE_MIGRATE_COMPLETED event (qemu upstream commit 2fdd16e2). ---

Re: [libvirt] [PATCH] qemu: Pin the emulator when only cpuset is specified

2012-10-19 Thread Martin Kletzander
On 10/19/2012 05:45 AM, Osier Yang wrote: On 2012年10月17日 23:38, Martin Kletzander wrote: According to our recent changes (clarifications), we should be pinning qemu's emulator processes using thevcpu 'cpuset' attribute in case there is noemulatorpin specified. This however doesn't work

[libvirt] [PATCH v4] selinux: relabel tapfd in qemuPhysIfaceConnect

2012-10-19 Thread Guannan Ren
Relabeling tapfd right after the tap device is created. qemuPhysIfaceConnect is common function called both for static netdevs and for hotplug netdevs. --- src/qemu/qemu_command.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c

Re: [libvirt] [PATCH] qemu: Fix emulator affinity

2012-10-19 Thread Martin Kletzander
On 10/19/2012 06:02 AM, Osier Yang wrote: On 2012年10月18日 21:51, Martin Kletzander wrote: Commit ba63d8f7d843461f77a8206c1ef9da38388713e5 introduced a bug that makes machines, that don't have either cpuset invcpu or emulatorpin specified, fail. Because the function that sets affinity is

Re: [libvirt] [PATCH v4 4/4] qemu-config: Add new -add-fd command line option

2012-10-19 Thread Kevin Wolf
Am 18.10.2012 23:37, schrieb Corey Bryant: On 10/18/2012 04:43 PM, Eric Blake wrote: On 10/18/2012 01:19 PM, Corey Bryant wrote: This option can be used for passing file descriptors on the command line. It mirrors the existing add-fd QMP command which allows an fd to be passed to QEMU

Re: [libvirt] JNA Error Callback could cause core dump.

2012-10-19 Thread Claudio Bley
BW == Benjamin Wang (gendwang) gendw...@cisco.com writes: BW Hi, When I changed code as following: BW public class Connect { BW // Load the native part BW static { BW Libvirt.INSTANCE.virInitialize(); BW try { BW

Re: [libvirt] JNA Error Callback could cause core dump.

2012-10-19 Thread Benjamin Wang (gendwang)
Hi, I am using JNA 3.4.1. The problem is caused by libvirt java. You are right. B.R. Benjamin Wang -Original Message- From: Claudio Bley [mailto:cb...@av-test.de] Sent: 2012年10月19日 19:36 To: Benjamin Wang (gendwang) Cc: libvir-list@redhat.com; Guannan Ren; Daniel Veillard; Yang Zhou

[libvirt] [PATCH] qemu: Allow migration with host USB devices

2012-10-19 Thread Jiri Denemark
Recently, patches were added support for (managed)saving, restoring, and migrating domains with host USB devices. However, qemu driver would still forbid migration of such domains because qemuMigrationIsAllowed was not updated. --- src/qemu/qemu_migration.c | 22 +++--- 1 file

Re: [libvirt] [PATCH] qemu: Allow migration with host USB devices

2012-10-19 Thread Michal Privoznik
On 19.10.2012 14:21, Jiri Denemark wrote: Recently, patches were added support for (managed)saving, restoring, and migrating domains with host USB devices. However, qemu driver would still forbid migration of such domains because qemuMigrationIsAllowed was not updated. ---

Re: [libvirt] [PATCH] qemu: Allow migration with host USB devices

2012-10-19 Thread Jiri Denemark
On Fri, Oct 19, 2012 at 14:37:57 +0200, Michal Privoznik wrote: On 19.10.2012 14:21, Jiri Denemark wrote: Recently, patches were added support for (managed)saving, restoring, and migrating domains with host USB devices. However, qemu driver would still forbid migration of such domains

Re: [libvirt] [PATCH v4 4/4] qemu-config: Add new -add-fd command line option

2012-10-19 Thread Corey Bryant
On 10/19/2012 07:05 AM, Kevin Wolf wrote: Am 18.10.2012 23:37, schrieb Corey Bryant: On 10/18/2012 04:43 PM, Eric Blake wrote: On 10/18/2012 01:19 PM, Corey Bryant wrote: This option can be used for passing file descriptors on the command line. It mirrors the existing add-fd QMP command

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

2012-10-19 Thread Jiri Denemark
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. --- src/qemu/qemu_migration.c | 31 --- 1 file changed, 16

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

2012-10-19 Thread Michal Privoznik
On 19.10.2012 16:31, 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. --- src/qemu/qemu_migration.c | 31

[libvirt] [PATCH] migrate: v2: use VIR_DOMAIN_XML_MIGRATABLE when available

2012-10-19 Thread Ján Tomko
In v2 migration protocol, XML is obtained by calling domainGetXMLDesc. This includes the default USB controller in XML, which breaks migration to older libvirt (before 0.9.2). Commit 409b5f549530e7b3a33f4505f2cad2e26896107c qemu: Emit compatible XML when migrating a domain only fixed this for

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

2012-10-19 Thread Jiri Denemark
On Fri, Oct 19, 2012 at 16:53:38 +0200, Michal Privoznik wrote: On 19.10.2012 16:31, 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

Re: [libvirt] [PATCHv3 00/19] qemu block-commit support

2012-10-19 Thread Doug Goldstein
On Thu, Oct 18, 2012 at 3:48 PM, Laine Stump la...@laine.org wrote: On 10/17/2012 06:30 PM, Eric Blake wrote: This v3 posting resolves all the comments I had from Doug, Laine, and myself, and has passed my testing with SELinux enabled. v2 was here:

Re: [libvirt] [PATCH v4] selinux: relabel tapfd in qemuPhysIfaceConnect

2012-10-19 Thread Laine Stump
On 10/19/2012 04:44 AM, Guannan Ren wrote: Relabeling tapfd right after the tap device is created. qemuPhysIfaceConnect is common function called both for static netdevs and for hotplug netdevs. --- src/qemu/qemu_command.c | 18 ++ 1 file changed, 14 insertions(+), 4

Re: [libvirt] [PATCH v4] selinux: relabel tapfd in qemuPhysIfaceConnect

2012-10-19 Thread Guannan Ren
On 10/19/2012 11:55 PM, Laine Stump wrote: On 10/19/2012 04:44 AM, Guannan Ren wrote: Relabeling tapfd right after the tap device is created. qemuPhysIfaceConnect is common function called both for static netdevs and for hotplug netdevs. --- src/qemu/qemu_command.c | 18 ++ 1

Re: [libvirt] [RFC] New API to retrieve node CPU map

2012-10-19 Thread Viktor Mihajlovski
On 10/11/2012 03:15 PM, Viktor Mihajlovski wrote: On 10/11/2012 02:27 PM, Eric Blake wrote: That starts to feel rather complex. well :-) On the other hand, you have a point that returning maplen (number of bytes allocated in the map) does NOT tell you how many cpus are online without doing

Re: [libvirt] [PATCH] qemu: Cleanup the unused 'nodeinfo'

2012-10-19 Thread Eric Blake
On 10/18/2012 10:09 PM, Osier Yang wrote: nodeinfo is not used in these two functions, and it's waste of goto in qemuProcessSetEmulatorAffinites --- src/qemu/qemu_process.c | 20 1 files changed, 4 insertions(+), 16 deletions(-) ACK. -- Eric Blake

Re: [libvirt] [PATCH v3] Autogenerate AUTHORS

2012-10-19 Thread Eric Blake
On 10/18/2012 09:33 PM, Eric Blake wrote: On 10/18/2012 05:20 PM, Cole Robinson wrote: AUTHORS.in tracks the maintainers, as well as some folks who were previously in AUTHORS but don't have a git commit with proper attribution. Generated output is sorted alphabetically and lacks pretty

Re: [libvirt] [PATCH v3] Autogenerate AUTHORS

2012-10-19 Thread Cole Robinson
On 10/19/2012 12:14 PM, Eric Blake wrote: On 10/18/2012 09:33 PM, Eric Blake wrote: On 10/18/2012 05:20 PM, Cole Robinson wrote: AUTHORS.in tracks the maintainers, as well as some folks who were previously in AUTHORS but don't have a git commit with proper attribution. Generated output is

Re: [libvirt] [PATCH] add --interface to dnsmasq command line so bind-interfaces works

2012-10-19 Thread Laine Stump
On 10/19/2012 01:04 AM, Gene Czarcinski wrote: The problem is that, without SO_BINDTODEVICE, 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. Thanks for taking the time to investigate this (and the

[libvirt] [PATCH] network: free/null newDef if network fails to start

2012-10-19 Thread Laine Stump
https://bugzilla.redhat.com/show_bug.cgi?id=866364 pointed out a crash due to virNetworkObjAssignDef free'ing network-newDef without NULLing it afterward. A fix for this is in upstream commit b7e9202401ebaa039b8f05acdefda8c24081537a. While the NULLing of newDef was a legitimate fix, newDef should

[libvirt] [PATCH 1/2] test: Don't assume VNC is always available

2012-10-19 Thread Doug Goldstein
Several tests assume that VNC is always available and include it in their configs and the expected command line. The tests have nothing to do with graphics display so they shouldn't rely on VNC. --- tests/qemuxml2argvdata/qemuxml2argv-bios.args |6 +++---

[libvirt] [PATCH 2/2] qemu: Don't blindly assume VNC is supported

2012-10-19 Thread Doug Goldstein
Currently its assumed that qemu always supports VNC, however it is definitely possible to compile qemu without VNC support so we should at the very least check for it and handle that correctly. --- src/qemu/qemu_capabilities.c |5 src/qemu/qemu_capabilities.h |1 +

[libvirt] [PATCH 0/2] qemu: Check if qemu is VNC capable

2012-10-19 Thread Doug Goldstein
This is the initial series where I'll be exposing the graphical support that QEMU has via capabilities but I'm breaking it up to get in as much as possible based on my available time. This initial set adds checks to see that your QEMU binary has VNC support instead of assuming that it does. A

Re: [libvirt] [PATCH] network: free/null newDef if network fails to start

2012-10-19 Thread Eric Blake
On 10/19/2012 11:34 AM, Laine Stump wrote: https://bugzilla.redhat.com/show_bug.cgi?id=866364 pointed out a crash due to virNetworkObjAssignDef free'ing network-newDef without NULLing it afterward. A fix for this is in upstream commit b7e9202401ebaa039b8f05acdefda8c24081537a. While the

Re: [libvirt] [PATCHv3 18/19] blockjob: refactor qemu disk chain permission grants

2012-10-19 Thread Eric Blake
On 10/18/2012 12:50 PM, Laine Stump wrote: On 10/17/2012 06:30 PM, Eric Blake wrote: Previously, snapshot code did its own permission granting (lock manager, cgroup device controller, and security manager labeling) inline. But now that we are adding block-commit and block-copy which also

Re: [libvirt] [PATCHv3 00/19] qemu block-commit support

2012-10-19 Thread Eric Blake
On 10/17/2012 04:30 PM, Eric Blake wrote: This v3 posting resolves all the comments I had from Doug, Laine, and myself, and has passed my testing with SELinux enabled. v2 was here: https://www.redhat.com/archives/libvir-list/2012-October/msg00633.html See below for interdiff, and individual

[libvirt] [PATCHv3 20/19] blockjob: avoid null dereference on early error

2012-10-19 Thread Eric Blake
Gcc with optimization warns: ../../src/qemu/qemu_driver.c: In function 'qemuDomainBlockCommit': ../../src/qemu/qemu_driver.c:12813:46: error: 'disk' may be used uninitialized in this function [-Werror=maybe-uninitialized] ../../src/qemu/qemu_driver.c:12698:25: note: 'disk' was declared here cc1: