Infrastructure at your Service

Franck Pachot

VirtualBox 5.2 exports the VM to the Oracle Cloud

By Franck Pachot

The new release of Oracle VM VirtualBox (aka VirtualBox) is there with a new functionality to export a VM to the Oracle Cloud Compute (aka Oracle Cloud Infrastructure). That can be interesting to prepare a VM on my laptop and move it to the Cloud to get it accessible from everywhere. Here’s my first try. In my opinion, it’s idea but probably need further evolution.


Here is what is new: in addition to .ova you can export to an Oracle Public Cloud image:

This takes some time, as it compresses and writes all the disk images


The result is a .tar.gz for each disk attached to my VM. It is actually the image of the disk (.img) that is tar-ed and then gzipped. My VM (called VM101) had two disks (VM101-disk1.vdi and VM101-disk2.vdi). The export generated: VM101.tar.gz (containing VM101-disk002.img which looks like my first disk) and VM101-disk003.tar.gz (VM101-disk003.img which looks like my second disk)

Here is the content:

$ tar -ztvf VM101.tar.gz
-rw-r----- vboxopc10/vbox_v5.2.VBOX_VERSION_PATCHr11 4294967296 2017-10-19 21:23 VM101-disk002.img
$ tar -ztvf VM101-disk003.tar.gz
-rw-r----- vboxopc10/vbox_v5.2.VBOX_VERSION_PATCHr11 27917287424 2017-10-19 21:25 VM101-disk003.img

The .img is the image of the disk, with the partition and boot sector.

Compute Cloud

In the Oracle Public Cloud I can import this image: Compute Classic -> Images -> Upload Image


I upload only the image of the first disk, which contains the root filesystem:



And then I create the compute instance with the ‘Associate Image’ button:


Now, I’m ready to create an instance for it: Instance -> Customize -> Private Images


Then, I can define the shape (OCPU and memory), upload my SSH public key, and add storage (I could add my second disk here) and create the instance.

Here I’ve started it:


Unfortunately, my VM still has the network interface defined for my VirtualBox environment and then I have no way to connect to it. I hope that this feature will evolve to also export virtual network interfaces.

I have not seen any way to open a terminal on console. The only thing I can do is take snapshots of it:


Ok, so there’s a problem way before the network interfaces. My VM from Oracle VM VirtualBox (aka VirtualBox) now starts on Oracle VM (aka OVM) and besides the similar marketing name, they are different hypervisors (OVM running XEN). Probably a driver is missing to access block devices and maybe this Bug 21244825.

That’s probably all my tests on this until the next version. It is currently not easy to have a VM that can be started on different hypervisors and network environment.

So what?

Nothing very special here. Moving a VM from one hypervisor to the other is not an easy thing, but it is a good idea. And I hope that the integration into Oracle Cloud will be easier in the future with virtual disk and network interfaces. For the Oracle Cloud, it will be nice to have access to the console, but at least a screenshot may help to troubleshoot.


  • Simon says:

    Hi Franck,

    this issue is expected because you are moving from one hypervisor to an other one.
    This problem is not part, for example, of our Templates we have for Oracle Linux where the issue has already been addressed.
    By seeing the pictures you shared it seems that the kernel is not able to get access to the storage (vdisk) maybe due to a missing driver; a possible w/a to this could be to:

    Edit your dracut.conf on the VM (best on source but you could do this also on target and add:

    add_drivers+=" xen_netfront xen_blkfront "
    add_drivers+=" virtio_blk virtio_net virtio virtio_pci virtio_balloon "
    add_drivers+=" hyperv_keyboard hv_netvsc hid_hyperv hv_utils hv_storvsc hyperv_fb "
    add_drivers+=" ahci libahci “

    then rebuild initrd/initramfs (dracut -f) before exporting the VM.


  • Claudio says:

    Hi, do you have the possibility in Oracle Cloud to improve your imported ova up to 128 vcpu and 256GB ram?

    thanks for the answers,


  • Fazul says:

    Hi Franck,

    How to import the second Virtual Disk (Disk2) once the instance is up and running from the image?.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Franck Pachot
Franck Pachot

Principal Consultant / Database Evangelist