Categories
DevOps

How to use physical hard disk in VirtualBox

To use a physical hard disk in VirtualBox you need to create an image that will represent it.

This can be done by issuing the following commands.

Linux

VBoxManage internalcommands createrawvmdk -filename sdb.vmdk -rawdisk /dev/sdb

Windows

VBoxManage internalcommands createrawvmdk -filename D:\hdd_phy_1.vmdk -rawdisk \\.\PhysicalDrive1

For more relevant information, look at the VirtualBox manual.