Re: [libvirt] [PATCH V2] libxl: queue domain event earlier in shutdown handler

2014-02-25 Thread Michal Privoznik
On 24.02.2014 19:06, Jim Fehlig wrote: The shutdown handler may restart a domain when handling a reboot event or when on_* is set to 'restart'. Restarting consists of calling libxlVmCleanup followed by libxlVmStart. libxlVmStart will emit a VIR_DOMAIN_EVENT_STARTED event, but the SHUTDOWN

[libvirt] [PATCH 0/2] Improve RBD storage pool backend

2014-02-25 Thread Wido den Hollander
The first patch improves the logging for the user. Currently the return codes from librados are not written to any logfile, which might leave a user clueless to why the storage pool is not working. The second patch sets three timeout options in librados. These are useful for when the Ceph cluster

[libvirt] [PATCH 1/2] rbd: Include return statusses from librados/librbd in logging

2014-02-25 Thread Wido den Hollander
With this information it's easier for the user to debug what is going wrong. --- src/storage/storage_backend_rbd.c | 127 ++--- 1 file changed, 61 insertions(+), 66 deletions(-) diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c

[libvirt] [PATCH 2/2] rbd: Set timeout options for librados

2014-02-25 Thread Wido den Hollander
These timeout values make librados/librbd return -ETIMEDOUT when a operation is blocking due to a failing/unreachable Ceph cluster. By having the operations time out libvirt will not block. --- src/storage/storage_backend_rbd.c | 17 + 1 file changed, 17 insertions(+) diff

[libvirt] [PATCH v2 0/2] support dumping guest memory in compressed format

2014-02-25 Thread Qiao Nuohan
dumping guest's memroy is introduced without compression supported, and this is a freature regression of 'virsh dump --memory-only'. This patchset is used to add support in libvirt side to make qemu dump guest's memory in kdump-compressed format and please refer the following address to see

[libvirt] [PATCH v2 1/2] make qemu dump memory in kdump-compressed format

2014-02-25 Thread Qiao Nuohan
--memory-only option is introduced without compression supported. Therefore, this is a freature regression of virsh dump. Now qemu has support dumping memory in kdump-compressed format. This patch is used to add --compress and [--compression-format] string to virsh dump --memory-only and send

[libvirt] add dump_memory_format in qemu.conf

2014-02-25 Thread Qiao Nuohan
This patch is used to add dump_memory_format to qemu.conf and libvirt will use it to specify the default format in which qemu dumps guest's memory. But when --compress is specified with virsh dump --memory-only, the format configured by dump_memory_format will be overrided. dump_memory_format can

Re: [libvirt] add dump_memory_format in qemu.conf

2014-02-25 Thread Qiao Nuohan
On 02/25/2014 05:55 PM, Qiao Nuohan wrote: This patch is used to add dump_memory_format to qemu.conf and libvirt will use it to specify the default format in which qemu dumps guest's memory. But when --compress is specified with virsh dump --memory-only, the format configured by

Re: [libvirt] [PATCH 0/2] Improve RBD storage pool backend

2014-02-25 Thread Ján Tomko
On 02/25/2014 10:50 AM, Wido den Hollander wrote: The first patch improves the logging for the user. Currently the return codes from librados are not written to any logfile, which might leave a user clueless to why the storage pool is not working. The second patch sets three timeout options

Re: [libvirt] [PATCH 3/3] gluster: Fix key attribute for gluster volumes

2014-02-25 Thread Peter Krempa
On 02/24/14 21:59, Eric Blake wrote: On 02/24/2014 08:21 AM, Peter Krempa wrote: According to our documentation the key value has the following meaning: Providing an identifier for the volume which is globally unique. This cannot be set when creating a volume: it is always generated. The

Re: [libvirt] [PATCH v2 1/2] make qemu dump memory in kdump-compressed format

2014-02-25 Thread Jiri Denemark
On Tue, Feb 25, 2014 at 17:54:30 +0800, Qiao Nuohan wrote: --memory-only option is introduced without compression supported. Therefore, this is a freature regression of virsh dump. Now qemu has support dumping memory in kdump-compressed format. This patch is used to add --compress and

Re: [libvirt] [PATCH 3/3] gluster: Fix key attribute for gluster volumes

2014-02-25 Thread Daniel P. Berrange
On Mon, Feb 24, 2014 at 01:59:30PM -0700, Eric Blake wrote: On 02/24/2014 08:21 AM, Peter Krempa wrote: According to our documentation the key value has the following meaning: Providing an identifier for the volume which is globally unique. This cannot be set when creating a volume: it is

Re: [libvirt] [PATCH] qemu: cleanup tap devices on FreeBSD

2014-02-25 Thread Daniel P. Berrange
On Mon, Feb 24, 2014 at 11:12:33PM +0400, Roman Bogorodskiy wrote: We have to explicitly destroy TAP devices on FreeBSD because they're not freed after being closed, otherwise we end up with orphaned TAP devices after destroying a domain. --- src/qemu/qemu_process.c | 7 +++ 1 file

Re: [libvirt] [PATCH 6/7] conf: output actual netdev status in interface XML

2014-02-25 Thread Daniel P. Berrange
On Fri, Feb 21, 2014 at 03:58:21PM +0200, Laine Stump wrote: [D] interface type='network' source network='testnet' portgroup='admin'/ actual type='direct' source dev='p4p1_0' mode='bridge'/ bandwidth inbound average='1000' peak='5000' burst='1024'/

[libvirt] libvirt iSCSI target discovery

2014-02-25 Thread Sijo Jose
Hi, Is it possible to discover iSCSI targets using libvirt API..? OR is it possible to get the similar results of below commands using libvirtAPI..? iscsiadm --mode discovery --type sendtargets --portal server1.example.com sudo iscsiadm -m discovery -t st -p 192.168.0.10 Regards Sijo --

Re: [libvirt] [PATCH 3/3] gluster: Fix key attribute for gluster volumes

2014-02-25 Thread Eric Blake
On 02/25/2014 03:36 AM, Peter Krempa wrote: The problem you are describing here is that two different keys may map to a single volume. The issue I'm trying to solve is that one key may map to two distinct volumes. As a first step we should thus clarify which way the key should be unique.

Re: [libvirt] [PATCH 0/7] network: include plugged interface XML in plugged network hook

2014-02-25 Thread Laine Stump
On 02/21/2014 03:58 PM, Laine Stump wrote: Although the immediate reason for all these patches is $subject, it really is something that should have been done a long time ago (I just hadn't convinced myself it was the right thing to do). These patches will allow a management application to

[libvirt] KVM Domain memory and disk usage

2014-02-25 Thread Qiang Fu
Hi all, I am trying to use virsh to get the memory and storage usage for KVM domain. Right now we can get domain memory statistics through the following virsh cmds: 1. dumpxml: this returns memory and currentMemory 2. dominfo: this returns Max memory and Used memory 3.

Re: [libvirt] Compiling libvirt RPC client library for QNX

2014-02-25 Thread Panday Ritesh Sharma (rpanday)
Hi Eric, I used the option '--without-macvtap' and I was able to compile on my linux box. When I compiled, I see many libraries are getting built. But as I have explained my requirement earlier, I just need a RPC client library, essentially the option '--with-remote'. If I check .c files I see

Re: [libvirt] [PATCH 3/3] virNetServerRun: Notify systemd that we're accepting clients

2014-02-25 Thread Eric Blake
On 02/21/2014 05:32 AM, Michal Privoznik wrote: Systemd does not forget about the cases, where client service needs to wait for daemon service to initialize and start accepting new clients. Setting a dependency in client is not enough as systemd doesn't know when the daemon has initialized

Re: [libvirt] Compiling libvirt RPC client library for QNX

2014-02-25 Thread Daniel P. Berrange
On Tue, Feb 25, 2014 at 03:10:59PM +, Panday Ritesh Sharma (rpanday) wrote: Hi Eric, I used the option '--without-macvtap' and I was able to compile on my linux box. When I compiled, I see many libraries are getting built. But as I have explained my requirement earlier, I just need a RPC

Re: [libvirt] Compiling libvirt RPC client library for QNX

2014-02-25 Thread Eric Blake
On 02/25/2014 08:10 AM, Panday Ritesh Sharma (rpanday) wrote: Once again, please don't top-post on technical lists. Hi Eric, I used the option '--without-macvtap' and I was able to compile on my linux box. When I compiled, I see many libraries are getting built. But as I have explained my

Re: [libvirt] [PATCH 3/3] virNetServerRun: Notify systemd that we're accepting clients

2014-02-25 Thread Michal Privoznik
On 25.02.2014 16:18, Eric Blake wrote: On 02/21/2014 05:32 AM, Michal Privoznik wrote: Systemd does not forget about the cases, where client service needs to wait for daemon service to initialize and start accepting new clients. Setting a dependency in client is not enough as systemd doesn't

[libvirt] [PATCH] network: unplug bandwidth and call networkRunHook only when appropriate

2014-02-25 Thread Laine Stump
According to commit b4e0299dm if networkAllocateActualDevice() was successful, it will *always* allocate an iface-data.network.actual, so we can use this during networkReleaseActualDevice() to know if there is really anything to undo. We were properly using this information to only decrement the

[libvirt] [PATCH] network: don't even call networkRunHook if there is no network

2014-02-25 Thread Laine Stump
networkAllocateActualDevice() is called for *all* interfaces, not just those with type='network'. In that case, it will jump down to its validate: label immediately, without allocating anything. After validation is done, two counters are potentially updated (one for the network, and one for any

[libvirt] LXC: capset fails with userns

2014-02-25 Thread Stephan Sachse
w/ userns: [root@fedora2 ~]# setcap 'cap_net_admin,cap_net_raw+ep' /usr/bin/ping Failed to set capabilities on file `/usr/bin/ping' (Operation not permitted) [root@fedora2 ~]# id uid=0(root) gid=0(root) groups=0(root) w/o userns: [root@fedora2 ~]# setcap 'cap_net_admin,cap_net_raw+ep'

Re: [libvirt] [PATCH 3/3] virNetServerRun: Notify systemd that we're accepting clients

2014-02-25 Thread Eric Blake
On 02/25/2014 08:33 AM, Michal Privoznik wrote: Adds a new configure option, but doesn't change the spec file. This is bad, because it means that someone doing 'make rpm' now has an indeterminate behavior based on whether they have the library installed. We need a followup patch. Not

[libvirt] [PATCH] virNetDevVethCreate: Serialize callers

2014-02-25 Thread Michal Privoznik
Consider dozen of LXC domains, each of them having this type of interface: interface type='network' mac address='52:54:00:a7:05:4b'/ source network='default'/ /interface When starting these domain in parallel, all workers may meet in virNetDevVethCreate() where a race starts.

Re: [libvirt] Compiling libvirt RPC client library for QNX

2014-02-25 Thread Panday Ritesh Sharma (rpanday)
Hi Daniel, I ran ./configure command with below options. I found these options in on of the mail replied by you. But still 'make' is compiling so many files. My question is, as I need only RPC client library (I can explain you more, what I want to do with this libvirt client library on QNX), do I

Re: [libvirt] Compiling libvirt RPC client library for QNX

2014-02-25 Thread Panday Ritesh Sharma (rpanday)
On 25/02/14 9:18 PM, Panday Ritesh Sharma (rpanday) rpan...@cisco.com wrote: Hi Roman, Sorry !!! I did not understand Once again, please don't top-post on technical lists. I should not include 'libvirt-l...@redhat.com' in my mail thread ? I have already used the option '--without-libvirtd'

Re: [libvirt] LXC: capset fails with userns

2014-02-25 Thread Stephan Sachse
Can you check /proc/self/status to see the capabilities mask you have. [root@fedora2 ~]# cat /proc/self/status | grep ^Cap CapInh: CapPrm: 001db5fe CapEff: 001db5fe CapBnd: 001db5fe [root@fedora2 ~]# capsh --print Current: =ep

Re: [libvirt] LXC: capset fails with userns

2014-02-25 Thread Daniel P. Berrange
On Tue, Feb 25, 2014 at 04:50:47PM +0100, Stephan Sachse wrote: w/ userns: [root@fedora2 ~]# setcap 'cap_net_admin,cap_net_raw+ep' /usr/bin/ping Failed to set capabilities on file `/usr/bin/ping' (Operation not permitted) [root@fedora2 ~]# id uid=0(root) gid=0(root) groups=0(root) Can you

Re: [libvirt] Compiling libvirt RPC client library for QNX

2014-02-25 Thread Daniel P. Berrange
On Tue, Feb 25, 2014 at 03:39:58PM +, Panday Ritesh Sharma (rpanday) wrote: Hi Daniel, I ran ./configure command with below options. I found these options in on of the mail replied by you. But still 'make' is compiling so many files. My question is, as I need only RPC client library (I can

Re: [libvirt] Compiling libvirt RPC client library for QNX

2014-02-25 Thread Panday Ritesh Sharma (rpanday)
On 25/02/14 10:03 PM, Daniel P. Berrange berra...@redhat.com wrote: On Tue, Feb 25, 2014 at 03:39:58PM +, Panday Ritesh Sharma (rpanday) wrote: Hi Daniel, I ran ./configure command with below options. I found these options in on of the mail replied by you. But still 'make' is compiling

[libvirt] [PATCH libvirt-java] spec: Depend on java-headless for Fedora 21+

2014-02-25 Thread Cole Robinson
Details: https://bugzilla.redhat.com/show_bug.cgi?id=1068369 --- libvirt-java.spec.in | 4 1 file changed, 4 insertions(+) diff --git a/libvirt-java.spec.in b/libvirt-java.spec.in index 137af83..d07b998 100644 --- a/libvirt-java.spec.in +++ b/libvirt-java.spec.in @@ -12,7 +12,11 @@

Re: [libvirt] [PATCH libvirt-java] spec: Depend on java-headless for Fedora 21+

2014-02-25 Thread Daniel P. Berrange
On Tue, Feb 25, 2014 at 12:14:25PM -0500, Cole Robinson wrote: Details: https://bugzilla.redhat.com/show_bug.cgi?id=1068369 --- libvirt-java.spec.in | 4 1 file changed, 4 insertions(+) diff --git a/libvirt-java.spec.in b/libvirt-java.spec.in index 137af83..d07b998 100644 ---

Re: [libvirt] [PATCH libvirt-java] spec: Depend on java-headless for Fedora 21+

2014-02-25 Thread Cole Robinson
On 02/25/2014 12:17 PM, Daniel P. Berrange wrote: On Tue, Feb 25, 2014 at 12:14:25PM -0500, Cole Robinson wrote: Details: https://bugzilla.redhat.com/show_bug.cgi?id=1068369 --- libvirt-java.spec.in | 4 1 file changed, 4 insertions(+) diff --git a/libvirt-java.spec.in

Re: [libvirt] Compiling libvirt RPC client library for QNX

2014-02-25 Thread Daniel P. Berrange
On Tue, Feb 25, 2014 at 05:00:47PM +, Panday Ritesh Sharma (rpanday) wrote: On 25/02/14 10:03 PM, Daniel P. Berrange berra...@redhat.com wrote: On Tue, Feb 25, 2014 at 03:39:58PM +, Panday Ritesh Sharma (rpanday) wrote: Hi Daniel, I ran ./configure command with below options.

Re: [libvirt] Compiling libvirt RPC client library for QNX

2014-02-25 Thread Eric Blake
On 02/25/2014 09:05 AM, Panday Ritesh Sharma (rpanday) wrote: We are using a wrapper of make for compilation for QNX. So I need to know, when I am compiling this client library on linux with '--without-libvirtd' option, what all .c files and libraries are being used. Then I will take those

[libvirt] [PATCH 1/3] build: fix spelling of configur --with-systemd-daemon

2014-02-25 Thread Eric Blake
Commit 68954fb added a configure option --with-systemd_daemon, which violates the conventions of configure files preferring dash in all option names. This fixes it, before we hit a release where the tarball is baked with an awkward name. * m4/virt-lib.m4 (LIBVIRT_CHECK_LIB,

[libvirt] [PATCH 0/3] spec file improvements

2014-02-25 Thread Eric Blake
Our spec file is non-deterministic if you have this in your ~/.rpmmacros: %_without_udev 1 because it then depends on whether you have systemd-devel installed rather than being explicitly stated in the spec file. [At this point, I'm sending the series to get the review started on the two trivial

[libvirt] [PATCH 2/3] spec: explicitly avoid bhyve on Linux

2014-02-25 Thread Eric Blake
Generally, we try to make the spec file tweakable via user variables, so that they can select a different subset of sub-rpms to build. We also try to explicitly list all driver config options, rather than leaving the chance that the rpm build may be non-deterministic based on what the user had

Re: [libvirt] [PATCH V2] libxl: queue domain event earlier in shutdown handler

2014-02-25 Thread Jim Fehlig
Michal Privoznik wrote: On 24.02.2014 19:06, Jim Fehlig wrote: The shutdown handler may restart a domain when handling a reboot event or when on_* is set to 'restart'. Restarting consists of calling libxlVmCleanup followed by libxlVmStart. libxlVmStart will emit a VIR_DOMAIN_EVENT_STARTED

Re: [libvirt] [libvirt-users] libvirt iSCSI target discovery

2014-02-25 Thread Daniel P. Berrange
On Tue, Feb 25, 2014 at 07:09:11PM +0530, Sijo Jose wrote: Hi, Is it possible to discover iSCSI targets using libvirt API..? OR is it possible to get the similar results of below commands using libvirtAPI..? iscsiadm --mode discovery --type sendtargets --portal server1.example.com

[libvirt] [PATCH 2.5/3] spec: require device-mapper-devel for storage-disk

2014-02-25 Thread Eric Blake
On Fedora 20, with the following in my ~/.rpmmacros: %_without_udev 1 %_without_storage_mpath 1 and with device-mapper-devel uninstalled, 'make rpm' fails with: checking for libdevmapper.h... no configure: error: You must install device-mapper-devel/libdevmapper = 1.0.0 to compile libvirt

[libvirt] [PATCH 3/3] spec: make systemd_daemon usage configurable

2014-02-25 Thread Eric Blake
On Fedora 20, I added this to my '~/.rpmmacros': %_without_udev 1 %_without_storage_mpath 1 %_without_storage_disk 1 and uninstalled systemd-devel (which also removed device-mapper-devel). Then I ran 'make rpm', and inspected the results: $ ldd

Re: [libvirt] Question about building libvirt.so

2014-02-25 Thread vikhyath reddy
Libvirt can't tell you what the guest is running. For that, you need higher-level software, such as libguestfs. virt-manager is an example of a program that uses libguestfs to probe which OS is running in the guest. Awesome! you guys are of so much help. And sorry for top posting. Ran into

Re: [libvirt] Question about building libvirt.so

2014-02-25 Thread Eric Blake
On 02/25/2014 02:41 PM, vikhyath reddy wrote: a) virConnectListAllNetworks(...) b) virConnectListAllStoragePools(...) return not supported by connection driver. I am running ESX with libvirt-1.2.1. But I can use That merely means no one has written the patches for ESX to support those

[libvirt] [PATCHv2 1/10] nwfilter: make ignoring non-zero status easier to follow

2014-02-25 Thread Eric Blake
While auditing all callers of virCommandRun, I noticed that nwfilter code never paid attention to commands with a non-zero status; they were merely passing a pointer to avoid spamming the logs with a message about commands that might indeed fail. But proving this required chasing through a lot of

Re: [libvirt] [PATCH] virNetDevVethCreate: Serialize callers

2014-02-25 Thread Eric Blake
On 02/25/2014 09:07 AM, Michal Privoznik wrote: Consider dozen of LXC domains, each of them having this type of interface: interface type='network' mac address='52:54:00:a7:05:4b'/ source network='default'/ /interface When starting these domain in parallel, all

Re: [libvirt] [PATCH] network: don't even call networkRunHook if there is no network

2014-02-25 Thread Eric Blake
On 02/25/2014 08:46 AM, Laine Stump wrote: networkAllocateActualDevice() is called for *all* interfaces, not just those with type='network'. In that case, it will jump down to its validate: label immediately, without allocating anything. After validation is done, two counters are potentially

Re: [libvirt] [PATCH] network: unplug bandwidth and call networkRunHook only when appropriate

2014-02-25 Thread Eric Blake
On 02/25/2014 08:47 AM, Laine Stump wrote: According to commit b4e0299dm if networkAllocateActualDevice() was successful, it will *always* allocate an iface-data.network.actual, so we can use this during networkReleaseActualDevice() to know if there is really anything to undo. We were properly

[libvirt] [PATCH 1/2] build: fix cgroups on non-Linux

2014-02-25 Thread Eric Blake
Running ./autobuild.sh detected a mingw failure: CCLD libvirt.la Cannot export virCgroupGetPercpuStats: symbol not defined Cannot export virCgroupSetOwner: symbol not defined * src/util/vircgroup.c (virCgroupGetPercpuStats) (virCgroupSetOwner): Implement stubs. Signed-off-by: Eric Blake

[libvirt] [PATCH 0/2] fix mingw build

2014-02-25 Thread Eric Blake
I hit some issues while running ./autobuild.sh on a machine set up for a mingw cross build; pushing this series under the build-breaker rule. Eric Blake (2): build: fix cgroups on non-Linux build: avoid ld_preload tests on mingw src/util/vircgroup.c | 27 +-

[libvirt] [PATCH 2/2] build: avoid ld_preload tests on mingw

2014-02-25 Thread Eric Blake
Running ./autobuild.sh complained during the mingw cross-compile: CC libvirportallocatormock_la-virportallocatortest.lo ../../tests/virportallocatortest.c:32:20: fatal error: dlfcn.h: No such file or directory # include dlfcn.h ^ compilation terminated. With that

Re: [libvirt] Compiling libvirt RPC client library for QNX

2014-02-25 Thread Panday Ritesh Sharma (rpanday)
On 25/02/14 11:17 PM, Eric Blake ebl...@redhat.com wrote: On 02/25/2014 09:05 AM, Panday Ritesh Sharma (rpanday) wrote: We are using a wrapper of make for compilation for QNX. So I need to know, when I am compiling this client library on linux with '--without-libvirtd' option, what all .c

[libvirt] Availability of release candidate 2 for libvirt-1.2.2

2014-02-25 Thread Daniel Veillard
I tagged in git and pushed an rc2 tarball and rpms to the usual place: ftp://libvirt.org/libvirt/ I also made one for libvirt-python which sits now at: ftp://libvirt.org/libvirt/python/ This seems to work fine for me, I'm confident we can push the final release this week-end, but