Auteur Sujet: How to export a VirtualBox appliance  (Lu 25110 fois)

0 Membres et 1 Invité sur ce sujet

djohnston

  • Invité
How to export a VirtualBox appliance
« le: 05 mars 2013 à 08:06:48 »
VirtualBox refers to a virtual machine you have created as an "appliance". The purpose of this tutorial is to show how to export an existing VBox VM so that others can import it through the Import Appliance function in the VirtualBox menu.

1. First, be sure the virtual machine has shut down normally. It should be labelled as "Powered Off" in the main menu.

2. Select File > Export Appliance from the main menu.



3. Select a virtual machine to export.



4. For illustration purposes, I am using a Haiku VM. The export file can be .ova or (legacy) .ovf. I checked the legacy ovf option so that users with an older version of VirtualBox can also import the appliance. I also checked the Write Manifest file option. The manifest will contain all the VirtualBox settings of the original Haiku VM I am exporting.



5. Even though I chose to use the (legacy) ovf file format, VirtualBox will name the file as Haiku.ova. Because I did not want to take a chance of overwriting the original VM, I renamed the exported appliance to TEST. I also manually changed the extension from ova to ovf.



6. In the next menu, several configuration fields are shown which can be changed. Again, VirtualBox chose to use Haiku as the appliance name. By double-clicking that field, I am able to edit the name and change it to TEST.



7. Once I clicked the Export button, the appliance was re-created.



8. If I had chosen the ova option, there would be a single file to import. With the (legacy) ovf option, two files are created: the ovf and a vmdk. The vmdk contains the hard drive. A TEST.mf (manifest) file has been created, as well. (NOTE: I have not tried exporting/importing an ova file. See step #10.)

(thumbnail)


9. Now that I have exported the appliance, I can import it to VirtualBox. Select File > Import Appliance from the VBox menu.

10. Click the Open appliance button.



11. Select the ova or ovf file from the file browser window and click the Open button.




12. Click the Next button.



13. The manifest file will show the VirtualBox settings for the original Haiku VM. These configuration settings can be changed by double-clicking on the Configuration field and changing it, or by checking or unchecking boxes.



14. Notice that VBox has chosen to use the original VM name with a "_1" appended to the name. I changed it, once again, to TEST. I also checked the "Reinitialize the MAC address of all network cards" option. You can end up with a non-functioning emulated network card in VBox if you do not do this.



15. Once I press the Import button, the appliance is imported. The time required will depend on your computer's file transfer speeds and on the size of the virtual hard drive being imported. Shown below are the specifications for the just imported appliance.



16. Shown below is the just imported TEST VM running.

(thumbnail)


« Modifié: 05 mars 2013 à 08:20:00 par djohnston »

Hors ligne Taco.22

  • Membre Senior
  • ****
  • Messages: 391
    • Scorpio_Openbox
Re : How to export a VirtualBox appliance
« Réponse #1 le: 05 mars 2013 à 08:49:47 »
Bravo - excellent tutorial.  (Where's a thumbs-up icon when you need one!!)

Roughly how large would an Exported Appliance be - say the original ISO was about 600mb or 2gb installed?  Been quite a while since I last did one!
What can go wrong !!!

djohnston

  • Invité
Re : Re : How to export a VirtualBox appliance
« Réponse #2 le: 05 mars 2013 à 20:49:12 »
Roughly how large would an Exported Appliance be - say the original ISO was about 600mb or 2gb installed?  Been quite a while since I last did one!

In the example given, the Haiku virtual hard drive size is 8GB and its actual size is 716MB. The exported files are:

TEST.mf = 123 bytes
TEST.ovf = 11.6 KB
TEST-disk1.vmdk = 276.5 MB

So, the exported hard drive size is less than half the size of the original.

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1777
    • Citrotux
Re : How to export a VirtualBox appliance
« Réponse #3 le: 05 mars 2013 à 20:55:24 »
Very good tutorial, thanks a lot djohnston!

Good leaders being scarce, following yourself is allowed.

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1777
    • Citrotux
Re : How to export a VirtualBox appliance
« Réponse #4 le: 09 avril 2013 à 20:03:27 »
Hi,

I just found out : at the #5 of your tutorial if you click on the "Choose" button at the right of the field for the path to the file, you can of course choose in which directory you will have the export application send the file, but you can also choose the name extension from a drop down menu. I am testing it right now.

Good leaders being scarce, following yourself is allowed.

djohnston

  • Invité
Re : Re : How to export a VirtualBox appliance
« Réponse #5 le: 09 avril 2013 à 20:58:12 »
I just found out : at the #5 of your tutorial if you click on the "Choose" button at the right of the field for the path to the file, you can of course choose in which directory you will have the export application send the file, but you can also choose the name extension from a drop down menu.

Quite right, yes. You can also export as .ova. It saves the hard drive file as a vmdk, for some reason, rather than a vdi. I've exported and imported 2 or 3 VMs this way, as well as the way described above.