Export VM from VirtualBox to OCI - part 1 (Introduction and Prerequisites)



  • Introduction

    VirtualBox supports export a local VM into OCI. There is the Oracle VM VirtualBox Technical Paper “ Journey to Oracle Cloud Infrastructure with Oracle VM VirtualBox” which contains enough general information how to apply this feature for OCI. This article is intended to explain some technical details more precisely or to cover the topics which may be omitted or can’t be described in the white paper. Some quotations from the white paper or the references to this one will be present here. Also some text from Official OCI documentation is quoted here. The article has no aim to replace the white paper, moreover the better way is to use one together with the white paper.

    Carefully read the next OCI documentation to avoid any simple mistakes on the beginning:

    It’s supposed that user already has credentials to login to OCI and knows some basic stuff about OCI like IAM, VCN, Subnet, Object Storage.

    Next parts Part 2 - Setup SSH on Linux VM Part 3 - Setup Serial Console Connection on Linux VM Part 4 - Setup VirtIO drivers on Linux VM Part 5 - Network stuff Part 6 - OCI side preparation Part 7 - Setup firewall on OCI instance Part 8 - Export to OCI via the command “VBoxManage export” Prerequisites OCI IAM rights

    User must have the appropriate IAM rights to upload the objects into a bucket, to create VCN and Subnet or to use VCN and Subnet, to launch an instance. If user hasn’t enough rights the action will fail. If you don’t know whether you have an appropriate IAM role or not then ask your tenancy administrator. If you're new to policies, see Getting Started with Policies and Common Policies. For reference material about writing policies for instances, cloud networks, or other Core Services API resources, see Details for the Core Services. The rules will be explained more in the part 6.

    VirtualBox cloud profile

    User must have create and configure OCI profile in VirtualBox manually or using Cloud Profile Manager. See the white paper Journey to Oracle Cloud Infrastructure with Oracle VM VirtualBox.

    Linux and Windows Source Image Requirements

    At present the requirements are identical for both systems. OCI documentation says that a custom image must meet the following requirements:

    • The maximum image size is 400 GB.
    • The image must be set up for BIOS boot.
    • Only one disk is supported, and it must be the boot drive with a valid master boot record (MBR) and boot loader. You can migrate additional data volumes after you import the image's boot volume.
    • The minimum boot volume size is 256 GB for Windows and 50 GB for Linux. For more information, see Custom Boot Volume Sizes.
    • The boot process must not require additional data volumes to be present for a successful boot.
    • The disk image cannot be encrypted.
    • The disk image must be a VMDK or QCOW2 file.
      • Create the image file by cloning the source volume, not by creating a snapshot.
      • VMDK files must be either the "single growable" (monolithicSparse) type or the "stream optimized" (streamOptimized) type, both of which consist of a single VMDK file. All other VMDK formats, such as those that use multiple files, split volumes, or contain snapshots, are not supported.
    • The network interface must use DHCP to discover the network settings. When you import a custom image, existing network interfaces are not recreated. Any existing network interfaces are replaced with a single NIC after the import process is complete. You can attach additional VNICs after you launch the imported instance.
    • The network configuration must not hardcode the MAC address for the network interface.
    General logic

    The following is a high-level outline of the steps which VirtualBox does:

    • Convert an user image as VMDK if it’s needed.
    • Upload the image to Oracle Cloud Infrastructure Object Storage. See Overview of Object Storage for more information.
    • Import the uploaded image, it means a custom image creation.
    • Launch new instance using the custom image and user settings.
    next |

    https://blogs.oracle.com/virtualization/export-vm-from-virtualbox-to-oci-part-1-introduction-and-prerequisites

Log in to reply
 

© Lightnetics 2024