New API: add-drive-scratch.

This adds a temporary scratch drive to the handle.

(cherry picked from commit 1b11a83d5248511abbf86775601eb6e25a36c1ee)
daemon: Implement set-label for XFS and fix it for btrfs (RHBZ#986875).

Implement 'set-label' for XFS filesystems.

Fix the call for btrfs.  Previous
commit d5817537fa6c51a7f851ecc5e4e63e60609e0c03 added some bogus
documentation implying this call would work for btrfs, but it did
not.

Add tests.

(cherry picked from commit 091d22f49e7fcb53fb3bb23e2ba94ca12eb88eab)
New API: Implement set-uuid for ext2/3/4 and XFS (RHBZ#986877).

Also includes tests.

(cherry picked from commit 8580ef7d0f2aac2118fa7b4055f3eb28cd127093)
docs: Document labels and UUIDs in the API overview section.

(cherry picked from commit df02c2471f3fe94c691c389c17a5d23d052848dd)
sysprep: Add new fs-uuids operation.

This creates new random UUIDs for all filesystems in a guest.

Cherry picked from commit 8965368eb89532ac1613fffb0a3a661f005bae81
and modified for virt-sysprep in libguestfs 1.22.
sysprep: Disable fs-uuids operation by default.

Disable this operation because it is more likely than not to break
Linux guests.

To fix this properly will involve finding all the places in the guest
where the UUIDs are used to locate and mount filesystems,
eg. /etc/fstab and possibly initramfs.

This updates commit 8965368eb89532ac1613fffb0a3a661f005bae81.

(cherry picked from commit 5deea7fce675edb6803cd83a699b80e8ea383488)
New API: remount: Allow rw flag to be adjusted on mounted filesystem.

(cherry picked from commit 2019d0e9c7cd4b927cb98fe96d97e945dd4847e0)
launch: direct: Specify -cpu host,+kvmclock.

'-cpu host' makes the CPU look like the host CPU.  This is useful
because it means the appliance can use all the host CPU's features,
eg. for fast checksumming or MD XORing.

'kvmclock' is the paravirtualized clock for qemu/KVM.  It's much more
stable than relying on tsc or a virtualized device such as HPET, and
clock instability is one of the problems we have encountered when
running libguestfs on a heavily loaded machine, especially in a nested VM.

Note that we require qemu >= 1.2 (and have for a while) which has long
supported both of these options.

(cherry picked from commit 038ed0a08eaed33e62a27c9f91780a25de0bc08c)
launch: direct: Don't use -cpu host on TCG.

qemu -cpu \? documents this as:

host  KVM processor with all supported host features (only available in KVM mode)

And indeed if you try it with TCG you'll get this error:

Unable to find CPU definition: host

This fixes commit 038ed0a08eaed33e62a27c9f91780a25de0bc08c.

(cherry picked from commit c53b459fdd7fc340f48a76496b7e7e18256a2d64)
launch: libvirt: Enable <cpu mode=host-model>.

This may still cause problems on some CPUs because of a bug
in libvirt.  See:
https://bugzilla.redhat.com/show_bug.cgi?id=870071

(cherry picked from commit 6f76fdb41eb6bd124fbc3d084f5c2a3371b37d9b)
launch: libvirt: Don't enable <cpu mode="host-model"> on TCG.

It's fairly pointless to do this with TCG, since all we would be doing
is emulating a more complicated processor slowly.  Also it may be the
cause of subtle problems we see during testing.

This updates commit 6f76fdb41eb6bd124fbc3d084f5c2a3371b37d9b.

(cherry picked from commit 46763bcc0b9d04ada367f29ca07bd3e11e264a8e)
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: Exclude iptables from the appliance (RHBZ#858648).
RHEL 7: Ignore /etc/release if /etc/redhat-release exists (RHBZ#873219).

If the user has created /etc/release on a RHEL machine, don't
mis-detect the OS as NetBSD.
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.