Home » Learn » How-To’s » How to export from VirtualBox

How to export from VirtualBox

Install your desired Linux distribution as a new VBox image. Configure it with all required packages, and remember  to install openssh (otherwise it won’t be possible to log into your virtual machine). The input file is called image.vdi.

Then, from a terminal:

$VBoxManage clonehd --format RAW image.vdi output.img

The .img is written in the same directory of the .vdi file.

If you did multiple snapshots of your virtual machine, what you want most probably is to make an image out of the latest image. To do so, first use showvminfo command:

$VBoxManage showvminfo image
Name: clean install (UUID: 378a8233-2619-41f3-a96e-f00b4cdd1c79)
Name: splayd+rsa_key (UUID: f42d377c-e3cc-4339-a3fc-921d515767bf)
Name: fixed splay_repo (UUID: 6333f1e2-0720-44a5-b750-17de01f1df36)
Name: splay sudo no passwd (UUID: 2236ff8b-c701-4f26-819e-378243f37492) *

Choose the name of the image you want clone, and run:

VBoxManage clonehd –format RAW 2236ff8b-c701-4f26-819e-378243f37492 from-snapshot.img