On Fri, Apr 08, 2022 at 03:16:39PM +0200, Laszlo Ersek wrote:
+ (* RHBZ#1774386 *)
+ if not (remote_file_exists uri flat_vmdk) then
+ failwith "this transport does not support guests with
snapshots";
This message isn't translated; use error (f_"...")
Also, it's better to have an actionable error message (that is, tell
the user not only what the problem is, but guide them to information
to fix it). I really hate error messages that have some jargon and
tell me nothing about what I need to do now.
Something like:
error (f_"this transport does not support guests with snapshots. \
Either collapse the snapshots for this guest and try the \
conversion again, or use one of the alternate conversion \
methods described in virt-v2v-input-vmware(1) section \
\"NOTES\".")
and then ...
diff --git a/docs/virt-v2v-input-vmware.pod
b/docs/virt-v2v-input-vmware.pod
index 2c90e0afc7cd..468d1ce06224 100644
--- a/docs/virt-v2v-input-vmware.pod
+++ b/docs/virt-v2v-input-vmware.pod
@@ -51,6 +51,11 @@ to ESXi to read the F<GUEST.vmx> file and associated disks.
This
requires that you have enabled SSH access to the VMware ESXi
hypervisor - in the default ESXi configuration this is turned off.
+Note that when using this transport, a guest that has snapshots present
+on the ESXi hypervisor cannot be converted. For such guests, use
+just B<-i vmx> (above), or B<-ic vpx://...> B<-it vddk> or
+B<-ic esx://...> B<-it vddk> (below).
=item B<-ic vpx://...> B<-it vddk>
=item B<-ic esx://...> B<-it vddk>
@@ -106,7 +111,9 @@ a C</vmfs/volumes> folder containing the virtual machines.
If you find a folder of files called F<I<guest>.vmx>,
F<I<guest>.vmxf>, F<I<guest>.nvram> and one or more
F<.vmdk> disk
-images, then you can use this method.
+images, then you can use this method. The SSH transport is not usable
+if the guest has snapshots (files called F<I<guest>-000001.vmdk> and
+similar); refer to
L<https://bugzilla.redhat.com/1774386>.
My suggestion is to add a new NOTES section -- to make it easy to
find, just after the DESCRIPTION section and before the INPUT FROM
VMWARE VMX section.
In this you can talk about snapshots and which methods won't and will
work. Then reference the new section from the error message and from
the hunks above.
The patch itself is fine otherwise.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW