Re: [libvirt] how to enable ceph-rbd in libvirt.

2012-10-13 Thread yue
i try your proposal. but there are no any output in qemu-rbd.log. selinux has been disabled(then reboot my OS). i do not know apparmor. my OS has no rpm of apparmor. my os is centps-6.2. 2.6.32-220.el6.x86_64. 1.would you give me the options of libvirt configure. i rebuild it. 2.if there a

Re: [libvirt] how to enable ceph-rbd in libvirt.

2012-10-13 Thread Josh Durgin
It sounds like the qemu binary that libvirt is using isn't one compiled with rbd support. You can check by running: qemu-kvm -drive format=? rbd should appear in the list of supported formats. Josh On 10/13/2012 01:20 AM, yue wrote: i try your proposal. but there are no any output in

[libvirt] Proposed libguestfs API for implementing libvirt virConnectOpenAuth

2012-10-13 Thread Richard W.M. Jones
As in the example code below. static void do_auth (guestfs_h *g, void *opaque, uint64_t event, int event_handle, int flags, const char *buf, size_t buf_len, const uint64_t *array, size_t array_len) { char **creds; size_t i; char *prompt;

[libvirt] [PATCH 2/2] Tweak comments in the policykit rules file

2012-10-13 Thread Cole Robinson
- Add the XML header so vim gives us syntax highlighting - polkit-policy-file-validate hasn't existed for 3 years - Permissions comment was not accurate --- daemon/libvirtd.policy.in | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/daemon/libvirtd.policy.in

[libvirt] [PATCH 1/2] Only keep one polkit rules file

2012-10-13 Thread Cole Robinson
Just tweak it at build time depending on what polkit version we are building for. --- .gitignore| 1 + daemon/Makefile.am| 16 +++- daemon/libvirtd.policy-0 | 42 -- daemon/libvirtd.policy-1 | 42

[libvirt] [PATCH] daemon: Use $(AM_V_GEN) in a few more places

2012-10-13 Thread Cole Robinson
--- daemon/Makefile.am | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 3405c67..1c7505b 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -84,10 +84,10 @@ augeastests_DATA = test_libvirtd.aug CLEANFILES +=

[libvirt] Some questions about virConnectAuthCallbackPtr

2012-10-13 Thread Richard W.M. Jones
Some questions which seem to be left ambigious by the documentation for virConnectAuthCallbackPtr: http://libvirt.org/html/libvirt-libvirt.html#virConnectAuthCallbackPtr (1) For a single open, can this be called multiple times? I'm thinking, some authentication methods might give the user N

Re: [libvirt] Some questions about virConnectAuthCallbackPtr

2012-10-13 Thread Richard W.M. Jones
Another comment about virConnectOpenAuth: Is it possible to test uses of this API from scripts? It'd be nice if the test driver allowed you to test authentication, but I notice in the source that all uses of virConnectAuthPtr are marked ATTRIBUTE_UNUSED, so I guess that's not a possible route.

[libvirt] [PATCH] Autogenerate AUTHORS

2012-10-13 Thread Cole Robinson
We add a helper python script build-aux/make-authors.py The .mailmap is expanded to give output as close to the original AUTHORS file as possible. Drop the syntax-check that validated AUTHORS is up to date. AUTHORS.in tracks the maintainers, as well as some folks who were previously in AUTHORS

Re: [libvirt] [PATCH] Autogenerate AUTHORS

2012-10-13 Thread Cole Robinson
On 10/13/2012 11:01 AM, Cole Robinson wrote: We add a helper python script build-aux/make-authors.py The .mailmap is expanded to give output as close to the original AUTHORS file as possible. Drop the syntax-check that validated AUTHORS is up to date. AUTHORS.in tracks the maintainers, as

Re: [libvirt] Some questions about virConnectAuthCallbackPtr

2012-10-13 Thread Richard W.M. Jones
On Sat, Oct 13, 2012 at 03:52:06PM +0100, Richard W.M. Jones wrote: Some questions which seem to be left ambigious by the documentation for virConnectAuthCallbackPtr: http://libvirt.org/html/libvirt-libvirt.html#virConnectAuthCallbackPtr (1) For a single open, can this be called multiple

Re: [libvirt] Some questions about virConnectAuthCallbackPtr

2012-10-13 Thread Richard W.M. Jones
On Sat, Oct 13, 2012 at 05:47:24PM +0100, Richard W.M. Jones wrote: BTW I cannot get the libssh2 backend in libvirt to work. For every host it says: libvirt_auth.c: authentication required for libvirt URI 'qemu+libssh2://localhost/system' libvirt_auth.c: credential 'echoprompt'

Re: [libvirt] how to enable ceph-rbd in libvirt.

2012-10-13 Thread libvirt
hahha, you are right.my qemu-kvm is installed from yum.repo ,not compiled by me. i always think qemu-kvm and qemu-system-x86_64 are not the same thing. actully they are the same thing. i replace /usr/libexec/qemu-kvm with my qemu-system-x86_64,now it works. i have a question. what the

Re: [libvirt] [PATCH] Autogenerate AUTHORS

2012-10-13 Thread Richard W.M. Jones
On Sat, Oct 13, 2012 at 11:03:42AM -0400, Cole Robinson wrote: On 10/13/2012 11:01 AM, Cole Robinson wrote: We add a helper python script build-aux/make-authors.py The .mailmap is expanded to give output as close to the original AUTHORS file as possible. Drop the syntax-check that validated

Re: [libvirt] [PATCH] Autogenerate AUTHORS

2012-10-13 Thread Doug Goldstein
On Sat, Oct 13, 2012 at 1:41 PM, Richard W.M. Jones rjo...@redhat.com wrote: On Sat, Oct 13, 2012 at 11:03:42AM -0400, Cole Robinson wrote: On 10/13/2012 11:01 AM, Cole Robinson wrote: We add a helper python script build-aux/make-authors.py The .mailmap is expanded to give output as close to

Re: [libvirt] Proposed libguestfs API for implementing libvirt virConnectOpenAuth

2012-10-13 Thread Richard W.M. Jones
I forgot to CC this list on the patch that implements this. It is here: https://www.redhat.com/archives/libguestfs/2012-October/msg00070.html Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install

Re: [libvirt] [PATCH 1/2] Only keep one polkit rules file

2012-10-13 Thread Eric Blake
On 10/13/2012 08:28 AM, Cole Robinson wrote: Just tweak it at build time depending on what polkit version we are building for. --- +libvirtd.policy: libvirtd.policy.in $(top_builddir)/config.status + $(AM_V_GEN) sed \ + -e 's![@]authaction[@]!$(policyauth)!g' \ + $

Re: [libvirt] [PATCH 2/2] Tweak comments in the policykit rules file

2012-10-13 Thread Eric Blake
On 10/13/2012 08:28 AM, Cole Robinson wrote: - Add the XML header so vim gives us syntax highlighting - polkit-policy-file-validate hasn't existed for 3 years - Permissions comment was not accurate --- daemon/libvirtd.policy.in | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-)

[libvirt] Problems using netdev_del+netdev_add w/o corresponding device_del+device_add

2012-10-13 Thread Laine Stump
I am attempting to enhance libvirt's virDomainUpdateDeviceFlags() API to support changing just about anything about the host side of a PCI network device without actually detaching the PCI device from the guest. Here is a patch I sent to the libvirt mailing list that I had thought would accomplish

Re: [libvirt] [PATCH] daemon: Use $(AM_V_GEN) in a few more places

2012-10-13 Thread Eric Blake
On 10/13/2012 08:29 AM, Cole Robinson wrote: --- daemon/Makefile.am | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) ACK. -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital

Re: [libvirt] [PATCH] Autogenerate AUTHORS

2012-10-13 Thread Eric Blake
On 10/13/2012 09:01 AM, Cole Robinson wrote: We add a helper python script build-aux/make-authors.py The .mailmap is expanded to give output as close to the original AUTHORS file as possible. Drop the syntax-check that validated AUTHORS is up to date. AUTHORS.in tracks the maintainers, as

Re: [libvirt] [PATCH] Autogenerate AUTHORS

2012-10-13 Thread Eric Blake
On 10/13/2012 09:03 AM, Cole Robinson wrote: On 10/13/2012 11:01 AM, Cole Robinson wrote: We add a helper python script build-aux/make-authors.py The .mailmap is expanded to give output as close to the original AUTHORS file as possible. Drop the syntax-check that validated AUTHORS is up to

Re: [libvirt] [PATCH 4/4] qemu: support live change of all netdev hostside config

2012-10-13 Thread Laine Stump
On 10/12/2012 05:58 AM, Laine Stump wrote: This is the final patch to resolve: https://bugzilla.redhat.com/show_bug.cgi?id=805071 This patch finalizes support live change of any/all hostside config of a network device as part of the public virDomainUpdateDeviceFlags API. The changes are

[libvirt] [PATCHv2 02/16] storage: treat 'aio' like 'raw' at parse time

2012-10-13 Thread Eric Blake
We have historically allowed 'aio' as a synonym for 'raw' for back-compat to xen, but since a future patch will move to using an enum value, we have to pick one to be our preferred output name. This is a slight change in the XML, but the sexpr and xm outputs should still be identical. *

[libvirt] [PATCHv2 00/16] qemu block-commit support

2012-10-13 Thread Eric Blake
I figured I'd better post this now, while I still iron out the remaining kinks in my SELinux handling (but I'm certainly a lot closer, now that I have libvirt actually identifying which files need the temporary SELinux labels). With this, you can now do things like 'virsh blockcommit $dom $disk

[libvirt] [PATCHv2 01/16] storage: list more file types

2012-10-13 Thread Eric Blake
When an image has no backing file, using VIR_STORAGE_FILE_AUTO for its type is a bit confusing. Additionally, a future patch would like to reserve a default value for the case of no file type specified in the XML, but different from the current use of -1 to imply probing, since probing is not

[libvirt] [PATCHv2 03/16] storage: match RNG to supported driver types

2012-10-13 Thread Eric Blake
At one point, the code passed through arbitrary strings for file formats, which supposedly lets qemu handle a new file type even before libvirt has been taught to handle it. However, to properly label files, libvirt has to learn the file type anyway, so we might as well make our life easier by

[libvirt] [PATCHv2 11/16] storage: make it easier to find file within chain

2012-10-13 Thread Eric Blake
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. * src/util/storage_file.c (virStorageFileChainLookup):

[libvirt] [PATCHv2 04/16] storage: use enum for default driver type

2012-10-13 Thread Eric Blake
Express the default disk type as an enum, for easier handling. * src/conf/capabilities.h (_virCaps): Store enum rather than string for disk type. * src/conf/domain_conf.c (virDomainDiskDefParseXML): Adjust clients. * src/qemu/qemu_driver.c (qemuCreateCapabilities): Likewise. ---

[libvirt] [PATCHv2 15/16] blockjob: wire up online qemu block-commit

2012-10-13 Thread Eric Blake
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 be deleted at the time the completion event

[libvirt] [PATCHv2 06/16] storage: use enum for snapshot driver type

2012-10-13 Thread Eric Blake
This is the last use of raw strings for disk formats throughout the src/conf directory. * src/conf/snapshot_conf.h (_virDomainSnapshotDiskDef): Store enum rather than string for disk type. * src/conf/snapshot_conf.c (virDomainSnapshotDiskDefClear) (virDomainSnapshotDiskDefParseXML,

[libvirt] [PATCHv2 10/16] storage: remember relative names in backing chain

2012-10-13 Thread Eric Blake
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. * src/util/storage_file.h (_virStorageFileMetadata):

[libvirt] [PATCHv2 12/16] storage: cache backing chain while qemu domain is live

2012-10-13 Thread Eric Blake
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, we want to also store the chain in domain XML, so

[libvirt] [PATCHv2 09/16] storage: don't require caller to pre-allocate metadata struct

2012-10-13 Thread Eric Blake
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 iteration over the chain. * src/util/storage_file.h

[libvirt] [PATCHv2 08/16] storage: get entire metadata chain in one call

2012-10-13 Thread Eric Blake
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. * src/util/storage_file.h

[libvirt] [PATCHv2 07/16] storage: don't probe non-files

2012-10-13 Thread Eric Blake
Backing chains can end on a network protocol, such as nbd:xxx; we should not attempt to probe the file system in this case. * src/storage/storage_backend_fs.c (virStorageBackendProbeTarget): Only probe files. --- src/storage/storage_backend_fs.c | 3 ++- 1 file changed, 2 insertions(+), 1

[libvirt] [PATCHv2 13/16] storage: use cache to walk backing chain

2012-10-13 Thread Eric Blake
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 root-squashed NFS files, we can exploit the cache

[libvirt] [PATCHv2 16/16] blockjob: implement shallow commit flag in qemu

2012-10-13 Thread Eric Blake
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 base is indeed the file we expected. *

[libvirt] [PATCHv2 14/16] blockjob: manage qemu block-commit monitor command

2012-10-13 Thread Eric Blake
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 (qemuCapsProbeQMPCommands): Set it. *

[libvirt] [PATCHv2 05/16] storage: use enum for disk driver type

2012-10-13 Thread Eric Blake
Actually use the enum in the domain conf structure. * src/conf/domain_conf.h (_virDomainDiskDef): Store enum rather than string for disk type. * src/conf/domain_conf.c (virDomainDiskDefFree) (virDomainDiskDefParseXML, virDomainDiskDefFormat) (virDomainDiskDefForeachPath): Adjust users. *