How to use physical hard disk in VirtualBox

To use physical hard disk in VirtualBox you need to create image that will represents 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 VirtualBox manual.

Milosz Galazka's Picture

About Milosz Galazka

Milosz is a Linux Foundation Certified Engineer working for a successful Polish company as a system administrator and a long time supporter of Free Software Foundation and Debian operating system.

Gdansk, Poland https://sleeplessbeastie.eu