From: Richard W.M. Jones Date: Fri, 6 May 2011 16:23:00 +0000 (-0400) Subject: fish: Allow -d UUID (specify libvirt domains by UUID). X-Git-Tag: 1.11.4~3 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=87fb6d852db04d0d707e6587d4579d1cf2bd05ef;p=libguestfs.git fish: Allow -d UUID (specify libvirt domains by UUID). This applies in all the commands which use the common C option parsing code, ie: * guestfish * guestmount * virt-cat * virt-df * virt-filesystems * virt-inspector * virt-ls * virt-rescue --- diff --git a/TODO b/TODO index 9364e12..6579629 100644 --- a/TODO +++ b/TODO @@ -432,11 +432,6 @@ guestfish drive letters There should be an option to mount all Windows drives as separate paths, like C: => /c/, D: => /d/ etc. -Select machines by UUID ------------------------ - -guestfish -u UUID guestfish -d UUID - More inspection features ------------------------ diff --git a/cat/virt-cat.pod b/cat/virt-cat.pod index 4ec9a0b..af8b8f4 100755 --- a/cat/virt-cat.pod +++ b/cat/virt-cat.pod @@ -92,7 +92,8 @@ not used at all. =item B<--domain> guest -Add all the disks from the named libvirt guest. +Add all the disks from the named libvirt guest. Domain UUIDs can be +used instead of names. =item B<--echo-keys> diff --git a/cat/virt-filesystems.pod b/cat/virt-filesystems.pod index fac139b..3ba925f 100755 --- a/cat/virt-filesystems.pod +++ b/cat/virt-filesystems.pod @@ -142,7 +142,8 @@ read L below. =item B<--domain> guest -Add all the disks from the named libvirt guest. +Add all the disks from the named libvirt guest. Domain UUIDs can be +used instead of names. =item B<--echo-keys> diff --git a/cat/virt-ls.pod b/cat/virt-ls.pod index 1ba7417..dc3093a 100755 --- a/cat/virt-ls.pod +++ b/cat/virt-ls.pod @@ -92,7 +92,8 @@ not used at all. =item B<--domain> guest -Add all the disks from the named libvirt guest. +Add all the disks from the named libvirt guest. Domain UUIDs can be +used instead of names. =item B<--echo-keys> diff --git a/df/virt-df.pod b/df/virt-df.pod index d05596a..e9f416c 100755 --- a/df/virt-df.pod +++ b/df/virt-df.pod @@ -89,7 +89,8 @@ not used at all. =item B<--domain> guest -Add all the disks from the named libvirt guest. +Add all the disks from the named libvirt guest. Domain UUIDs can be +used instead of names. =item B<--format=raw|qcow2|..> diff --git a/fish/guestfish.pod b/fish/guestfish.pod index 94deb9c..77bf0ca 100644 --- a/fish/guestfish.pod +++ b/fish/guestfish.pod @@ -199,6 +199,8 @@ Add disks from the named libvirt domain. If the I<--ro> option is also used, then any libvirt domain can be used. However in write mode, only libvirt domains which are shut down can be named here. +Domain UUIDs can be used instead of names. + Using this flag is mostly equivalent to using the C command, with C if the I<--ro> flag was given, and with C if the I<--format:...> flag was given. diff --git a/fish/virt.c b/fish/virt.c index b14cee2..486f098 100644 --- a/fish/virt.c +++ b/fish/virt.c @@ -48,5 +48,8 @@ add_libvirt_drives (const char *guest) optargs.live = 1; } + optargs.bitmask |= GUESTFS_ADD_DOMAIN_ALLOWUUID_BITMASK; + optargs.allowuuid = 1; + return guestfs_add_domain_argv (g, guest, &optargs); } diff --git a/fuse/guestmount.pod b/fuse/guestmount.pod index 9fbefcf..6a2f39b 100644 --- a/fuse/guestmount.pod +++ b/fuse/guestmount.pod @@ -93,6 +93,8 @@ Add disks from the named libvirt domain. If the I<--ro> option is also used, then any libvirt domain can be used. However in write mode, only libvirt domains which are shut down can be named here. +Domain UUIDs can be used instead of names. + =item B<--dir-cache-timeout N> Set the readdir cache timeout to I seconds, the default being 60 diff --git a/inspector/virt-inspector.pod b/inspector/virt-inspector.pod index 225e3f6..2192b39 100755 --- a/inspector/virt-inspector.pod +++ b/inspector/virt-inspector.pod @@ -86,7 +86,8 @@ then libvirt is not used at all. =item B<--domain> guest -Add all the disks from the named libvirt guest. +Add all the disks from the named libvirt guest. Domain UUIDs can be +used instead of names. =item B<--echo-keys> diff --git a/rescue/virt-rescue.pod b/rescue/virt-rescue.pod index f56acd0..81a24cf 100755 --- a/rescue/virt-rescue.pod +++ b/rescue/virt-rescue.pod @@ -118,7 +118,8 @@ not used at all. =item B<--domain> guest -Add all the disks from the named libvirt guest. +Add all the disks from the named libvirt guest. Domain UUIDs can be +used instead of names. =item B<--format=raw|qcow2|..>