Day: July 13, 2022

How to use virtualbox to install OSes on physical disks

In virtualbox it is a little bit more difficult to install an OS in a physical disk, but it is possible.

First you need to create a New image normally, but instead of creating a disk image in the computer select Do not add a virtual hard drive.

Then use the VBoxManage to create disk image that point to your external disk (i.e. /dev/sdb) :

# VBoxManage internalcommands createrawvmdk -filename NewHDOS.vmdk -rawdisk /dev/sda

Now just start the virtualbox and click in the Settings -> Storage and add this vmdk file as your hard disk.


Update: Today I tried to do it again and faced an issue: the default Controller was DVD instead “Controller: IDE”. So you need to remove the original Empty device and add again as IDE and then select the .vmdk file to use with it.