Re: [libvirt] [Patch]: spice agent-mouse support [v3]

2012-03-09 Thread Zhou Peng
On Fri, Mar 9, 2012 at 3:29 PM, Osier Yang jy...@redhat.com wrote: Pushed with the attached diff squashed in. You are added in the contributors list now, please let me known if you'd like another name. Thanks for the patch! It's ok. Thank you. -- Zhou Peng -- libvir-list mailing list

Re: [libvirt] [PATCH] qemuBuildCommandLine: Don't add tlsPort if none set

2012-03-09 Thread Michal Privoznik
On 08.03.2012 23:26, Eric Blake wrote: On 03/08/2012 06:30 AM, Michal Privoznik wrote: If user hasn't supplied any tlsPort we default to setting it to zero in our internal structure. However, when building command line we test it against -1 which is obviously wrong. ---

Re: [libvirt] libvirt_tck autotest wrapper looks good, commited

2012-03-09 Thread Daniel Veillard
On Fri, Mar 09, 2012 at 01:33:48PM +0800, Guannan Ren wrote: On 03/09/2012 01:40 AM, Lucas Meneghel Rodrigues wrote: Thanks Guannan: https://github.com/autotest/autotest/commit/ba4b748e7b9a9bfe7898a97cdccdc9b867d5321c Cheers, Lucas That's great, thank Lucas. yes excellent to

Re: [libvirt] libvirt_tck autotest wrapper looks good, commited

2012-03-09 Thread Daniel P. Berrange
On Fri, Mar 09, 2012 at 04:28:47PM +0800, Daniel Veillard wrote: On Fri, Mar 09, 2012 at 01:33:48PM +0800, Guannan Ren wrote: On 03/09/2012 01:40 AM, Lucas Meneghel Rodrigues wrote: Thanks Guannan: https://github.com/autotest/autotest/commit/ba4b748e7b9a9bfe7898a97cdccdc9b867d5321c

Re: [libvirt] libvirt_tck autotest wrapper looks good, commited

2012-03-09 Thread Guannan Ren
On 03/09/2012 04:28 PM, Daniel Veillard wrote: On Fri, Mar 09, 2012 at 01:33:48PM +0800, Guannan Ren wrote: On 03/09/2012 01:40 AM, Lucas Meneghel Rodrigues wrote: Thanks Guannan: https://github.com/autotest/autotest/commit/ba4b748e7b9a9bfe7898a97cdccdc9b867d5321c Cheers, Lucas That's

Re: [libvirt] [PATCH 1/9] Add support for event tray moved of removable disks

2012-03-09 Thread Daniel Veillard
On Mon, Mar 05, 2012 at 06:25:39PM +0800, Osier Yang wrote: This patch introduces a new event type for the QMP event DEVICE_TRAY_MOVED, which occurs when the tray of a removable disk is moved (i.e opened or closed): VIR_DOMAIN_EVENT_ID_TRAY_MOVED The event's data includes the device

[libvirt] [PATCH] conf: eliminate redundant VIR_ALLOC of 1st element of network DNS hosts.

2012-03-09 Thread Laine Stump
virNetworkDNSHostsDefParseXML was calling VIR_ALLOC(def-hosts) if def-hosts was NULL. This is a waste of time, though, since VIR_REALLOC_N is called a few lines further down, prior to any use of def-hosts. (initializing def-nhosts to 0 is also redundant, because the newly allocated memory will

Re: [libvirt] Can't connect ESXi ssl with virsh

2012-03-09 Thread Zhimou Peng
Well, finally It works. Matthias, you're right. For linux, we can add cacert to nssdb to let the libcurl use. So, This command: certutil -d sql:/etc/pki/nssdb -A -t TC -n esx -i /root/cacert.pem [root@localhost ~]# virsh -c esx://10.66.6.211 Enter username for 10.66.6.211 [root]: Enter

[libvirt] [PATCH] qemuxml2argvtest: Pass some additional flags to graphics-spice-agentmouse

2012-03-09 Thread Michal Privoznik
One of the recent commits introduced support for spice agent-mouse. However, test for this feature require some tweaking: pass QEMU_CAPS_CHARDEV_SPICEVMC | QEMU_CAPS_NODEFCONFIG and add -vga cirrus. --- Since we default to '-vga cirrus' when QEMU_CAPS_VGA set, I've added it to XML as well for

Re: [libvirt] [PATCH] conf: eliminate redundant VIR_ALLOC of 1st element of network DNS hosts.

2012-03-09 Thread Michal Privoznik
On 09.03.2012 10:03, Laine Stump wrote: virNetworkDNSHostsDefParseXML was calling VIR_ALLOC(def-hosts) if def-hosts was NULL. This is a waste of time, though, since VIR_REALLOC_N is called a few lines further down, prior to any use of def-hosts. (initializing def-nhosts to 0 is also redundant,

Re: [libvirt] [PATCH] conf: eliminate redundant VIR_ALLOC of 1st element of network DNS hosts.

2012-03-09 Thread Laine Stump
On 03/09/2012 04:23 AM, Michal Privoznik wrote: On 09.03.2012 10:03, Laine Stump wrote: virNetworkDNSHostsDefParseXML was calling VIR_ALLOC(def-hosts) if def-hosts was NULL. This is a waste of time, though, since VIR_REALLOC_N is called a few lines further down, prior to any use of def-hosts.

Re: [libvirt] [PATCH 1/9] Add support for event tray moved of removable disks

2012-03-09 Thread Osier Yang
On 2012年03月09日 16:55, Daniel Veillard wrote: On Mon, Mar 05, 2012 at 06:25:39PM +0800, Osier Yang wrote: This patch introduces a new event type for the QMP event DEVICE_TRAY_MOVED, which occurs when the tray of a removable disk is moved (i.e opened or closed):

Re: [libvirt] libvirt_tck autotest wrapper looks good, commited

2012-03-09 Thread Osier Yang
On 2012年03月09日 16:59, Guannan Ren wrote: On 03/09/2012 04:28 PM, Daniel Veillard wrote: On Fri, Mar 09, 2012 at 01:33:48PM +0800, Guannan Ren wrote: On 03/09/2012 01:40 AM, Lucas Meneghel Rodrigues wrote: Thanks Guannan:

Re: [libvirt] [PATCH 2/9] docs: Add documentation for new attribute tray of disk target

2012-03-09 Thread Daniel Veillard
On Mon, Mar 05, 2012 at 06:25:40PM +0800, Osier Yang wrote: Example XML: disk type='file' device='cdrom' driver name='qemu' type='raw'/ source file='/tmp/cdrom.img'/ target dev='hdd' bus='ide' tray='open'/ /disk --- docs/formatdomain.html.in | 13

Re: [libvirt] [PATCH] Add migration APIs for libxl driver

2012-03-09 Thread Chunyan Liu
Hi, Jim, I made some changes to the patch according to your comments: a. support concurrent migrations, add virBitmapPtr for probing migration ports b. update doParseURI: use virAsprintf instead of strdup and snprintf, support migration URI syntax hostname[:port], remove xlmigr scheme c. drop

Re: [libvirt] [PATCH 3/9] conf: Parse and for the tray attribute

2012-03-09 Thread Daniel Veillard
On Mon, Mar 05, 2012 at 06:25:41PM +0800, Osier Yang wrote: The tray is only allowed for removable disks, i.e. CDROM and Floppy disks. As the value for tray defaults to closed, lots of tests are updated to include tray='closed' in the disk target XML. I would take that as an indication

Re: [libvirt] [PATCH 5/9] qemu: Update tray status while tray moved event is emitted

2012-03-09 Thread Daniel Veillard
On Mon, Mar 05, 2012 at 06:25:43PM +0800, Osier Yang wrote: With this patch, libvirt won't start the guest with the medium source which already ejected by guest when doing migration, or saving/restoring. --- src/qemu/qemu_process.c |7 +++ 1 files changed, 7 insertions(+), 0

Re: [libvirt] [PATCH 4/9] qemu: Do not start with source for removable disks if tray is open

2012-03-09 Thread Daniel Veillard
On Mon, Mar 05, 2012 at 06:25:42PM +0800, Osier Yang wrote: This is similiar with physical world, one will be surprised if the box starts with medium exists while the tray is open. New tests are added, tests disk-{cdrom,floppy}-tray are for the qemu supports -device flag, and

[libvirt] QEMU fstatfs(2) and libvirt SELinux policy

2012-03-09 Thread Stefan Hajnoczi
Hi, I have a question about the libvirt SELinux policy that can be applied to QEMU processes. Yesterday Laine helped Khoa and me diagnose an issue where QEMU was doing fstatfs(2) but SELinux prevented this FILESYSTEM__GETATTR operation, resulting in a failed syscall with -EACCES. The SELinux

[libvirt] Vlan ID - Portgroup

2012-03-09 Thread Daniele Milani
Hi all, I have the following problem: reading the documentation I wasn't able to understand if it is possible to associate a VlanID to a portgroup. Does anyone know if it is possible and (more important) how does it work? Bests, Daniele Milani --

[libvirt] [PATCH v2] Removed more AMD-specific features from cpu64-rhel* models

2012-03-09 Thread Martin Kletzander
We found few more AMD-specific features in cpu64-rhel* models that made it impossible to start qemu guest on Intel host (with this setting) even though qemu itself starts correctly with them. This impacts one test, thus the fix in tests/cputestdata/. --- src/cpu/cpu_map.xml

Re: [libvirt] [PATCH] Removed more AMD-specific features from cpu64-rhel* models

2012-03-09 Thread Martin Kletzander
On 03/08/2012 04:11 PM, Eric Blake wrote: On 03/08/2012 08:02 AM, Martin Kletzander wrote: We found few more AMD-specific features in cpu64-rhel* models that made it impossible to start qemu guest on Intel host (with this setting) even though qemu itself starts correctly with them. ---

Re: [libvirt] [PATCH v2] Removed more AMD-specific features from cpu64-rhel* models

2012-03-09 Thread Jiri Denemark
On Fri, Mar 09, 2012 at 14:31:47 +0100, Martin Kletzander wrote: We found few more AMD-specific features in cpu64-rhel* models that made it impossible to start qemu guest on Intel host (with this setting) even though qemu itself starts correctly with them. This impacts one test, thus the fix

Re: [libvirt] [PATCH] Removed more AMD-specific features from cpu64-rhel* models

2012-03-09 Thread Jiri Denemark
On Thu, Mar 08, 2012 at 08:11:24 -0700, Eric Blake wrote: On 03/08/2012 08:02 AM, Martin Kletzander wrote: We found few more AMD-specific features in cpu64-rhel* models that made it impossible to start qemu guest on Intel host (with this setting) even though qemu itself starts correctly

Re: [libvirt] [Qemu-devel] QEMU fstatfs(2) and libvirt SELinux policy

2012-03-09 Thread Jiri Denemark
Hi. On Fri, Mar 09, 2012 at 11:32:47 +, Stefan Hajnoczi wrote: ... static __inline__ int platform_test_xfs_fd(int fd) { struct statfs buf; if (fstatfs(fd, buf) 0) return 0; return (buf.f_type == 0x58465342); /* XFSB */ } In other words,

[libvirt] [PATCH] Allow byte[] arrays to be set as a secretValue

2012-03-09 Thread Wido den Hollander
Signed-off-by: Wido den Hollander w...@widodh.nl --- src/main/java/org/libvirt/Secret.java | 11 +++ src/main/java/org/libvirt/jna/Libvirt.java |1 + 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/main/java/org/libvirt/Secret.java

Re: [libvirt] [PATCH] Removed more AMD-specific features from cpu64-rhel* models

2012-03-09 Thread Eric Blake
On 03/09/2012 06:44 AM, Jiri Denemark wrote: On Thu, Mar 08, 2012 at 08:11:24 -0700, Eric Blake wrote: On 03/08/2012 08:02 AM, Martin Kletzander wrote: We found few more AMD-specific features in cpu64-rhel* models that made it impossible to start qemu guest on Intel host (with this setting)

Re: [libvirt] [PATCH] Allow byte[] arrays to be set as a secretValue

2012-03-09 Thread Eric Blake
On 03/09/2012 07:23 AM, Wido den Hollander wrote: Signed-off-by: Wido den Hollander w...@widodh.nl --- src/main/java/org/libvirt/Secret.java | 11 +++ src/main/java/org/libvirt/jna/Libvirt.java |1 + 2 files changed, 12 insertions(+), 0 deletions(-) If you will do: git

Re: [libvirt] [PATCH] Allow byte[] arrays to be set as a secretValue

2012-03-09 Thread Wido den Hollander
On 03/09/2012 03:58 PM, Eric Blake wrote: On 03/09/2012 07:23 AM, Wido den Hollander wrote: Signed-off-by: Wido den Hollanderw...@widodh.nl --- src/main/java/org/libvirt/Secret.java | 11 +++ src/main/java/org/libvirt/jna/Libvirt.java |1 + 2 files changed, 12

[libvirt] [PATCH libvirt-java] Allow byte[] arrays to be set as a secretValue

2012-03-09 Thread Wido den Hollander
Signed-off-by: Wido den Hollander w...@widodh.nl --- src/main/java/org/libvirt/Secret.java | 11 +++ src/main/java/org/libvirt/jna/Libvirt.java |1 + 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/main/java/org/libvirt/Secret.java

Re: [libvirt] [Qemu-devel] QEMU fstatfs(2) and libvirt SELinux policy

2012-03-09 Thread Stefan Hajnoczi
On Fri, Mar 9, 2012 at 3:11 PM, Laine Stump la...@laine.org wrote: On 03/09/2012 09:16 AM, Jiri Denemark wrote: Hi. On Fri, Mar 09, 2012 at 11:32:47 +, Stefan Hajnoczi wrote: ... static __inline__ int platform_test_xfs_fd(int fd) {         struct statfs buf;         if (fstatfs(fd,

Re: [libvirt] [Qemu-devel] QEMU fstatfs(2) and libvirt SELinux policy

2012-03-09 Thread Laine Stump
On 03/09/2012 09:16 AM, Jiri Denemark wrote: Hi. On Fri, Mar 09, 2012 at 11:32:47 +, Stefan Hajnoczi wrote: ... static __inline__ int platform_test_xfs_fd(int fd) { struct statfs buf; if (fstatfs(fd, buf) 0) return 0; return (buf.f_type ==

Re: [libvirt] QEMU fstatfs(2) and libvirt SELinux policy

2012-03-09 Thread George Wilson
Hi Stefan, The SELinux policy may need to be updated to accommodate the access. Following is a summary of the general procedure in practical terms for handling simple issues with existing policy like the one you describe (other more complex problems would likely require additional actions). Look

Re: [libvirt] QEMU fstatfs(2) and libvirt SELinux policy

2012-03-09 Thread Daniel P. Berrange
On Fri, Mar 09, 2012 at 11:32:47AM +, Stefan Hajnoczi wrote: Hi, I have a question about the libvirt SELinux policy that can be applied to QEMU processes. Yesterday Laine helped Khoa and me diagnose an issue where QEMU was doing fstatfs(2) but SELinux prevented this FILESYSTEM__GETATTR

Re: [libvirt] [Qemu-devel] QEMU fstatfs(2) and libvirt SELinux policy

2012-03-09 Thread Stefan Hajnoczi
On Fri, Mar 9, 2012 at 3:11 PM, Laine Stump la...@laine.org wrote: On 03/09/2012 09:16 AM, Jiri Denemark wrote: Hi. On Fri, Mar 09, 2012 at 11:32:47 +, Stefan Hajnoczi wrote: ... static __inline__ int platform_test_xfs_fd(int fd) {         struct statfs buf;         if (fstatfs(fd,

Re: [libvirt] [Qemu-devel] QEMU fstatfs(2) and libvirt SELinux policy

2012-03-09 Thread Paolo Bonzini
Il 09/03/2012 17:07, Stefan Hajnoczi ha scritto: So am I correct that this extra permission is only needed for a single RHEL6 release? If qemu won't be doing fstafs on an ongoing basis, it doesn't seem like a good idea to permanently open up the permissions allowed by virt_use_nfs Paolo,

Re: [libvirt] [Qemu-devel] Qemu, libvirt, and CPU models

2012-03-09 Thread Eduardo Habkost
On Thu, Mar 08, 2012 at 02:41:54PM +0100, Jiri Denemark wrote: On Wed, Mar 07, 2012 at 19:26:25 -0300, Eduardo Habkost wrote: Awesome. So, if Qemu and libvirt disagrees, libvirt will know that and add the necessary flags? That was my main worry. If disagreement between Qemu and libvirt is

[libvirt] [PATCH 0/2] add user and system times to domain cpu stats

2012-03-09 Thread Eric Blake
See also https://bugzilla.redhat.com/show_bug.cgi?id=800366 Eric Blake (2): cpustats: collect VM user and sys times cpustats: report user and sys times include/libvirt/libvirt.h.in | 12 ++ src/libvirt_private.syms |1 + src/qemu/qemu_driver.c | 45

[libvirt] [PATCH 2/2] cpustats: report user and sys times

2012-03-09 Thread Eric Blake
Thanks to cgroups, providing user vs. system time of the overall guest is easy to add to our existing API. * include/libvirt/libvirt.h.in (VIR_DOMAIN_CPU_STATS_USERTIME) (VIR_DOMAIN_CPU_STATS_SYSTEMTIME): New constants. * src/util/virtypedparam.h (virTypedParameterArrayValidate)

[libvirt] [PATCH 1/2] cpustats: collect VM user and sys times

2012-03-09 Thread Eric Blake
As documented in linux.git/Documentation/cgroups/cpuacct.txt, cpuacct.stat returns user and system time in ticks (the same unit used in times(2)). It would be a bit nicer if it were like getrusage(2) and reported timeval contents, or like cpuacct.usage and in nanoseconds, but we can't be picky.

Re: [libvirt] [PATCH] qemu: Copy console definition from serial

2012-03-09 Thread Jan Kiszka
On 2011-11-16 14:14, Michal Privoznik wrote: Now, when we support multiple consoles per domain, the vm-def-console[0] can still remain an alias for vm-def-serial[0]; However, we need to copy it's source definition as well otherwise we'll regress on virDomainOpenConsole. ... diff --git

Re: [libvirt] [PATCH] qemu: Copy console definition from serial

2012-03-09 Thread Daniel P. Berrange
On Fri, Mar 09, 2012 at 06:48:42PM +0100, Jan Kiszka wrote: On 2011-11-16 14:14, Michal Privoznik wrote: Now, when we support multiple consoles per domain, the vm-def-console[0] can still remain an alias for vm-def-serial[0]; However, we need to copy it's source definition as well

Re: [libvirt] [PATCH] qemu: Copy console definition from serial

2012-03-09 Thread Jan Kiszka
On 2012-03-09 18:53, Daniel P. Berrange wrote: On Fri, Mar 09, 2012 at 06:48:42PM +0100, Jan Kiszka wrote: On 2011-11-16 14:14, Michal Privoznik wrote: Now, when we support multiple consoles per domain, the vm-def-console[0] can still remain an alias for vm-def-serial[0]; However, we need to

Re: [libvirt] [PATCH] qemu: Copy console definition from serial

2012-03-09 Thread Jan Kiszka
On 2012-03-09 18:58, Jan Kiszka wrote: On 2012-03-09 18:53, Daniel P. Berrange wrote: On Fri, Mar 09, 2012 at 06:48:42PM +0100, Jan Kiszka wrote: On 2011-11-16 14:14, Michal Privoznik wrote: Now, when we support multiple consoles per domain, the vm-def-console[0] can still remain an alias

Re: [libvirt] [PATCH] qemu: Copy console definition from serial

2012-03-09 Thread Daniel P. Berrange
On Fri, Mar 09, 2012 at 06:58:06PM +0100, Jan Kiszka wrote: On 2012-03-09 18:53, Daniel P. Berrange wrote: On Fri, Mar 09, 2012 at 06:48:42PM +0100, Jan Kiszka wrote: On 2011-11-16 14:14, Michal Privoznik wrote: Now, when we support multiple consoles per domain, the vm-def-console[0] can

Re: [libvirt] [PATCH] qemu: Copy console definition from serial

2012-03-09 Thread Jan Kiszka
On 2012-03-09 19:02, Daniel P. Berrange wrote: On Fri, Mar 09, 2012 at 06:58:06PM +0100, Jan Kiszka wrote: On 2012-03-09 18:53, Daniel P. Berrange wrote: On Fri, Mar 09, 2012 at 06:48:42PM +0100, Jan Kiszka wrote: On 2011-11-16 14:14, Michal Privoznik wrote: Now, when we support multiple

[libvirt] [PATCH 2/2] Add myself to the AUTHORS file

2012-03-09 Thread Crístian Viana
diff --git a/AUTHORS b/AUTHORS index 954fd1a..b09bd62 100644 --- a/AUTHORS +++ b/AUTHORS @@ -224,6 +224,7 @@ Patches have also been contributed by: Peter Robinson pbrobin...@gmail.com Benjamin Camaben...@dolka.fr Duncan Rance libv...@dunquino.com + Crístian Viana

[libvirt] [PATCH 1/2] QEmu: support disk filenames with comma

2012-03-09 Thread Crístian Viana
If there is a disk file with a comma in the name, QEmu expects a double comma instead of a single one (e.g., the file virtual,disk.img needs to be specified as virtual,,disk.img in QEmu's command line). This patch fixes libvirt to work with that feature. Fix RHBZ #801036. diff --git

[libvirt] QEmu: support disk filenames with comma

2012-03-09 Thread Crístian Viana
Hi! This patch fixes RHBZ #801036 adding support to filenames with comma using QEmu. As this is my first patch to libvirt, I'm not completely sure if I should have also changed other parts of the code, or if I have used the wrong memory allocation functions/macros, or if I shouldn't have

Re: [libvirt] Modern CPU models cannot be used with libvirt

2012-03-09 Thread Eduardo Habkost
Resurrecting an old thread: I didn't see any clear conclusion in this thread (this is why I am resurrecting it), except that many were arguing that libvirt should simply copy and/or generate the CPU model definitions from Qemu. I really don't think it's reasonable to expect that. On Thu, Dec 15,

Re: [libvirt] Modern CPU models cannot be used with libvirt

2012-03-09 Thread Daniel P. Berrange
On Fri, Mar 09, 2012 at 05:56:52PM -0300, Eduardo Habkost wrote: Resurrecting an old thread: I didn't see any clear conclusion in this thread (this is why I am resurrecting it), except that many were arguing that libvirt should simply copy and/or generate the CPU model definitions from Qemu.

Re: [libvirt] Modern CPU models cannot be used with libvirt

2012-03-09 Thread Anthony Liguori
On 03/09/2012 03:04 PM, Daniel P. Berrange wrote: On Fri, Mar 09, 2012 at 05:56:52PM -0300, Eduardo Habkost wrote: Resurrecting an old thread: I didn't see any clear conclusion in this thread (this is why I am resurrecting it), except that many were arguing that libvirt should simply copy

Re: [libvirt] [PATCH 1/2] QEmu: support disk filenames with comma

2012-03-09 Thread Eric Blake
On 03/09/2012 12:13 PM, Crístian Viana wrote: If there is a disk file with a comma in the name, QEmu expects a double comma instead of a single one (e.g., the file virtual,disk.img needs to be specified as virtual,,disk.img in QEmu's command line). This patch fixes libvirt to work with that

[libvirt] [PATCHv2] qemu: support disk filenames with comma

2012-03-09 Thread Eric Blake
If there is a disk file with a comma in the name, QEmu expects a double comma instead of a single one (e.g., the file virtual,disk.img needs to be specified as virtual,,disk.img in QEmu's command line). This patch fixes libvirt to work with that feature. Fix RHBZ #801036. Based on an initial

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-09 Thread Eduardo Habkost
On Fri, Mar 09, 2012 at 03:15:26PM -0600, Anthony Liguori wrote: On 03/09/2012 03:04 PM, Daniel P. Berrange wrote: On Fri, Mar 09, 2012 at 05:56:52PM -0300, Eduardo Habkost wrote: Resurrecting an old thread: I didn't see any clear conclusion in this thread (this is why I am resurrecting

Re: [libvirt] [Qemu-devel] QEMU fstatfs(2) and libvirt SELinux policy

2012-03-09 Thread Stefan Hajnoczi
On Fri, Mar 9, 2012 at 5:16 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 09/03/2012 17:07, Stefan Hajnoczi ha scritto: So am I correct that this extra permission is only needed for a single RHEL6 release? If qemu won't be doing fstafs on an ongoing basis, it doesn't seem like a good idea