Creating the image of an existing virtual machine from Oracle VirtualBox as an appliance can help you to move the VM from one host to other or Oracle Cloud or even upload to the Internet that can be downloaded and imported by others easily. This post explains how to create a VirtualBox image that can be shared, and uploaded. Every virtual machine has its configuration, virtual disk, snapshot, log, and other temporary files. The location of these files can be anywhere on a computer as long as they are accessible.
Copying these files manually and editing the configuration file may help to move or share the virtual machine, but it’s not the professional way. Creating a VirtualBox image as an appliance is the ideal and professional way.
VirtualBox got a built-in export feature which can export the virtual machine in OVF (Open Virtualization Format). OVF will work on other hosts with VirtualBox and other OVF supported products.
When you create a VirtualBox Image with the export feature, it creates OVF and virtual hard disk (VMDK) files for the specific virtual machine, it doesn’t matter how many snapshots exist related to the VM in different locations. Therefore, sharing and uploading Virtual machine via the Internet or portable medium such as USB or external hard disks become easy with these exported images.
Steps Involved in How to Create VirtualBox Image
The below screenshots taken from the different versions of VirtualBox, ultimately you will not see much difference in your version. Select the appropriate options while doing the export.
1) Go to the File menu and select Export Appliance.
2) On the next screen select the virtual machine you want to create an image. The appliance image will contain the all required files to import and run on the different host.
Make sure that the particular VM is not powered on now. It should be turned off to export.
3) Select the format and location of OVF file in next screen. Virtual hard disk file VMDK also will be saved here. Depending on the destination host, you can change the format. It is better to leave the default one if you are not sure about the other hosts.
If an ISO image is attached to the particular VM, you can include that in the export. In most cases, it is not required, because we are going to export a fully working OS VM which may not require the installation ISO file.
4) Next screen allows modifying the options in exporting VirtualBox image. You can modify the values by double-clicking them. Adding the proper information will make the export professional if you are going to share on the Internet.
5) Creating an image process will start with a progress bar as shown below. Depending on the size of the VM and number of split snapshots it will take some time to export the image.
6) The exported full virtual machine image will be like below in the selected location.
In this example, my virtual machine Ubuntu10.10 got several snapshot files, but by the export feature all of them are merged and the above two files have the configuration, virtual hard disk and snapshot files.
Depending on where you are going to use this exported image, you can further zip it to make as a single file. In another case, if these two files are too big to upload to the Internet, you can use the file utility tools to split them and share in multiple files. The end user can use the 7zip or other tools to extract and get the original files before import the appliance.
I’m sure this post is very simple and straight forward in how to create a VirtualBox image. The above OVF file can be imported by ‘Import Appliance’ option in VirtualBox console menu.
Do share your issues and success stories on creating VirtualBox image by this method.