create_ova Command
Purpose
Creates an open virtual appliance (OVA) package. An OVA package is an archive file that can be deployed as a virtual machine.
Syntax
create_ova -o OutDir [-d Disk] [ -i Image] [ -t OStype] [ -e ] [ -f ] [-g Size]
Description
The create_ova command is used to create a single-volume raw disk image and to export contents of a raw disk image to a compatible OVA package format. The OVA package can be imported into any IBM Power Virtualization Center (PowerVC) environment that contains a supported storage device. You can also import the OVA package into any cloud service that supports the Open Virtualization Format (OVF) packaging standard. The imported OVA package can be deployed as a virtual machine.
The create_ova command automatically installs the dependent software such as pipe viewer, rpm, and yum before it generates contents of the OVA package without user intervention. If you cannot install or configure any OVA package, you must perform the recovery steps and retry the installation until it is successful.
For each user session, the results of the command execution are saved in the /var/adm/ras/<create_ova.pid$$.log> log file.
Flags
- -d Disk
- Specifies the target disk (logical device) that is used for restoring the mksysb image. The target disk is also used as the medium for copying the raw disk image into an OVA package.
- -e
- Excludes image restoration to the target disk that is specified with the -d flag. Use this option when the target disk already contains the exported content.
- -f
- Ignores file system space warning messages.Note: When you export the contents of the mksysb image or the contents of a raw disk image, the create_ova command stores the entire content of the volume in the raw disk image. The create_ova command needs enough space to make copies of the volume in the raw disk image and up to 10% extra space for metadata. For example, if the volume in the raw disk image needs 100 GB space, the create_ova command needs an additional 10 GB space (total of 110 GB space). When you use the -f flag, ensure that the output directory on the destination server has enough space for the exported content.
- -g Size
- Specifies a disk size in GB for the boot volume. The boot volume is used when you create copies of the volume in the raw disk image while importing an OVA package.
- -i Image
- Specifies the file name (absolute path) of a mksysb image or the contents of a raw disk
image that is used as an input to package the contents into an OVA package. Note: If you specify a mksysb image with this flag, the -d flag must be specified to restore the backup content of the image. However, if you specify the contents of a raw disk image with this flag, the contents are copied directly into the OVA package, thus eliminating the need for restoring the backup content from the image.
- -o OutDir
-
Specifies the output directory for the OVA package.Note: When you export the contents of a raw disk image into an OVA package, the raw disk image must first be copied into a file system on the destination server. Therefore, sufficient space must be available on the server to copy all volumes in the raw disk image to files in the file system. After all volumes in the raw disk image are copied to files in the file system, you can create an uncompressed OVA package from the raw disk image.
After the OVA package is created, the files that are used for creating the OVA package are removed. The resulting OVA package is compressed by using the
gzip
utility. When you compress the OVA package, you might notice that temporary files appear in the output directory. You can ignore these temporary files. After the*.ova.gz
package is created successfully, the appropriate return code is displayed. - -t OStype
- Specifies the operating system of the system from which the image is used to create an OVA
package. The supported values are
aix
,rhel
, andsles
. If the -t flag is omitted, the default operating system type isaix
.
Image Requirements
- Install the cloud-init program.
Install the cloud-init program on the virtual machine that you want to back up or capture. The cloud-init program takes the user input and configures the operating system and software on the deployed virtual machine. The cloud-init program is widely used in Open Stack for initializing virtual machines. For more information, see Installing and configuring cloud-init.
- Prepare the virtual machine that must be backed-up or captured.Prepare the virtual machine for backup or capture by performing tasks such as cleaning up log files or enabling Resource Monitoring and Control (RMC) connection on the virtual machine. Several PowerVC features such as live migration and dynamic LPAR, require an active RMC connection between the Hardware Management Console (HMC) or the NovaLink partition, and the virtual machine.
- The virtual machine must use the Virtual I/O Server and virtual storage.
- If you are copying a disk image, you must shut down the virtual machine.
- Ensure that the following prerequisites are met for the Linux® operating system:
- Operating systems such as SUSE Linux Enterprise Server (SLES) 10, SLES 11, Red Hat® Enterprise Linux (RHEL) 5, and RHEL 6 that use Linux Loader (LILO) or Yaboot boot loaders have special considerations when virtual machines have multiple disks. For more information about configuring a boot loader, see the documentation for the respective Linux operating system.
- On SLES 12, if you are deploying the image with a network configuration that has a static IP
address as the primary adapter, and a dynamic host configuration protocol (DHCP) as secondary
adapters, you must modify the DHCLIENT_SET_DEFAULT_ROUTE attribute on the
virtual machine. Otherwise, the DHCP adapters might override the default gateway of the primary
(static) adapter. In the /etc/sysconfig/network/dhcp file, set the value of the
DHCLIENT_SET_DEFAULT_ROUTE attribute to
yes
. - If you want the Linux virtual machine to have Multiple Path I/O (MPIO), you must configure the Linux operating system for MPIO on the root device before you back up or capture the virtual machine.
Examples
- To restore a mksysb image on the target disk /dev/hdisk2 and to
package its contents into an OVA package that is stored in the /images
directory, enter the following
command:
create_ova -o /images -d hdisk2 -i /tmp/backup.sysb
- To copy a raw disk image and to package its contents into an OVA package that is stored in the
/images directory by ignoring the file system space requirements, enter the
following command:
create_ova -o /images -i /tmp/mysystem.img -f
- To export a SLES root volume group of 30 GB and to package its contents into an OVA package that
is stored in the /images directory in addition to specifying a new disk size
requirement of 80 GB, enter the following
command:
create_ova -o /images -e -d rhdisk2_lv -g 80 -t sles
- To export an alternate AIX® root volume group that is on
the target disk
hdisk2
and to package its contents into an OVA package that is stored in the /images directory, enter the following command:create_ova -o /images -e -d hdisk2 -t aix
- To export an AIX
rootvg
volume group to the target disk /dev/hdisk1, to install the cloud-init program, and to package contents of the volume group into an OVA package that is stored in the /images directory, enter the following command:create_ova -o /images -d hdisk1