[libvirt] [PATCH] screenshot: Set access rights to temporary file

2011-06-29 Thread Michal Privoznik
Although we create a temporary file, it is owned by root:root and have rights 0600. In case qemu does not run under root, it is unable to write to that file and thus we transfer 0B sized file. --- src/qemu/qemu_driver.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

Re: [libvirt] [PATCH] build: fix build --without-remote

2011-06-29 Thread Daniel P. Berrange
On Tue, Jun 28, 2011 at 09:31:50PM -0600, Eric Blake wrote: When configured --without-remote, the files remote_protocol.[ch] are not built by src/Makefile, but are still used by daemon/Makefile. The solution is to copy the implicit rule. * daemon/Makefile.am (%protocol.c, %protocol.h): Copy

Re: [libvirt] [PATCH] build: avoid pod2man on tarball

2011-06-29 Thread Daniel P. Berrange
On Tue, Jun 28, 2011 at 09:58:02PM -0600, Eric Blake wrote: virt-sanlock-cleanup.8 has static contents (no dependency on configure), but is generated by pod2man (a perl dependency that maintainers must have, but which ordinary tarball users need not have). Therefore, ensure that it is always

Re: [libvirt] [PATCH] build: simplify sanlock distribution

2011-06-29 Thread Daniel P. Berrange
On Tue, Jun 28, 2011 at 10:22:17PM -0600, Eric Blake wrote: EXTRA_DIST is intended for files that must unconditionally be part of the tarball, so it should be outside HAVE_SANLOCK. Once that is fixed, then there is no need to cp an unchanged qemu-sanlock.conf from srcdir to builddir in a VPATH

Re: [libvirt] [PATCH] screenshot: Set access rights to temporary file

2011-06-29 Thread Daniel P. Berrange
On Wed, Jun 29, 2011 at 10:23:38AM +0200, Michal Privoznik wrote: Although we create a temporary file, it is owned by root:root and have rights 0600. In case qemu does not run under root, it is unable to write to that file and thus we transfer 0B sized file. Hmm, why didn't QEMU return an

Re: [libvirt] [PATCH 1/9] Fix crash when aborting a stream from a I/O callback

2011-06-29 Thread Daniel P. Berrange
On Tue, Jun 28, 2011 at 11:39:41AM -0600, Eric Blake wrote: On 06/28/2011 11:01 AM, Daniel P. Berrange wrote: If a callback being invoked from a stream issues a virStreamAbort operation, the stream data will be free'd but the callback will then stil try to use this. Delay free'ing of the

Re: [libvirt] [PATCH 8/9] Fix locking wrt virNetClientStreamPtr object

2011-06-29 Thread Daniel P. Berrange
On Tue, Jun 28, 2011 at 12:12:53PM -0600, Eric Blake wrote: On 06/28/2011 11:01 AM, Daniel P. Berrange wrote: The client stream object can be used independantly of the s/independantly/independently/ virNetClientPtr object, so must have full locking of its own and not rely on any

Re: [libvirt] [PATCH] dnsmasq: Fix errno handling and don't unlink non-existing files

2011-06-29 Thread Matthias Bolte
2011/6/29 Daniel Veillard veill...@redhat.com: On Wed, Jun 29, 2011 at 02:14:19AM +0200, Matthias Bolte wrote: addnhostsSave and hostsfileSave expect 0 return value on error from addnhostsWrite and hostsfileWrite but then pass err instead of -err to virReportSystemError that expects an errno

Re: [libvirt] [PATCH] screenshot: Set access rights to temporary file

2011-06-29 Thread Michal Privoznik
On 29.06.2011 11:39, Daniel P. Berrange wrote: On Wed, Jun 29, 2011 at 10:23:38AM +0200, Michal Privoznik wrote: Although we create a temporary file, it is owned by root:root and have rights 0600. In case qemu does not run under root, it is unable to write to that file and thus we transfer 0B

Re: [libvirt] [PATCH 0/7] Add support for setting QoS

2011-06-29 Thread D. Herrendoerfer
On Jun 24, 2011, at 9:34 AM, Michal Privoznik wrote: 3) Similarly for macvtap networks, will the network-wide bandwidth limiting be applied to the physical ethernet device? This would have the side effect of including host traffic on that interface in the bandwidth totals, but I don't

[libvirt] building error

2011-06-29 Thread Wen Congyang
When I build libvirt, I meet the following error: make[3]: Entering directory `/home/wency/rpmbuild/BUILD/libvirt-0.9.2/daemon' CC libvirtd-libvirtd.o CC libvirtd-remote.o remote.c: In function 'remoteDispatchAuthPolkit': remote.c:2043: error: invalid initializer make[3]: ***

[libvirt] [PATCH 2/2] doc: Add docs for two new introduced commands

2011-06-29 Thread Osier Yang
For commands eject-media and insert-media. --- tools/virsh.pod | 33 + 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 736b919..ccee715 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -927,6 +927,39 @@

[libvirt] [PATCH 0/2] Introduce two new virsh commands

2011-06-29 Thread Osier Yang
These two patches is to introduce two new virsh commands, one is eject-media, which is to eject media from CD or floppy drive, the other is insert-media, which is to insert media into CD or floppy drive. There are commands existed can be used to eject/insert media, such as update-device, but it's

[libvirt] [PATCH 1/2] virsh: Introduce two new commands to insert or eject media

2011-06-29 Thread Osier Yang
eject-media: eject media from CD or floppy drive. insert-media: insert media into CD or floppy drive. NB, only support CDROM or floppy disk. --- tools/virsh.c | 367 + 1 files changed, 367 insertions(+), 0 deletions(-) diff --git

[libvirt] [PATCH] virDomainEventCallbackListAddID: allow different domains to register lifecycle events

2011-06-29 Thread boettcher
Hello, I had trouble of registering an VIR_DOMAIN_EVENT_ID_LIFECYLCE event for different domains separately. First I invoke [0] with one domain, and later with another one. For the second call the operation will be denied by libvir: error : internal error event callback already tracked. I

[libvirt] libvirt-php login issue to ESXi

2011-06-29 Thread Koen Calliauw
Hi all, I've started playing with libvirt-php yesterday and with the help of Michal Novotny got it running quite painlessly. However, the login from PHP to my testing ESXi server seems to be failing. I've wiresharked the HTTP traffic with a virsh -c (which works) and compared that to the traffic

Re: [libvirt] libvirt-php login issue to ESXi

2011-06-29 Thread Koen Calliauw
Hi Michal, Here's what appears in the logfile when using libvirt_logfile_set: [Wed Jun 29 15:18:00 2011] [error] [client 10.9.1.10] PHP Warning: libvirt_connect(): internal error HTTP response code 500 for call to 'Login'. Fault: ServerFaultCode - Cannot complete login due to an incorrect user

Re: [libvirt] libvirt-php login issue to ESXi

2011-06-29 Thread Michal Novotny
Hi Koen, that's bad. I don't have logging of username and password length here. I'll try to work on this. You can try attached patch to extend logging by username and password in the mean time and provide me the full resulting log file? Please review whether there is no password and if there is

Re: [libvirt] libvirt-php login issue to ESXi

2011-06-29 Thread Koen Calliauw
Hi Michal, Here's the output. Please note that special characters were visible when opening the file with vi, though not with a cat on the console, so this is a copy/paste out of vi. [2011-06-29 15:43:58 libvirt-php/core]: libvirt_connect: credentials index 2 [2011-06-29 15:43:58

Re: [libvirt] libvirt-php login issue to ESXi

2011-06-29 Thread Michal Novotny
Hi Koen, please try this patch. I can't test it myself since it's logging automatically in my setup but I *think* I may have found the problem. Could you please apply attached patch (revert the patch I sent to you before) and provide me the test results? Thanks, Michal On 06/29/2011 03:47 PM,

Re: [libvirt] libvirt-php login issue to ESXi

2011-06-29 Thread Michal Novotny
Hi Koen, so is it working fine already ? I'm glad to hear that ;-) Best regards, Michal On 06/29/2011 04:04 PM, Koen Calliauw wrote: Hi Michal, That resolved the issue! Thank you very much for the quick resolution, I appreciate it. Best regards, Koen On Wed, Jun 29, 2011 at 4:00 PM,

Re: [libvirt] libvirt-php login issue to ESXi

2011-06-29 Thread Koen Calliauw
Hi Michal, That resolved the issue! Thank you very much for the quick resolution, I appreciate it. Best regards, Koen On Wed, Jun 29, 2011 at 4:00 PM, Michal Novotny minov...@redhat.com wrote: Hi Koen, please try this patch. I can't test it myself since it's logging automatically in my

Re: [libvirt] libvirt-php login issue to ESXi

2011-06-29 Thread Koen Calliauw
Hi, Yes, it's connecting perfectly now and I get the expected result from print_r(libvirt_connect_get_hypervisor($conn)); Array ( [hypervisor] = ESX [major] = 4 [minor] = 1 [release] = 0 [hypervisor_string] = ESX 4.1.0 ) Thanks again, Best regards, Koen On Wed, Jun 29,

Re: [libvirt] libvirt-php login issue to ESXi

2011-06-29 Thread Michal Novotny
Hi, that's great. I'm really glad to hear that ;-) If you have any further issues don't hesitate to write an e-mail again ;-) Thanks, Michal On 06/29/2011 04:08 PM, Koen Calliauw wrote: Hi, Yes, it's connecting perfectly now and I get the expected result from

[libvirt] ANNOUNCE: libvirt Perl bindings Sys::Virt 0.2.7 release

2011-06-29 Thread Daniel P. Berrange
I am happy to announce a new release of the libvirt Perl bindings, Sys::Virt 0.2.7 is available for download: http://search.cpan.org/CPAN/authors/id/D/DA/DANBERR/Sys-Virt-0.2.7.tar.gz Changes in this release - Honour flags parameter when dumping XML - Use thread local error APIs exclusively

Re: [libvirt] [PATCH] build: simplify sanlock distribution

2011-06-29 Thread Eric Blake
On 06/29/2011 03:38 AM, Daniel P. Berrange wrote: - -$(builddir)/locking/%-sanlock.conf: $(srcdir)/locking/sanlock.conf -$(AM_V_GEN)mkdir locking ; \ -cp $ $@ How does 'qemu-sanlock.conf' get created now ? This rule is what actually tells make how to create 'qemu-sanlock.conf'

Re: [libvirt] [PATCH] build: fix build --without-remote

2011-06-29 Thread Eric Blake
On 06/29/2011 03:36 AM, Daniel P. Berrange wrote: On Tue, Jun 28, 2011 at 09:31:50PM -0600, Eric Blake wrote: When configured --without-remote, the files remote_protocol.[ch] are not built by src/Makefile, but are still used by daemon/Makefile. The solution is to copy the implicit rule. *

Re: [libvirt] building error

2011-06-29 Thread Eric Blake
On 06/29/2011 05:18 AM, Wen Congyang wrote: When I build libvirt, I meet the following error: make[3]: Entering directory `/home/wency/rpmbuild/BUILD/libvirt-0.9.2/daemon' CC libvirtd-libvirtd.o CC libvirtd-remote.o remote.c: In function 'remoteDispatchAuthPolkit': remote.c:2043:

[libvirt] FYI: migration test script for TCK

2011-06-29 Thread Daniel P. Berrange
I just added a new test case to the libvirt TCK for validating QEMU migration. http://libvirt.org/git/?p=libvirt-tck.git;a=commitdiff;h=f74faf2d8c83538dcdba59936e344dfa31bb1f4d It tests 96 different scenarios for successful migration, made up of: - Three different control/communication

Re: [libvirt] [PATCH] sysinfo: fix illegal NULL return

2011-06-29 Thread Eric Blake
On 06/28/2011 10:33 PM, Minoru Usui wrote: If virSysinfoParse{BIOS,System,Processor,Memory}() can't find newline('\n'), these return NULL. This patch fixes this. Signed-off-by: Minoru Usui u...@mxm.nes.nec.co.jp --- src/util/sysinfo.c | 23 +-- 1 files changed, 13

Re: [libvirt] [PATCH] build: avoid pod2man on tarball

2011-06-29 Thread Eric Blake
On 06/29/2011 03:36 AM, Daniel P. Berrange wrote: On Tue, Jun 28, 2011 at 09:58:02PM -0600, Eric Blake wrote: virt-sanlock-cleanup.8 has static contents (no dependency on configure), but is generated by pod2man (a perl dependency that maintainers must have, but which ordinary tarball users

[libvirt] [PATCHv2] build: simplify sanlock distribution

2011-06-29 Thread Eric Blake
EXTRA_DIST files should unconditionally be part of the tarball, rather than depending on the presence of sanlock-devel. Meanwhile, parallel builds could fail if we don't use mkdir -p. * src/Makefile.am (EXTRA_DIST): Always ship sanlock .aug and template .conf files. (%-sanlock.conf): Use

Re: [libvirt] [Libvirt-test-API][PATCH 2/6] add flags option to create.py to support creating domain with running or paused state

2011-06-29 Thread Nan Zhang
On 06/28/2011 01:54 PM, Guannan.ren wrote: --- repos/domain/create.py | 53 --- 1 files changed, 40 insertions(+), 13 deletions(-) diff --git a/repos/domain/create.py b/repos/domain/create.py index 343aba2..a06a2d3 100644 ---

Re: [libvirt] [Libvirt-test-API][PATCH 3/6] add flags option to start to have domain started with flags support

2011-06-29 Thread Nan Zhang
On 06/28/2011 01:54 PM, Guannan.ren wrote: --- repos/domain/start.py | 32 ++-- 1 files changed, 30 insertions(+), 2 deletions(-) diff --git a/repos/domain/start.py b/repos/domain/start.py index 34906e5..39ac47f 100644 --- a/repos/domain/start.py +++

Re: [libvirt] [PATCH 0/2] Introduce two new virsh commands

2011-06-29 Thread Eric Blake
On 06/29/2011 06:19 AM, Osier Yang wrote: These two patches is to introduce two new virsh commands, one is eject-media, which is to eject media from CD or floppy drive, the other is insert-media, which is to insert media into CD or floppy drive. There are commands existed can be used to

Re: [libvirt] sysinfo: delete unnecessary white space of sysinfo.

2011-06-29 Thread Eric Blake
On 06/28/2011 07:47 PM, Minoru Usui wrote: Maybe we should use c_isspace() instead of open-coding this. And how is backslash a space? I'll replace above block to c_isspace(). BTW, I copied its block from virSkipSpaces(). Ah, that explains your original design choices. It seems

Re: [libvirt] [PATCHv2 1/2] sysinfo: add virSkipSpacesBackwards()

2011-06-29 Thread Eric Blake
On 06/28/2011 10:42 PM, Minoru Usui wrote: sysinfo: add virSkipSpacesBackwards() * Add virSkipSpacesBackwards() to src/util/util.[ch] Signed-off-by: Minoru Usui u...@mxm.nes.nec.co.jp --- src/util/util.c | 25 + src/util/util.h |1 + 2 files changed, 26

Re: [libvirt] [PATCHv2 1/2] sysinfo: add virSkipSpacesBackwards()

2011-06-29 Thread Eric Blake
On 06/29/2011 11:04 AM, Eric Blake wrote: void virTrimSpaces(char *str, char **endp) { char *end; if (!endp || !*endp) end = str + strlen(str); else end = *endp; while (end str c_isspace(end[-1])) end--; if (endp) { if (!*endp)

Re: [libvirt] building error

2011-06-29 Thread Wen Congyang
At 06/29/2011 11:04 PM, Eric Blake Write: On 06/29/2011 05:18 AM, Wen Congyang wrote: When I build libvirt, I meet the following error: make[3]: Entering directory `/home/wency/rpmbuild/BUILD/libvirt-0.9.2/daemon' CC libvirtd-libvirtd.o CC libvirtd-remote.o remote.c: In function

[libvirt] [PATCH RFC V2 00/10] support cpu bandwidth in libvirt

2011-06-29 Thread Wen Congyang
TODO: 1. We create sub directory for each vcpu in cpu subsystem. So we should recalculate cpu.shares for each vcpu. Changelog: v2: almost rewrite the patchset to support to control each vcpu's bandwidth. Limit quota to [-1, 2^64/1000] at the schemas level. We will check it at

[libvirt] [PATCH 1/2] cpuset: Add cpuset cgroup support.

2011-06-29 Thread Gui Jianfeng
Currently, libvirt makes use of sched_setaffinity() to set Guest processes's cpu affinity. But, sometimes, for instance, when QEmu uses vhost-net, the kernel part of vhost will create a kernel thread for some purpose. In this case, such kernel thread won't inherit QEmu's cpu affinity. This patch

[libvirt] [PATCH 05/10] support to pass VIR_DOMAIN_AFFECT_CURRENT to virDomainGetVcpusFlags()

2011-06-29 Thread Wen Congyang
We need this feature in the following patch. --- include/libvirt/libvirt.h.in |3 ++- src/libvirt.c| 12 ++-- src/qemu/qemu_driver.c | 18 ++ 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/include/libvirt/libvirt.h.in

[libvirt] [PATCH 03/10] Update XML Schema for new entries

2011-06-29 Thread Wen Congyang
--- docs/schemas/domain.rng | 29 - 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng index 891662d..99c7fd6 100644 --- a/docs/schemas/domain.rng +++ b/docs/schemas/domain.rng @@ -376,6 +376,19 @@

[libvirt] [PATCH 07/10] vcpubandwidth: implement the code to support new API for the qemu driver

2011-06-29 Thread Wen Congyang
--- src/qemu/qemu_driver.c | 411 1 files changed, 411 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 9ddbc0f..03b8b9b 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5942,6

[libvirt] [PATCH 08/10] vcpubandwidth: implement the remote protocol to address the new API

2011-06-29 Thread Wen Congyang
--- daemon/remote.c | 132 ++ src/remote/remote_driver.c | 64 src/remote/remote_protocol.x | 32 ++- src/rpc/gendispatch.pl | 30 ++ 4 files changed, 257 insertions(+), 1 deletions(-) diff

[libvirt] [PATCH RFC V2 10/10] doc: Add documentation for new cputune elements period and quota

2011-06-29 Thread Wen Congyang
--- docs/formatdomain.html.in | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 3a64983..7e1e5f0 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -294,6 +294,8 @@

[libvirt] libvirt-0.9.3 week freeze, RC2 version to test

2011-06-29 Thread Daniel Veillard
Following the changes done in the daemon and client code to use the new RPC implementation, and the large amount of patches and fixes since RC1 I have made a new release candidate RC2 based on current git. ftp://libvirt.org/libvirt/libvirt-0.9.3-rc2.tar.gz as well as related rpms for those

Re: [libvirt] [PATCH 1/2] cpuset: Add cpuset cgroup support.

2011-06-29 Thread KAMEZAWA Hiroyuki
On Thu, 30 Jun 2011 11:08:32 +0800 Gui Jianfeng guijianf...@cn.fujitsu.com wrote: Currently, libvirt makes use of sched_setaffinity() to set Guest processes's cpu affinity. But, sometimes, for instance, when QEmu uses vhost-net, the kernel part of vhost will create a kernel thread for some

Re: [libvirt] [PATCH 1/2] cpuset: Add cpuset cgroup support.

2011-06-29 Thread Gui Jianfeng
KAMEZAWA Hiroyuki wrote: On Thu, 30 Jun 2011 11:08:32 +0800 Gui Jianfeng guijianf...@cn.fujitsu.com wrote: Currently, libvirt makes use of sched_setaffinity() to set Guest processes's cpu affinity. But, sometimes, for instance, when QEmu uses vhost-net, the kernel part of vhost will create

Re: [libvirt] libvirt-0.9.3 week freeze, RC2 version to test

2011-06-29 Thread Zdenek Styblik
On 06/30/11 05:36, Daniel Veillard wrote: Following the changes done in the daemon and client code to use the new RPC implementation, and the large amount of patches and fixes since RC1 I have made a new release candidate RC2 based on current git.

Re: [libvirt] [PATCH] Fix memory leak in virDomainVcpuPinDel()

2011-06-29 Thread Wen Congyang
At 06/28/2011 06:38 PM, Michal Privoznik Write: On 28.06.2011 05:41, Wen Congyang wrote: virDomainVcpuPinDefFree() does not free def-cputune.vcpupin if nvcpupin is 0, and does not set def-cputune.vcpupin to NULL. If we set nvcpupin to 0 but do not free vcpupin, vcpupin will not be freed when

Re: [libvirt] [PATCH] lock qemu_driver early in qemuGetSchedulerParametersFlags()

2011-06-29 Thread Wen Congyang
At 06/28/2011 10:50 PM, Eric Blake Write: On 06/28/2011 04:09 AM, Michal Privoznik wrote: On 28.06.2011 09:58, Wen Congyang wrote: If we pass VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG to qemuGetSchedulerParametersFlags() or *nparams is less than 1, we will unlock qemu_driver without

Re: [libvirt] [PATCH] save domain status after modifing vcpupin

2011-06-29 Thread Wen Congyang
At 06/28/2011 06:36 PM, Michal Privoznik Write: On 28.06.2011 05:43, Wen Congyang wrote: We should save domain status after modifing vcpupin. If not, we will get wrong vcpupin information after rebooting libvirtd. --- src/qemu/qemu_driver.c |2 ++ 1 files changed, 2 insertions(+), 0