Skip to content

How to convert a VirtulBox VM to a bootable drive

This is quite easy so I was surprised that I couldn’t find a walk-through anywhere…so here’s one :)  This is specifically for a VM of Ubuntu, so it’s possible there may be other hurdles in place for different operating systems.

Step 1

Create a VM normally in VirtualBox (or use an existing one), install the operating system, and add any programs or files you want to have readily available on the bootable disk.

Step 2

This is the tricky part, you can use Virtual Box to convert a vdi to an iso, but you have to do it from the terminal.  On my machine it wouldn’t work at all in windows default terminal, but I have Cygwin installed, and was able to use that.  You first need to cd into the directory where Virtual Box is installed, and run the following command.  The folder structure is specific to my machine and will most likely need to be changed on yours.

1
"/cygdrive/p/Programs/VirtualBox/VboxManage.exe" clonehd 'F:/Documents/Virtualbox/Ubuntu_2017/Ubuntu 2017.vdi' 'F:/Documents/Virtualbox/Ubuntu_2017.iso' --format RAW

More simply you need to run something like this:

1
VboxManage.exe clonehd 'vdi_location.vdi' 'where_generated_iso_will_be_location.iso' --format RAW

Step 3

Use rufus to install the ISO as a bootable image on your USB drive

And that’s about all you need to do!  Then you can take a carbon copy of your VM with you wherever you go :)  Great for travelling, which was my need.

Published inOtherScripting

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *