To convert physical hosts to a guest image silently, you use a kickstart file to pass parameters to the P2V utility.
The following steps provide a high-level overview of how to convert hosts silently:
Create a P2V kickstart file and copy it to your kickstart server.
Insert the Oracle VM Server installation media into the optical disc drive of the computer you want to image.
Change the boot order to start from the optical disc drive in the BIOS or UEFI settings.
Boot the computer with the Oracle VM Server installation media.
The Oracle VM Server boot screen displays.
At the
boot
prompt, enter the following:# mboot.c32 xen.mb.efi --- vmlinuz p2v ksdevice=
9C:B6:54:82:15:AC
ks=http://example.com
/mypath
/ks.cfg --- initrd.imgWhere:
ksdevice specifies the network interface to use.
ks is the path to the P2V kickstart file.
The P2V utility begins the conversion process. If there are any missing parameters in the kickstart file, you are prompted to enter them.
When the conversion process completes, you can import the hardware virtualized guest into Oracle VM Manager as a virtual machine template. See Section 10.4, “Importing Guests as Virtual Machine Templates to Oracle VM Manager”.
Before you attempt to convert hosts with a kickstart file, you should consider the following:
The P2V utility converts disks on the computer to virtual disk images. The virtual disk images are created as IDE disks (hda, hdb, hdc, hdd, and so on) on the guest, using the original disk names. When you use a P2V kickstart file, up to four disks are automatically deployed in the guest. Any extra disks are converted and added to the guest configuration file (
vm.cfg
) but are not deployed in the guest.To deploy the additional disks in the guest, edit the guest configuration file to remove the comments from the disk entries and map the additional disks to SCSI device names; for example, sda, sdb, and sdc. The boot disk must always be mapped to device hda. Any files on the guest that contain references to these devices must also be changed; for example, the
/etc/fstab
file might contain references to/dev/hda1
,/dev/sda1
, and so on.At least one network interface must use DHCP so that the computer on which the P2V utility is running can read the kickstart file over the network.
If you want the P2V utility web server to listen using a network interface other than the one that initiates the kickstart session, specify the network configuration for that network interface in the kickstart file.
To converting hosts with a kickstart file, you must specify parameters at the boot prompt and in a P2V kickstart file.
At the boot prompt, you must specify parameters as follows:
# mboot.c32 xen.mb.efi --- vmlinuz p2v ksdevice=device
ks=ksfile
--- initrd.img
Boot Parameters
Option | Description |
---|---|
| Loads the P2V conversion utility. |
| Specifies the name and location of a P2V kickstart file. |
| Specifies the network interface to use. You can set one of the following values:
|
Kickstart File Options
Option | Description |
---|---|
| Indicates the kickstart file is intended to automate a P2V conversion. It accepts no parameters. |
| Sets the end destination for the guest image. Sets the P2V utility to operate in HTTPS server mode to transfer the guest image to a running instance of Oracle VM Manager. |
|
Denotes a disk to be included in the guest image. The
P2V utility uses device mapper-based snapshotting to
copy the disk as a
The
The device to image.
diskimage --device /dev/sda
Sets the type of disk. Must be one of
diskimage --device /dev/hda --type IDE |
| Configures network information for the computer.
The
Sets the method by which the network configuration is
determined. Must be
network --bootproto dhcp
network --bootproto static --ip 10.0.2.15 --netmask 255.255.255.0 --gateway 10.0.2.254 --nameserver 10.0.2.1
The
The IP address for the computer.
The IP address for the default gateway.
The IP address for the primary nameserver.
The netmask for the computer. |
| Sets the configuration options for the guest.
The
The name of the guest.
The memory allocation for the guest in Mb.
The number of VCPUs for the guest.
The console password for the guest. This option is ignored by Oracle VM Manager when the guest is imported. For example: vm_options --name MyVM --mem 2048 --vcpus 2
--consolepasswd |