v2v: -o libvirt: Get the <features/> right in the output XML (RHBZ#1159258).

Implement what old virt-v2v did (from
lib/Sys/VirtConvert/Connection/LibVirtTarget.pm)

Thanks: Tingting Zheng, Matthew Booth
(cherry picked from commit 68dc488a4476caf742d5342307258dd72d0e2256)
fish: fix dir completion on filesystems w/o dirent.d_type (RHBZ#1153844).

On filesystems whose dirent.d_type is DT_UNKNOWN or some unknown value,
manually check whether an entry is a directory, thus completing in the
proper way.

(cherry picked from commit a8b95a5535480c7b382fab82dcaf18eb67e5278a)
v2v: vmware: Use 'curl --config' to pass arguments securely to curl.

Instead of making up an ordinary curl command line, write a temporary
config file and use 'curl --config tmpfile' to pass the arguments.

The advantage is that it's more secure if we want to supply passwords
to curl, since a '--user username:password' parameter on the command
line could be read (eg. by 'ps ax'), but the temporary file has mode
0600 and cannot be read by other users.

This is mostly code motion, but it also passes the '-q' option to curl
to stop it from reading default configuration files.

(cherry picked from commit b35b84684c845ceefd3c0ec519caf80366a798ea)
v2v: Add --password-file parameter (RHBZ#1158526).

This allows you to send passwords to virt-v2v input modes without
being interactive.

(cherry picked from commit 65abc4420325c1226b002f2304709b2040160877)
RHEL 7: Emphasize libguestfs-winsupport package (RHBZ#627468).

This RHEL-only patch changes the error messages when the
inspection code cannot find an operating system inside the guest
image.  For a Windows guest this may happen because the user has not
installed the separate 'libguestfs-winsupport' package.  Therefore we
emphasize that the user may need to install this package.

Notes:

(1) In RHEL there are two pieces of inspection code, the old Perl code
(deprecated upstream) and the new C core inspection API.  Therefore
this patch has to touch two places with essentially the same change.

(2) This patch doesn't try to be clever and detect if it was a Windows
guest.  This should reduce the chance of failure.

Output from (Perl) virt-inspector now looks like this:

 $ virt-inspector disk.img
 No operating system could be detected inside this disk image.

 This may be because the file is not a disk image, or is not a virtual machine
 image, or because the OS type is not understood by virt-inspector.

 If you feel this is an error, please file a bug report including as much
 information about the disk image as possible.

 RHEL notice
 -------------
 libguestfs will return this error for Microsoft Windows guests if the
 separate 'libguestfs-winsupport' package is not installed. If the
 guest is running Microsoft Windows, please try again after installing
 'libguestfs-winsupport'.

Output from guestfish (ie. C core inspection API) now looks like this:

 $ guestfish -i disk.img
 guestfish: no operating system was found on this disk

 RHEL notice
 -------------
 libguestfs will return this error for Microsoft Windows guests if the
 separate 'libguestfs-winsupport' package is not installed. If the
 guest is running Microsoft Windows, please try again after installing
 'libguestfs-winsupport'.
RHEL 7: Remove libguestfs live (RHBZ#798980).

This isn't supported in RHEL 7.
RHEL 7: Remove 9p APIs from RHEL (RHBZ#921710).
RHEL 7: Disable unsupported remote drive protocols (RHBZ#962113).

This disables support for unsupported remote drive protocols:

 * ftp
 * ftps
 * http
 * https
 * tftp
 * gluster
 * iscsi
 * rbd
 * sheepdog
 * ssh

Note 'nbd' is not disabled, and of course 'file' works.

We hope to gradually add some of these back over the lifetime of RHEL 7.
RHEL 7: Remove User-Mode Linux (RHBZ#1144197).

This isn't supported in RHEL 7.
RHEL 7: v2v: Select correct qemu binary for -o qemu mode (RHBZ#1147313).

RHEL 7 does not have qemu-system-x86_64 (etc), and in addition the
qemu binary is located in /usr/libexec.  Encode the path to this
binary directly in the script.

Note that we don't support people running qemu directly like this.
It's just for quick testing of converted VMs, and to help us with
support cases.
RHEL 7: v2v: Disable the --qemu-boot option (RHBZ#1147313).

This cannot work because there is no Gtk or SDL output mode
in RHEL 7's qemu-kvm.

In addition you will have to edit the -display option in the
qemu script.
RHEL 7: Revert "tests: rsync: Skip this test when the backend is libvirt."

This reverts commit 765dc6237ce7b93dd2f33d99be53eae92e048a7a.
RHEL 7: Revert "appliance: Change example ping lines to ping 8.8.8.8."

This reverts commit 07c0926b588db5c86214917b609c2f477c817c0e.
RHEL 7: Revert "launch: libvirt: Use qemu-bridge-helper to implement a full network (RHBZ#1148012)."

This reverts commit 224de20b9a8d5ea56f6337f19b4ca237bb88eca0.
RHEL 7: Revert "appliance: add dhcp-client on Mageia"

This reverts commit 8f3a2ca5358d5601be7a9247b6d08193c4e2da46.
RHEL 7: Revert "appliance: add dhcpcd and gptfdisk on Archlinux"

This reverts commit 979e7a49147f4ef1387337db262bf7ea12f627e3.
RHEL 7: Revert "appliance: Use dhclient or dhcpcd instead of hard-coding IP address of appliance."

This reverts commit 67e6f32a240c7c234e6af637c1cd324b36a82cd3.
RHEL 7: v2v: Disable unconfiguration of VMware drivers on Linux (RHBZ#1155610).

This is currently broken and breaks conversions.  For details see:
https://bugzilla.redhat.com/show_bug.cgi?id=1155610
RHEL 7: Disable alternate Augeas lenses.

These are included in the RHEL 7.1 augeas package, and therefore
not required in RHEL.

See:
https://www.redhat.com/archives/libguestfs/2014-October/msg00220.html