Accessing a physical drive in VirtualBox

I have decided to move my media centre from xbmcbuntu over to Windows Server 2008 which meant converting hard drives from EXT4 over to NTFS. Once Windows was installed I had to install VirtualBox and mount the physical ext4 partitioned drives in the virtual machine to allow me to copy the files over to NTFS partitioned drives.

In order to mount a physical drive inside a VirtualBox VM you need to create a virtual disk which points to the physical disk. This can be done by opening up a command prompt and cd to the directory containing VirtualBox (usually in Program Files somewhere). Once there you need to run the following command:

vboxmanage internalcommands createrawvmdk -rawdisk /dev/ -filename 

The -rawdisk value is the physical drive. In linux this will probably be /dev/sdc1/ or something similar. In Windows it should most likely be \\.\PhysicalDrive0. or \\.\PhysicalDrive1. You can find the number by opening up Disk Management where it tells you in the lower half of the window next to each disk drive.

Tags

Like this Article? Share it!

About the Author

Author Gravatar
Andy

Andy has been in IT support in the academic industry for over 7 years now, with an in-depth knowledge of both Windows and Unix based systems.

Related Posts

Leave a Comment