[Pkg-libvirt-commits] [libguestfs] 07/12: v2v: Allow pool UUID to be used in -os parameter (RHBZ#1141631).
Hilko Bengen
bengen at moszumanska.debian.org
Fri Oct 3 14:45:59 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag debian/1%1.27.46-1
in repository libguestfs.
commit 1dd485e500a2ee810802e2f6421dde104b2116ab
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Sep 15 10:17:01 2014 +0100
v2v: Allow pool UUID to be used in -os parameter (RHBZ#1141631).
Thanks: Zhou Junqin.
---
v2v/domainxml-c.c | 6 +++++-
v2v/domainxml.mli | 3 ++-
v2v/virt-v2v.pod | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/v2v/domainxml-c.c b/v2v/domainxml-c.c
index 948555a..96ae42b 100644
--- a/v2v/domainxml-c.c
+++ b/v2v/domainxml-c.c
@@ -209,7 +209,11 @@ v2v_pool_dumpxml (value connv, value poolnamev)
/* Look up the pool. */
poolname = String_val (poolnamev);
- pool = virStoragePoolLookupByName (conn, poolname);
+ pool = virStoragePoolLookupByUUIDString (conn, poolname);
+
+ if (!pool)
+ pool = virStoragePoolLookupByName (conn, poolname);
+
if (!pool) {
err = virGetLastError ();
snprintf (errmsg, sizeof errmsg,
diff --git a/v2v/domainxml.mli b/v2v/domainxml.mli
index ec4f8fa..ced55ce 100644
--- a/v2v/domainxml.mli
+++ b/v2v/domainxml.mli
@@ -30,4 +30,5 @@ val dumpxml : ?conn:string -> string -> string
val pool_dumpxml : ?conn:string -> string -> string
(** [pool_dumpxml ?conn pool] returns the libvirt XML of pool [pool].
- The optional [?conn] parameter is the libvirt connection URI. *)
+ The optional [?conn] parameter is the libvirt connection URI.
+ [pool] may be a pool name or UUID. *)
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
index ba5172f..05817ef 100644
--- a/v2v/virt-v2v.pod
+++ b/v2v/virt-v2v.pod
@@ -339,7 +339,7 @@ the output name is the same as the input name.
The location of the storage for the converted guest.
For I<-o libvirt>, this is a libvirt directory pool
-(see S<C<virsh pool-list>>).
+(see S<C<virsh pool-list>>) or pool UUID.
For I<-o local>, this is a directory name. The directory must exist.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list