exporting a virtualbox VDI to a harddrive to boot it natively

37,164

Solution 1

You can export a VDI to a raw disk image with the following command:

VBoxManage clonemedium --format RAW debian.vdi debian.img

You can then use the dd command or any suitable disk imaging software to write the image to the disk.

Solution 2

Since you are using Windows as your host system, you can proceed in 2 steps.

  1. Convert your VDI into a raw IMG with the command:

    VBoxManage.exe clonehd --format RAW source.vdi destination.img
    
  2. Then use a tool like HDDRawCopy to copy the raw IMG to your HDD.

Share:
37,164

Related videos on Youtube

PaulH
Author by

PaulH

Updated on September 17, 2022

Comments

  • PaulH
    PaulH over 1 year

    I have a VirtualBox 3.1.2 image of Debian 5.0.2 running on Windows XP SP3. I would like to export that Debian image to a USB harddrive such that I could boot to that drive and run it natively. Is that possible to do with a VDI?

  • masterxilo
    masterxilo over 5 years
    Thanks for the HDRawCopy tip. I didn't think this would actually work, but the disk you copy it to and the original image don't even need to have the same size - I just copied a 200 GB vhd to a 2 TB hdd.
  • chetbox
    chetbox over 5 years
    Note that clonehd is now called clonemedium.
  • srghma
    srghma over 2 years
    note that (before Windows/Ubuntu is installed from .iso) You should enable System -> EFI, this way your .img will contain GPT partition table, and not MBR
  • srghma
    srghma over 2 years
    Maybe it makes sense use storage with fixed size that is equal to size of your USB drive (this way .img size with eq to size you have selected). Note that You cannot reduce size of storage of VirtualBox machine, only make bigger