Windows – VirtualBox: raw disk access on Windows 7 denied

virtual machinevirtualboxvirtualizationwindows 7

I'm currently dual-booting an Archlinux (where I do all of my work) and a Windows 7 install (where I play games). However, I'm getting tired of rebooting each time I want to play a quick game, and so decided to boot my Archlinux install from VirtualBox so I can work in Archlinux guest and play on Windows host. To do this, I followed the "Raw disk access" guide on VirtualBox's website.

Now, when I get past the syslinux bootloader in VirtualBox and try to boot into Arch, I get all sorts of errors about disk access and fsck fails, throwing me into a boot shell! Please note that I have booted into Arch to make sure it works flawlessly when booted normally. It's only the VirtualBox booting that causes problems.

I have looked all over the web and it seems like Windows 7 doesn't allow raw access to hard disks and almost all guides talk about offlining the HDD to allow VirtualBox access. However, since I only have 1 HDD, I can't offline it (I'm running both operating systems on this 1 HDD).

Is there another way of allowing raw disk access to VirtualBox on Windows 7?

EDIT: VBox.log (taken from Machine -> Show Log menu)

Best Answer

[Edit: Doh, just noticed your situation is for one physical drive - you can take a volume offline with DISKPART instead of the whole disk. Can you run the OFFLINE VOLUME command in diskpart for your ArchLinux partition and use the "ATTRIBUTES VOLUME CLEAR READONLY" diskpart command afterward? I'm curious if this will work for you.]

Luckily, you can tell Windows to buzz off and let VirtualBox have raw disk access. Do the following:

  1. Offline the disk in disk management on the host.
  2. Using DISKPART, clear the read-only flag using the "ATTRIBUTES DISK CLEAR READONLY" command after selecting the affected disk.
  3. Boot the VM using the raw disk VMDK.

Note that Windows will yell at you if you're not running the VirtualBox management interface as administrator and using raw disk access VMDK's.

Related Question