virt-p2v ISO
======================================================================

virt-p2v converts physical machines to run on KVM.  Normally you
should not run virt-p2v directly.  Instead you have to boot the
physical machine using the bootable CD-ROM, ISO, PXE or disk image
which is provided by this directory.  The reason for this is so that
virt-p2v runs in a "clean" environment, with no other processes
running and modifying the disks.

- This directory (libguestfs.git/p2v-iso) contains the scripts
  used to build the bootable image.

- It *does not* contain the source to virt-p2v.  See ../p2v/ for the
  source of virt-p2v.

- It *does not* contain instructions for how to run virt-p2v.  For
  that you need to read the virt-p2v(1) manual page (see ../p2v/).

- It *does not* build anything when you run 'make'.  This is because:

  * building the disk image takes a long time

  * you wouldn't want to rebuild it every time virt-p2v changes

  * how and what to build depends on your environment

  * for some targets, it isn't even possible to build anything without
    root permissions / a network connection / a remote service (like
    Fedora's Koji)

  * some targets require interaction, eg. inserting a USB key

- For the same reasons as above, 'make check' and 'make install' in
  this directory do nothing.

Although for historical reasons this is known as the virt-p2v "ISO",
it may not actually build an ISO-formatted CD image.  Some of the
targets are simple disk images, USB keys and so on.

Although virt-p2v should be run on a physical machine, for testing
purposes you can (and we often do) run it in a virtual machine.

Running the virt-p2v ISO in a VM is also a legitimate way to convert a
virtual machine from a hypervisor which is not supported by virt-v2v
(Hyper-V is one such hypervisor).


Which target should you choose?
----------------------------------------------------------------------

For a list of all targets and how to use them, see below.

MOST USERS should choose 'virt-builder-target'.

Fedora, RHEL, CentOS and Scientific Linux users may wish to try
the 'kickstart-target'.

Fedora and RHEL developers who have been given 'spin-livecd'
permission by the Fedora/RHEL Koji/Brew administrators may wish to try
building the 'kickstart-target' as a Fedora/RHEL "Spin".


virt-builder-target
----------------------------------------------------------------------

This target uses virt-builder (see ../builder/) to build a bootable
disk image or USB key containing the locally built virt-p2v binary
from ../p2v

Use a disk image if you want to test virt-p2v inside a virtual
machine.  To use virt-p2v for real, you will need an empty USB key >=
6 GB in size.  Use this target to write the USB key, which you can
then plug into the physical machine to start the P2V process.

Most users should use this target.  It does not require any special
permissions, but it does need network access.

To use the virt-builder target:

(1) Choose the os-version which most closely matches your distro
from this list:

  virt-builder -l

(2) Choose the output, which could be a file [filename] or a USB key
[eg. /dev/sdX].

Then run this command (from the p2v-iso directory):

  make virt-builder-target OSVERSION=fedora-20 OUTPUT=/dev/sdX

After building the image, you can boot it directly on physical
hardware, or for testing in qemu or KVM (see the virt-builder man page
for example qemu and virt-install command lines).


kickstart-target
----------------------------------------------------------------------

