The two adjacent sections can be read separately, and the second
section doesn't mention not using make install / using ./run, so
repeat it a second time.
Before trying to perform the conversion, estimate if there is
sufficient free space on the guest filesystem(s) for the conversion to
be successful.
If not, you will see an error similar to this one:
[ 6.0] Checking for sufficient free disk space in the guest
virt-v2v: error: not enough free space for conversion on filesystem '/'.
4354048 bytes free < 20000000 bytes needed
virt-p2v can run without a window manager. However it then sits in
the top left corner of the screen. Add a lightweight window manager
to the ISO so that position and geometry hints work.
Two scripts are added, replacing the make targets from the
previous commit:
virt-p2v-make-disk: Builds a virt-p2v disk or USB key using
virt-builder.
virt-p2v-make-kickstart: Builds a kickstart file (only) which can be
fed to livecd-creator or similar tools on Red Hat-derived distros.
Kickstart generation is slightly different: Instead of requiring the
downstream 'libguestfs-pvhelper' package, the kickstart now embeds the
virt-p2v binary(!) making it self-contained and downstream packaging
simpler.
In addition there are documentation changes.
As part of reworking the scripts that are used to build the P2V ISO,
first remove the separate p2v-iso directory. Similar scripts and
documentation will be introduced back into the p2v/ directory in
following commits.
Import the upstream lens for the shadow file, just with a different
identifier and not matching /etc/shadow by default. Instead, apply a
transformation to have it match /etc/shadow only if the version of
augeas is at least 1.2.1 [1].
[1] While the last upstream version is 1.2.0, all the development seems
to happen in master, so whatever the next version is going to be
numbered (e.g. 1.2.1 or 1.3.0), the check will be fine anyway.
It will print an error like this:
virt-v2v: error: internal error: invalid argument: libvirt domain 'windows'
is running, it must be shut down in order to perform virt-v2v conversion
This only works for libvirt domains, and is explicitly disabled for
test:/// URIs since these domains are always "running", but we use
these URIs for testing.
Unhelpfully, Filename.chop_extension throws an exception if the
filename has no extension (instead of just returning the filename).
Therefore the -i disk option would fail if you passed any filename
that didn't have an extension.
When setting the password for a locked account, make sure to still write
the password after the "!!" marker, otherwise the account will have no
password.
Previously we only looked for <driver name=qemu type=...>. However
for Xen imports, the name field could be name=tap (or other values in
fact). Since there can only be one <driver/> element under <disk/>,
look for any <driver type=...> in order to get the disk format.
A further complication for Xen is that type=aio means "raw" (for
obscure historical reasons), so map that.
Thanks: Dan Berrangé.
The empty_element macro was not safe when used in a "naked" if
statement such as:
if (config->flags & FLAG_ACPI) empty_element ("acpi");
Fix the macro so it uses do { ... } while (0) to make it safe here.