Export
Export all of the workload data (storage, images, files) to an external host, set up the utility host, and transform the boot disk.
Export Boot Disk
Copy the boot disk from the source environment to a utility server that will be used to prepare the image for upload to PCA.
The method you use depends on the source hypervisor and management platform. For example, on Oracle VM or PCA 2.4, obtain the .img
file for the boot disk by copying it from the storage repository shown in the VM's vm.cfg
file. Run the command on the compute node or Oracle VM Server (OVS). For example:
cd /OVS/Repositories/0004fb00000300007b2cd14ca0d48e8b/VirtualDisks
scp 0004fb0000120000fcd80512881d4979.img
utilityhost:/data/0004fb0000120000fcd80512881d4979.raw
In this example, the output file is renamed with the file extension .raw
, an optional change that indicates that the Oracle VM .img
file uses the 'raw disk' image format.
Speed Up Export by Compressing Disk Image Files
Disk image files are large and copying them to other hosts can take a long time. This may go much faster if you use compression, especially for sparse disk images.
You can optionally compress the disk image file using a command like gzip
or lzop
to reduce the time to copy to the utility host. For example, using lzop
and piping output to scp
:
lzop -1 < 0004fb0000120000fcd80512881d4979.img | ssh utilityhost 'lzop -d > /data/0004fb0000120000fcd80512881d4979.raw'
We use lzop for compression in this case because a fast network is available, so compression speed was more important than compression ratio. If you have a slower network, you may opt for another approach such as using gzip
or bzip2
:
gzip 0004fb00001200008190ce0329fdacdf.img
scp 0004fb00001200008190ce0329fdacdf.img.gz utilityhost:/data/
All of these methods, or using no compression at all, are equally valid and depend on your preferences.
Set Up the Utility Host
Create a utility host that runs Oracle Linux. This can be a virtual machine or a bare metal instance.
Use the following commands to install qemu-img
and virt-sparsify
. This example assumes an Oracle Linux 7 host:
$ sudo yum upgrade
$ sudo yum-config-manager --enable ol7_kvm_utils
$ sudo yum install qemu-img libguestfs-tools
Transform Boot Disk
You may need to convert the boot disk to the open standard qcow2
format used by the PCA hypervisor.
Prepare the OCI File Type for Import
Private Cloud
Appliance X9-2 image and OCI images use the file type .oci
, which has two components:
- An
image_metadata.json
file that describes the image inJSON
format, and the actual disk image namedoutput.QCOW2
you created. - The
image_metadata.json
file describes the image's settings (BIOS vs. UEFI, how virtual devices are implemented), and what operating system it runs.
Select the BIOS or UEFI version based on the source and change the operating system description.
Oracle Exalogic images will be in BIOS mode.
$ tar zcf MyImage.oci image_metadata.json output.QCOW2
Example image_metadata.json
Files
Use this example image_metadata.json
file included in a .oci
bundle for upload.
Review the following BIOS and UEFI metadata file versions and use whichever is relevant. Set the BIOS or UEFI version as determined by the source environment values for operatingSystem
and operatingSystemVersion
based on the imported image.
BIOS images
{
"version": 2,
"externalLaunchOptions": {
"firmware": "BIOS",
"networkType": "PARAVIRTUALIZED",
"bootVolumeType": "PARAVIRTUALIZED",
"remoteDataVolumeType": "PARAVIRTUALIZED",
"localDataVolumeType": "PARAVIRTUALIZED",
"launchOptionsSource": "CUSTOM",
"pvAttachmentVersion": 1,
"pvEncryptionInTransitEnabled": false,
"consistentVolumeNamingEnabled": false
},
"imageCapabilityData": null,
"imageCapsFormatVersion": null,
"operatingSystem": "Oracle Linux",
"operatingSystemVersion": "8.5"
}
UEFI images
{
"version": 2,
"externalLaunchOptions": {
"firmware": "UEFI_64",
"networkType": "PARAVIRTUALIZED",
"bootVolumeType": "PARAVIRTUALIZED",
"remoteDataVolumeType": "PARAVIRTUALIZED",
"localDataVolumeType": "PARAVIRTUALIZED",
"launchOptionsSource": "CUSTOM",
"pvAttachmentVersion": 1,
"pvEncryptionInTransitEnabled": false,
"consistentVolumeNamingEnabled": false
},
"imageCapabilityData": null,
"imageCapsFormatVersion": null,
"operatingSystem": "Oracle Linux",
"operatingSystemVersion": "7.9"
}