virt-p2v-make-disk(1) | Virtualization Support | virt-p2v-make-disk(1) |
virt-p2v-make-disk - Build the virt-p2v disk using virt-builder
virt-p2v-make-disk -o /dev/sdX [os-version]
virt-p2v(1) converts a physical machine to run virtualized on KVM, managed by libvirt, OpenStack, oVirt, Red Hat Enterprise Virtualisation (RHEV), or one of the other targets supported by virt-v2v(1).
virt-p2v-make-disk is a script which creates a bootable disk image or USB key containing virt-p2v. It uses virt-builder(1) to do this, and is just a small shell script around virt-builder.
The required -o parameter specifies where the output should go, for example to a USB key (eg. "-o /dev/sdX") or to a file. If you pass a device name, then the existing contents of the device will be erased.
The optional "os-version" parameter is the base Linux distro to use for the operating system on the ISO. If you don't set this parameter, the script tries to choose a suitable default for you. Most users should not use the "os-version" parameter.
The base OS selected for virt-p2v is not related in any way to the OS of the physical machine that you are trying to convert.
To list possible "os-version" combinations, do:
virt-builder -l
Write a virt-p2v bootable USB key on /dev/sdX (any existing content on /dev/sdX is erased):
virt-p2v-make-disk -o /dev/sdX
Write a virt-p2v bootable virtual disk image, and boot it under qemu:
virt-p2v-make-disk -o /var/tmp/p2v.img qemu-kvm -m 1024 -boot c \ -drive file=/var/tmp/p2v.img,if=virtio,index=0 \ -drive file=/var/tmp/guest.img,if=virtio,index=1
where /var/tmp/guest.img would be the disk image of some guest that you want to convert (for testing only).
You can install extra packages using the --install option. This can be useful for making a more fully-featured virt-p2v disk with extra tools for debugging and troubleshooting. Give a list of packages, separated by commas. For example:
virt-p2v-make-disk -o /var/tmp/p2v.img --install tcpdump,traceroute
You can inject an SSH identity (private key) file to the image using the --inject-ssh-identity option.
First create a key pair. It must have an empty passphrase:
ssh-keygen -t rsa -N '' -f id_rsa
This creates a private key ("id_rsa") and a public key ("id_rsa.pub") pair. The public key should be appended to the "authorized_keys" file on the virt-v2v conversion server (usually to "/root/.ssh/authorized_keys").
The private key should be injected into the disk image and then discarded:
virt-p2v-make-disk [...] --inject-ssh-identity id_rsa rm id_rsa
When booting virt-p2v, specify the URL of the injected file like this:
│ User name: [root_____________________________] │ │ │ │ Password: [ <leave this field blank> ] │ │ │ │ SSH Identity URL: [file:///var/tmp/id_rsa___________] │
or if using the kernel command line, add:
p2v.identity=file:///var/tmp/id_rsa
For more information, see "SSH IDENTITIES" in virt-p2v(1).
For improved compatibility with older hardware, virt-p2v-make-disk has an --arch option. The most useful setting (on x86-64 hosts) is --arch i686, which builds a 32 bit virt-p2v environment that will work on older hardware. 32 bit virt-p2v can convert 64 bit physical machines and can interoperate with 64 bit virt-v2v and 64 bit hypervisors.
This option requires that you have built virt-p2v.$arch (ie. usually virt-p2v.i686) by some means, and that you install it next to the ordinary virt-p2v binary (eg. in $libdir/virt-p2v/ or $VIRT_V2V_DATA_DIR). This is outside the scope of this manual page, but you can find some tips in "BUILDING i686 32 BIT VIRT-P2V" in guestfs-building(1).
If this option is not supplied, then the default is to use the same architecture as the host that is running virt-p2v-make-disk.
The location of the binary can be changed by setting the "VIRT_P2V_DATA_DIR" environment variable.
The location of these files can be changed by setting the "VIRT_P2V_DATA_DIR" environment variable.
virt-p2v(1), virt-p2v-make-kickstart(1), virt-p2v-make-kiwi(1), virt-v2v(1), http://libguestfs.org/.
Richard W.M. Jones http://people.redhat.com/~rjones/
Copyright (C) 2009-2019 Red Hat Inc.
To get a list of bugs against libguestfs, use this link: https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
To report a new bug against libguestfs, use this link: https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
When reporting a bug, please supply:
2019-02-07 | libguestfs-1.40.2 |