Richard W.M. Jones
2016-Apr-25 18:54 UTC
[Libguestfs] Proposal to remove two virt-v2v command line options
Virt-v2v aims to convert guests without any per-guest intervention/ configuration/fiddling. Unfortunately there are some command line options of virt-v2v which don't meet this ideal. Although we don't normally change the command line of our tools, there are two options I'd like to remove (by turning them into warnings & no-ops). Please follow up with comments if this is going to be a problem. Option: --no-trim all --no-trim mp[,mp...] Description in manual: By default virt-v2v runs fstrim(8) to reduce the amount of data that needs to be copied. This is known to break some buggy bootloaders causing boot failures after conversion (see for example https://bugzilla.redhat.com/show_bug.cgi?id=1141145#c27). You can use --no-trim all to disable all trimming. Note this will greatly increase the amount of data that has to be copied and can make virt-v2v run much more slowly. You can also disable trimming on selected filesystems only (specified by a comma-separated list of their mount point(s) in the guest). Typically you would use --no-trim /boot to work around the grub bug mentioned above. You can also disable trimming on partitions using the libguestfs naming scheme for devices, eg: --no-trim /dev/sdb2 means do not trim the second partition on the second block device. Use virt-filesystems(1) to list filesystem names in a guest. Discussion: As noted in the description, we found one RHEL 5 guest which had a buggy bootloader. We've never been able to repeat that or find a similarly broken guest. When I added this option, I was suspicious that fstrim would cause other breakage in guests. With the popularity and widespread use of virt-sparsify, I think that fear was unjustified. Supporting the --no-trim option is also a pain, and it's difficult even for users to understand what it does, so I propose we remove it. Note this means that all guests would be fstrimmed. Option: --vmtype desktop --vmtype server Description in manual: For the -o rhev or -o vdsm targets only, specify the type of guest. You can set this to "desktop" or "server". If the option is not given, then a suitable default is chosen based on the detected guest operating system. Discussion: This option was inherited from old virt-v2v and it sets a single flag in the OVF file when targetting oVirt/RHEV. As far as I can tell this flag affects two things in oVirt engine: (1) Whether sound emulation is enabled for a guest ("desktop" = yes, "server" = no). (2) allowConsoleReconnect which disables something called "strict user checking" when connecting to a VM console ("server" = disabled, "desktop" = not disabled). It is highly unlikely that a virt-v2v user understands this setting (even I didn't understand it before now). Note that we choose a default from inspection data, mapping guest server-like operating systems to "server" and the rest to "desktop". So I propose we get rid of this option, but leave the code which performs the default mapping from inspection data. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Reasonably Related Threads
- v2v: Remove --no-trim, --vmtype options and other fixes.
- [PATCH] sparsify: Fix test-virt-sparsify-in-place-fstrim-unsupported.sh
- [PATCH v2] sparsify: Fix test-virt-sparsify-in-place-fstrim-unsupported.sh
- Re: Tests and trimming vfat
- [PATCH 1/2] v2v: Make fstrim warning clearer (RHBZ#1366456).