News, tips, partners, and perspectives for Oracle’s virtualization offerings

  • January 28, 2021

Export VM from VirtualBox to OCI - part 8

Valery Portnyagin
Senior Developer

Export to OCI via the command “VBoxManage export”

This approach is better than using VirtualBox GUI frontend because it doesn’t block all other activities in the GUI frontend. Also it’s suitable if user wants to handle this action more precisely. It means that re-run the action much easier from the command shell than from GUI. Apart from that user sees all arguments that he has passed to the command. And of course user can put the whole command into a shell script and add some extra steps around the command.

The command template:

VBoxManage export <machine>
--output OCI://
[--vsys <number of virtual system>]
[--vmname <name>]
[--cloud <number of virtual system>]
[--vmname <name>]
[--cloudprofile <cloud profile name>]
[--cloudbucket <bucket name>]
[--cloudkeepobject <true/false>]
[--cloudlaunchinstance <true/false>]
[--clouddomain <domain>]
[--cloudshape <shape>]
[--clouddisksize <disk size in GB>]
[--cloudocivcn <OCI vcn id>]
[--cloudocisubnet <OCI subnet id>]
[--cloudpublicip <true/false>]
[--cloudprivateip <ip>]
[--cloudinitscriptpath <script path>]

The command example:

./VBoxManage export OL8.2
--output OCI://
--cloud 0
--vmname OL8.2-OCI-name
--cloudprofile "test"
--cloudshape VM.Standard2.1
--clouddomain ergw:US-ASHBURN-AD-2
--clouddisksize 50
--cloudbucket bucket-20200625-1107
--cloudocivcn ocid1.vcn.oc1.iad.amaaaaaa6od...4egq
--cloudocisubnet ocid1.subnet.oc1.iad.aaaaaaaauv...5kfq
--cloudkeepobject true
--cloudlaunchinstance true
--cloudpublicip true
--cloudlaunchmode PARAVIRTUALIZED
--cloudinitscriptpath /absolute/path/to/cloud-init-script.yaml

The example of result:

Successfully exported 1 machine(s).
Creating a cloud instance...
A cloud instance with id 'ocid1.instance.oc1.iad.anuwcljs6odkg5ycanwxowo24ekrsw2oouklmw7xwmmhg2ymigk7zfmbt72q' 
(provider 'OCI') was created

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.