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

2012-10-18 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 element fo

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

2012-10-18 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] [PATCH] add --interface to dnsmasq command line so bind-interfaces works

2012-10-18 Thread Gene Czarcinski
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. --- src/network/bridge_driver.c | 20 ++-- tests/networkxml2argvdata/i

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

2012-10-18 Thread Osier Yang
"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(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index d3951d1..9b7be08

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

2012-10-18 Thread Osier Yang
On 2012年10月18日 21:51, Martin Kletzander wrote: Commit ba63d8f7d843461f77a8206c1ef9da38388713e5 introduced a bug that makes machines, that don't have either cpuset in or specified, fail. Because the function that sets affinity is called without any check, the function must not fail unless ther

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

2012-10-18 Thread Osier Yang
On 2012年10月17日 23:38, Martin Kletzander wrote: According to our recent changes (clarifications), we should be pinning qemu's emulator processes using the 'cpuset' attribute in case there is no specified. This however doesn't work entirely as expected and this patch should resolve all the remai

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

2012-10-18 Thread Eric Blake
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 QEMU_CAPS_PCI_MULTIBUS being unset > which gives a broken qemu comm

Re: [libvirt] [PATCH v3] Autogenerate AUTHORS

2012-10-18 Thread Eric Blake
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 spacing, so > tweak AUTHORS.in to follow th

Re: [libvirt] [PATCH][RFC] helper of copy-storage-* features

2012-10-18 Thread li guang
在 2012-10-18四的 06:52 -0600,Eric Blake写道: > On 10/17/2012 08:50 PM, Doug Goldstein wrote: > > On Sun, Oct 14, 2012 at 9:48 PM, liguang wrote: > >> help to create disk images copy-storage-* required, > >> try to do non-shared migration without bothering to > >> create disk images at target by hand.

Re: [libvirt] [PATCH] qemu: Don't fail without emulatorpin or cpumask

2012-10-18 Thread Guido Günther
On Thu, Oct 18, 2012 at 04:35:31PM -0600, Eric Blake wrote: > On 10/18/2012 04:32 PM, Guido Günther wrote: > > This unbreaks qemu:///session that got broken by > > > > ba63d8f7d843461f77a8206c1ef9da38388713e5. > > --- > > src/qemu/qemu_process.c |4 +++- > > 1 file changed, 3 insertions(+), 1

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

2012-10-18 Thread Guido Günther
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 QEMU_CAPS_PCI_MULTIBUS being unset which gives a broken qemu command line. This probably didn't show up earlier since

[libvirt] [PATCH v3] Autogenerate AUTHORS

2012-10-18 Thread Cole Robinson
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 spacing, so tweak AUTHORS.in to follow the same format. Additionally, drop the syntax-check rule

Re: [libvirt] [PATCH] qemu: Don't fail without emulatorpin or cpumask

2012-10-18 Thread Eric Blake
On 10/18/2012 04:32 PM, Guido Günther wrote: > This unbreaks qemu:///session that got broken by > > ba63d8f7d843461f77a8206c1ef9da38388713e5. > --- > src/qemu/qemu_process.c |4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_pro

[libvirt] [PATCH] qemu: Don't fail without emulatorpin or cpumask

2012-10-18 Thread Guido Günther
This unbreaks qemu:///session that got broken by ba63d8f7d843461f77a8206c1ef9da38388713e5. --- src/qemu/qemu_process.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index e08ec67..293ffe9 100644 --- a/src/qemu/qemu_proc

Re: [libvirt] [PATCHv3 19/19] blockjob: properly label disks for qemu block-commit

2012-10-18 Thread Eric Blake
On 10/18/2012 02:27 PM, Laine Stump wrote: > On 10/17/2012 06:30 PM, Eric Blake wrote: >> I finally have all the pieces in place to perform a block-commit with >> SELinux enforcing. There's still missing cleanup work when the commit >> completes, but doing that requires tracking both the backing c

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

2012-10-18 Thread Eric Blake
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 via SCM_RIGHTS and added to an > fd set. > > + > +static int cleanup_add_fd(QemuOpts *opts

Re: [libvirt] [PATCH] Autogenerate AUTHORS

2012-10-18 Thread Eric Blake
On 10/18/2012 02:23 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 spacing, so > tweak AUTHORS.in to follow th

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

2012-10-18 Thread 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 via SCM_RIGHTS and added to an fd set. This can b

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

2012-10-18 Thread Laine Stump
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: > https://www.redhat.com/archives/libvir-list/2012-October/msg00633.html > See below for interdiff, and indivi

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

2012-10-18 Thread Eric Blake
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 via SCM_RIGHTS and added to an > fd set. > > This can be combined with commands such as -d

Re: [libvirt] [PATCHv3 19/19] blockjob: properly label disks for qemu block-commit

2012-10-18 Thread Laine Stump
On 10/17/2012 06:30 PM, Eric Blake wrote: > I finally have all the pieces in place to perform a block-commit with > SELinux enforcing. There's still missing cleanup work when the commit > completes, but doing that requires tracking both the backing chain and > the base and top files within that ch

[libvirt] [PATCH] Autogenerate AUTHORS

2012-10-18 Thread Cole Robinson
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 spacing, so tweak AUTHORS.in to follow the same format. Additionally, drop the syntax-check rule

[libvirt] [PATCH v4 3/4] monitor: Prevent removing fd from set during init

2012-10-18 Thread Corey Bryant
If an fd is added to an fd set via the command line, and it is not referenced by another command line option (ie. -drive), then clean it up after QEMU initialization is complete. Signed-off-by: Corey Bryant Reviewed-by: Eric Blake --- v3: - This patch was split into it's own patch in v3 (e

[libvirt] [PATCH v4 0/4] command line fd passing using fd sets

2012-10-18 Thread Corey Bryant
This series adds command line file descriptor passing support via a new -add-fd option. This is a follow-on to the existing QMP fd passing support provided in the following patch series: comments.gmane.org/gmane.comp.emulators.qemu/165463 The new -add-fd option is designed to mirror the add-fd QM

Re: [libvirt] [PATCHv2 17/16] blockjob: refactor qemu disk chain permission grants

2012-10-18 Thread Laine Stump
On 10/17/2012 09:42 PM, Eric Blake wrote: > On 10/17/2012 06:09 PM, Laine Stump wrote: >> On 10/16/2012 06:03 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

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

2012-10-18 Thread Corey Bryant
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 via SCM_RIGHTS and added to an fd set. This can be combined with commands such as -drive to link file descriptors in an fd set to a drive:

[libvirt] [PATCH v4 2/4] monitor: Enable adding an inherited fd to an fd set

2012-10-18 Thread Corey Bryant
qmp_add_fd() gets an fd that was received over a socket with SCM_RIGHTS and adds it to an fd set. This patch adds support that will enable adding an fd that was inherited on the command line to an fd set. Note: All of the code added to monitor_fdset_add_fd(), with the exception of the error path

[libvirt] [PATCH v4 1/4] monitor: Allow add-fd to any specified fd set

2012-10-18 Thread Corey Bryant
The first call to add an fd to an fd set was previously not allowed to choose the fd set ID. The ID was generated as the first available and ensuing calls could add more fds by specifying the fd set ID. This change allows users to choose the fd set ID on the first call. Signed-off-by: Corey Brya

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

2012-10-18 Thread Laine Stump
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 have to change permissions, it's better to r

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

2012-10-18 Thread Corey Bryant
On 10/18/2012 10:29 AM, Corey Bryant wrote: On 10/17/2012 10:02 AM, Kevin Wolf wrote: Am 17.10.2012 06:16, schrieb Eric Blake: I'm still seeing the corner case of: qemu-kvm -add-fd fd=3,set=1 -add-fd fd=4,set=2 4<&- where the dup(3) will populate fd 4 prior to the point where we get to pr

Re: [libvirt] [PATCHv3 17/19] blockjob: implement shallow commit flag in qemu

2012-10-18 Thread Laine Stump
On 10/17/2012 06:30 PM, Eric Blake wrote: > Now that we can crawl the chain of backing files, we can do > argument validation and implement the 'shallow' flag. In > testing this, I discovered that it can be handy to pass the > shallow flag and an explicit base, as a means of validating > that the

Re: [libvirt] [PATCHv3 14/19] blockjob: remove unused parameters after previous patch

2012-10-18 Thread Laine Stump
On 10/17/2012 06:30 PM, Eric Blake wrote: > Minor cleanup made possible by previous simplifications. > > * src/qemu/qemu_cgroup.h (qemuSetupDiskCgroup) > (qemuTeardownDiskCgroup): Alter signature. > * src/qemu/qemu_cgroup.c (qemuSetupDiskCgroup) > (qemuTeardownDiskCgroup, qemuSetupCgroup): Update a

Re: [libvirt] [PATCHv3 16/19] blockjob: wire up online qemu block-commit

2012-10-18 Thread Laine Stump
On 10/17/2012 06:30 PM, Eric Blake wrote: > This is the bare minimum to kick off a block commit. In particular, > flags support is missing (shallow requires us to crawl the backing > chain to determine the file name to pass to the qemu monitor command; > delete requires us to track what needs to b

Re: [libvirt] [PATCHv3 15/19] blockjob: manage qemu block-commit monitor command

2012-10-18 Thread Laine Stump
On 10/17/2012 06:30 PM, Eric Blake wrote: > qemu 1.3 will be adding a 'block-commit' monitor command, per > qemu.git commit ed61fc1. It matches nicely to the libvirt API > virDomainBlockCommit. > > * src/qemu/qemu_capabilities.h (QEMU_CAPS_BLOCK_COMMIT): New bit. > * src/qemu/qemu_capabilities.c (

Re: [libvirt] [PATCHv3 13/19] storage: use cache to walk backing chain

2012-10-18 Thread Laine Stump
On 10/17/2012 06:30 PM, Eric Blake wrote: > We used to walk the backing file chain at least twice per disk, > once to set up cgroup device whitelisting, and once to set up > security labeling. Rather than walk the chain every iteration, > which possibly includes calls to fork() in order to open ro

Re: [libvirt] [PATCHv3 12/19] storage: cache backing chain while qemu domain is live

2012-10-18 Thread Laine Stump
On 10/17/2012 06:30 PM, Eric Blake wrote: > Technically, we should not be re-probing any file that qemu might > be currently writing to. As such, we should cache the backing > file chain prior to starting qemu. This patch adds the cache, > but does not use it until the next patch. > > Ultimately,

Re: [libvirt] [PATCHv3 10/19] storage: remember relative names in backing chain

2012-10-18 Thread Laine Stump
On 10/17/2012 06:30 PM, Eric Blake wrote: > In order to search for a backing file name as literally present > in a chain, we need to remember if the chain had relative names. > Also, searching for absolute names is easier if we only have > to canonicalize once, rather than on every iteration. > > *

Re: [libvirt] [PATCHv3 11/19] storage: make it easier to find file within chain

2012-10-18 Thread Laine Stump
On 10/17/2012 06:30 PM, Eric Blake wrote: > In order to temporarily label files read/write during a commit > operation, we need to crawl the backing chain and find the absolute > file name that needs labeling in the first place, as well as the > name of the file that owns the backing file. > > * sr

Re: [libvirt] [PATCHv3 08/19] storage: get entire metadata chain in one call

2012-10-18 Thread Laine Stump
On 10/17/2012 06:30 PM, Eric Blake wrote: > Previously, no one was using virStorageFileGetMetadata, and for good > reason - it couldn't support root-squash NFS. Change the signature > and make it useful to future patches, including enhancing the metadata > to recursively track the entire chain. >

Re: [libvirt] [PATCHv3 09/19] storage: don't require caller to pre-allocate metadata struct

2012-10-18 Thread Laine Stump
On 10/17/2012 06:30 PM, Eric Blake wrote: > Requiring pre-allocation was an unusual idiom. It allowed iteration > over the backing chain to use fewer mallocs, but made one-shot > clients harder to read. Also, this makes it easier for a future > patch to move away from opening fds on every iterati

Re: [libvirt] [PATCH] network: Set to NULL after virNetworkDefFree()

2012-10-18 Thread Laine Stump
On 10/18/2012 10:44 AM, Michal Privoznik wrote: > which frees all allocated memory but doesn't set the passed pointer to > NULL. Therefore, we must do it ourselves. This is causing actual > libvirtd crash: Basically, when doing 'virsh net-edit' the newDef should > be dropped. Well, when you're d

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

2012-10-18 Thread Laine Stump
On 10/18/2012 12:56 PM, 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 | 13 + > 1 file changed, 9 insertions(+), 4 deletion

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

2012-10-18 Thread Guannan Ren
On 10/19/2012 12:42 AM, Eric Blake wrote: On 10/18/2012 09:08 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 | 14 ++ 1 file

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

2012-10-18 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 | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/q

Re: [libvirt] any IRC servers i can join?

2012-10-18 Thread Eric Blake
On 10/18/2012 09:25 AM, yueluck wrote: > please tell me some libvirt-IRC severs,and channel? http://libvirt.org/contact.html#irc -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature -- libv

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

2012-10-18 Thread Eric Blake
On 10/18/2012 09:08 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 | 14 ++ > 1 file changed, 10 insertions(+), 4 deleti

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

2012-10-18 Thread Eric Blake
On 10/18/2012 08:21 AM, Guannan Ren wrote: >>> +++ b/src/qemu/qemu_command.c >>> @@ -170,6 +170,11 @@ qemuPhysIfaceConnect(virDomainDefPtr def, >>> vmop, driver->stateDir, >>> virDomainNetGetActualBandwidth(net)); >>> if (rc >= 0) { >>> +if (virSecurityManagerSetTa

[libvirt] any IRC servers i can join?

2012-10-18 Thread yueluck
please tell me some libvirt-IRC severs,and channel? thanks-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] JNA Error Callback could cause core dump.

2012-10-18 Thread Benjamin Wang (gendwang)
Hi, When I changed code as following: public class Connect { // Load the native part static { Libvirt.INSTANCE.virInitialize(); try { ErrorHandler.processError(Libvirt.INSTANCE); } catch (Exception e) { e.printStackTrace(); } +

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

2012-10-18 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 | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu

Re: [libvirt] [PATCH] network: Set to NULL after virNetworkDefFree()

2012-10-18 Thread Michal Privoznik
On 18.10.2012 17:02, Jiri Denemark wrote: > On Thu, Oct 18, 2012 at 16:44:24 +0200, Michal Privoznik wrote: >> which frees all allocated memory but doesn't set the passed pointer to >> NULL. Therefore, we must do it ourselves. This is causing actual >> libvirtd crash: Basically, when doing 'virsh

Re: [libvirt] [PATCH] network: Set to NULL after virNetworkDefFree()

2012-10-18 Thread Jiri Denemark
On Thu, Oct 18, 2012 at 16:44:24 +0200, Michal Privoznik wrote: > which frees all allocated memory but doesn't set the passed pointer to > NULL. Therefore, we must do it ourselves. This is causing actual > libvirtd crash: Basically, when doing 'virsh net-edit' the newDef should > be dropped. And

Re: [libvirt] [PATCH] dist: added cpu/cpu_ppc_data.h to Makefile.am

2012-10-18 Thread Michal Privoznik
On 18.10.2012 16:28, Viktor Mihajlovski wrote: > Missing entry for cpu_ppc_data.h added to fix RPM build. > > Signed-off-by: Viktor Mihajlovski > --- > src/Makefile.am |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/Makefile.am b/src/Makefile.am > index 9d3194

[libvirt] [PATCH] network: Set to NULL after virNetworkDefFree()

2012-10-18 Thread Michal Privoznik
which frees all allocated memory but doesn't set the passed pointer to NULL. Therefore, we must do it ourselves. This is causing actual libvirtd crash: Basically, when doing 'virsh net-edit' the newDef should be dropped. And the memory is freed, indeed. However, the pointer is not set to NULL but

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

2012-10-18 Thread Michal Privoznik
On 18.10.2012 15:51, Martin Kletzander wrote: > Commit ba63d8f7d843461f77a8206c1ef9da38388713e5 introduced a bug that > makes machines, that don't have either cpuset in or > specified, fail. Because the function that sets > affinity is called without any check, the function must not fail > unles

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

2012-10-18 Thread Corey Bryant
On 10/17/2012 10:02 AM, Kevin Wolf wrote: Am 17.10.2012 06:16, schrieb Eric Blake: I'm still seeing the corner case of: qemu-kvm -add-fd fd=3,set=1 -add-fd fd=4,set=2 4<&- where the dup(3) will populate fd 4 prior to the point where we get to process the -add-fd fd=4 command to notice that t

[libvirt] [PATCH] dist: added cpu/cpu_ppc_data.h to Makefile.am

2012-10-18 Thread Viktor Mihajlovski
Missing entry for cpu_ppc_data.h added to fix RPM build. Signed-off-by: Viktor Mihajlovski --- src/Makefile.am |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 9d3194d..187663f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@

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

2012-10-18 Thread Corey Bryant
On 10/17/2012 11:03 AM, Kevin Wolf wrote: Am 17.10.2012 17:01, schrieb Eric Blake: On 10/17/2012 08:02 AM, Kevin Wolf wrote: Am 17.10.2012 06:16, schrieb Eric Blake: I'm still seeing the corner case of: qemu-kvm -add-fd fd=3,set=1 -add-fd fd=4,set=2 4<&- where the dup(3) will populate fd 4

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

2012-10-18 Thread Guannan Ren
On 10/18/2012 09:55 PM, Eric Blake wrote: On 10/18/2012 07:30 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 | 9 + 1 file change

Re: [libvirt] [PATCH] qemu: Always format CPU topology

2012-10-18 Thread Jiri Denemark
On Thu, Oct 18, 2012 at 07:53:15 -0600, Eric Blake wrote: > On 10/18/2012 07:00 AM, Jiri Denemark wrote: > > 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 tho

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

2012-10-18 Thread Corey Bryant
On 10/17/2012 12:16 AM, Eric Blake wrote: On 10/16/2012 12:10 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 via SCM_RIGHTS and added to an fd set. This can b

Re: [libvirt] [PATCH] qemu: Always format CPU topology

2012-10-18 Thread Eric Blake
On 10/18/2012 07:00 AM, Jiri Denemark wrote: > 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.

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

2012-10-18 Thread Eric Blake
On 10/18/2012 07:30 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 | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-)

[libvirt] [PATCH] qemu: Fix emulator affinity

2012-10-18 Thread Martin Kletzander
Commit ba63d8f7d843461f77a8206c1ef9da38388713e5 introduced a bug that makes machines, that don't have either cpuset in or specified, fail. Because the function that sets affinity is called without any check, the function must not fail unless there is an error. --- src/qemu/qemu_process.c | 12 +

Re: [libvirt] [PATCH v3 3/4] monitor: Prevent removing fd from set during init

2012-10-18 Thread Corey Bryant
On 10/17/2012 12:02 AM, Eric Blake wrote: On 10/16/2012 12:08 PM, Corey Bryant wrote: If an fd is added to an fd set via the command line, and it is not referenced by another command line option (ie. -drive), then clean it up after QEMU initialization is complete. Signed-off-by: Corey Bryant

Re: [libvirt] [PATCH v3 2/4] monitor: Enable adding an inherited fd to an fd set

2012-10-18 Thread Corey Bryant
On 10/17/2012 09:45 AM, Kevin Wolf wrote: Am 16.10.2012 20:08, schrieb Corey Bryant: qmp_add_fd() gets an fd that was received over a socket with SCM_RIGHTS and adds it to an fd set. This patch adds support that will enable adding an fd that was inherited on the command line to an fd set. No

[libvirt] error of libvirt live-migrate using spice: Unable to read from monitor

2012-10-18 Thread yangzhenyu
hi all: I have a problem when I live-migrate a instance to other node. I use the spice protocol in a instance. when I use the command: virsh migrate --live instance-0001 qemu+tcp://node1/system. The 'node1' is the hostname of the dest compute. The error is: error: Unable to read from monitor: C

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

2012-10-18 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 | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_c

[libvirt] [PATCH] qemu: Always format CPU topology

2012-10-18 Thread 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 will always be provided

Re: [libvirt] [HELP] QEMU guest agent via ISA serial port, or shutdown hooks?

2012-10-18 Thread Thorsten Glaser
Michal Privoznik dixit: >On 18.10.2012 01:27, Thorsten Glaser wrote: >> Does libvirt (the dæmon, probably) offer a shutdown hook, e.g. […] >Not yet. Hrm, okay. >I can implement isa-serial channel. But not too soon, though. That would be great. If I can do anything to help, please tell me, I’m

Re: [libvirt] [PATCH][RFC] helper of copy-storage-* features

2012-10-18 Thread Eric Blake
On 10/17/2012 08:50 PM, Doug Goldstein wrote: > On Sun, Oct 14, 2012 at 9:48 PM, liguang wrote: >> help to create disk images copy-storage-* required, >> try to do non-shared migration without bothering to >> create disk images at target by hand. >> >> +char *virDirOfFile(const char *file) Poor

Re: [libvirt] [PATCH] spec: Fix dependency for lock-sanlock subpackage

2012-10-18 Thread Jiri Denemark
On Thu, Oct 18, 2012 at 14:18:16 +0200, Peter Krempa wrote: > On 10/18/12 14:09, Jiri Denemark wrote: > > This should not make a big difference in real world since libvirt-daemon, > > which is already required by libvirt-lock-sanlock, requires > > libvirt-client and thus libvirt-lock-sanlock gets t

Re: [libvirt] [PATCH] spec: Fix dependency for lock-sanlock subpackage

2012-10-18 Thread Peter Krempa
On 10/18/12 14:09, Jiri Denemark wrote: This should not make a big difference in real world since libvirt-daemon, which is already required by libvirt-lock-sanlock, requires libvirt-client and thus libvirt-lock-sanlock gets this dependency transitively. However, since libvirt-lock-sanlock contain

[libvirt] [PATCH] spec: Fix dependency for lock-sanlock subpackage

2012-10-18 Thread Jiri Denemark
This should not make a big difference in real world since libvirt-daemon, which is already required by libvirt-lock-sanlock, requires libvirt-client and thus libvirt-lock-sanlock gets this dependency transitively. However, since libvirt-lock-sanlock contains sanlock_helper binary linked to libvirt.

Re: [libvirt] [PATCH 0/3] Add support for HyperV Enlightenment features

2012-10-18 Thread Peter Krempa
On 10/17/12 15:54, Peter Krempa wrote: This series adds framework to deal with various HyperV Enlightenment features that improve behavior of Microsoft Windows guests. First of the features implemented is "relaxed" that changes the behavior of timers. The series is designed to ease addition of

Re: [libvirt] [PATCHv2 3/3] qemu: Add support for HyperV Enlightenment feature "relaxed"

2012-10-18 Thread Peter Krempa
On 10/18/12 12:07, Martin Kletzander wrote: On 10/18/2012 11:39 AM, Peter Krempa wrote: This patch adds support for the "relaxed" feature implemented by I'd write 'QEMU support' to make it clear, but that's just a hint :) That looks better. previous patch. --- Diff to v1: - Fixed parsing

Re: [libvirt] [PATCHv2 3/3] qemu: Add support for HyperV Enlightenment feature "relaxed"

2012-10-18 Thread Martin Kletzander
On 10/18/2012 11:39 AM, Peter Krempa wrote: > This patch adds support for the "relaxed" feature implemented by I'd write 'QEMU support' to make it clear, but that's just a hint :) > previous patch. > --- > Diff to v1: > - Fixed parsing of qemu commandline and added test. At the original place > t

[libvirt] [PATCHv2 3/3] qemu: Add support for HyperV Enlightenment feature "relaxed"

2012-10-18 Thread Peter Krempa
This patch adds support for the "relaxed" feature implemented by previous patch. --- Diff to v1: - Fixed parsing of qemu commandline and added test. At the original place the code wasn't working as the hyperv features don't use the '+' sign to enable them src/qemu/qemu_command.c

Re: [libvirt] [PATCH 1/3] conf: Make tri-state feature options more universal

2012-10-18 Thread Peter Krempa
On 10/18/12 01:32, Eric Blake wrote: On 10/17/2012 07:54 AM, Peter Krempa wrote: The apic-eoi feature enum and implementation can be made more universal to allow re-use of the enum for other features. --- src/conf/domain_conf.c | 6 +++--- src/conf/domain_conf.h | 14 +++--- src

Re: [libvirt] [PATCH] qemu: Correctly wait for spice to migrate

2012-10-18 Thread Michal Privoznik
On 18.10.2012 10:19, Martin Kletzander wrote: > On 10/18/2012 09:47 AM, Michal Privoznik wrote: >> Currently we query-spice after the main migration has completed >> before moving to next state. Qemu reports this as boolean (not >> enclosed within quotes). Therefore it is not correct to use >> virJ

Re: [libvirt] [PATCH 2/3] conf: Add support for HyperV Enlightenment features

2012-10-18 Thread Peter Krempa
On 10/18/12 01:38, Eric Blake wrote: > On 10/17/2012 07:54 AM, Peter Krempa wrote: >> Hypervisors are starting to support HyperV englightenment features that >> improve behavior of guests running Microsoft Windows operating systems. > > s/englightenment/enlightenment/ > >> >> This patch adds supp

Re: [libvirt] [PATCH] qemu: Correctly wait for spice to migrate

2012-10-18 Thread Martin Kletzander
On 10/18/2012 09:47 AM, Michal Privoznik wrote: > Currently we query-spice after the main migration has completed > before moving to next state. Qemu reports this as boolean (not > enclosed within quotes). Therefore it is not correct to use > virJSONValueObjectGetString but virJSONValueObjectGetBoo

Re: [libvirt] [HELP] QEMU guest agent via ISA serial port, or shutdown hooks?

2012-10-18 Thread Michal Privoznik
On 18.10.2012 01:27, Thorsten Glaser wrote: > Hi, > > http://www.redhat.com/archives/libvir-list/2012-January/msg00629.html > added support only for when using the virtio channel to the guest. > > However, QEMU Guest Agent support is most useful to guests that do > not implement ACPI shutdown sup

[libvirt] [PATCH] qemu: Correctly wait for spice to migrate

2012-10-18 Thread Michal Privoznik
Currently we query-spice after the main migration has completed before moving to next state. Qemu reports this as boolean (not enclosed within quotes). Therefore it is not correct to use virJSONValueObjectGetString but virJSONValueObjectGetBoolean instead. --- Meanwhile, this is does no harm for n