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.
Export Private Cloud Appliance 2.x Storage Repositories
You have a couple of options for exporting storage repositories from Private Cloud Appliance 2.x deployments.
On Private Cloud Appliance 2.4, storage repositories are mounted to the compute nodes, which by default are on PCA's private networks and do not have a preconfigured network connection to the data center. In that case:
- You can
scp
the.img
file to either of the two management nodes. - Or, create a read-only Oracle VM repository export to the management nodes, and then
scp
to an external host.
The following steps are excerpted from the Oracle Private Cloud Appliance Backup Guide. This process can be used to bulk export all the VMs in an Oracle VM storage repository:
Locate and Export VM VirtualBox Disk Images
Oracle VM VirtualBox usually stores disk images in the directory VirtualBox VMs
in a subdirectory with the same name as the VM.
Locate and Export KVM Disk Images
Virtual machine disk images can be located by issuing the command shown below:
Locate and Export VMware Disk Images
VMware images can be exported to a "virtual appliance" which is actually a tar
file containing the disk image.
Use a similar procedure to obtain the virtual appliance, then use the tar
command to extract the .vmdk
file from the .ova
file, and copy it to the utility host.
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.
Note:
It is recommended, but not strictly necessary, to convert disk images already invmdk
or qcow2
format and package them in a .oci
file. The .oci
file includes the disk image in qcow2
format, and image metadata. That ensures the correct metadata for the image is provided with the disk contents.
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"
}