Page 1 of 1

Using Win7 in Bootcamp with VirtualBox in OS Mavericks

Posted: 4. Nov 2013, 01:00
by Flohy
I have Windows7 installed in a Bootcamp partition from Mac OS X Maverick. I downloaded the latest version of VirtualBox 4.3.2.

Before configuring Virtual Box I prepared Mac OS X, unmounted Bootcamp drive ($sudo chmod 777 /dev/disk0s4).

Then configured Virtual Box for the first boot ($sudo VBoxManage internal commands createrawvmdk -rawdisk /dev/disk0 -filename win7raw.vmdk -partitions 4). The two files "win7raw.vmdk" and "win7raw-pt.vmdk" were successfully created.

However when I open Virtual Box, go to "new", select "use an existing virtual hard drive file" and then browse to the "win7raw.vmdk" file and want to open it, the following error occurs:

Failed to open the hard disk file /Users/flohy/win7raw.vmdk.

Permission problem accessing the file for the medium '/Users/flohy/win7raw.vmdk' (VERR_ACCESS_DENIED).

Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: Medium
Interface: IMedium {05f2bbb6-a3a6-4fb9-9b49-6d0dda7142ac}
Callee: IVirtualBox {fafa4e17-1ee2-4905-a10e-fe7c18bf5554}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)


I am really grateful for your help.

Re: Using Win7 in Bootcamp with VirtualBox in OS Mavericks

Posted: 4. Nov 2013, 10:56
by noteirak
Raw access is an expert feature, so the support will be limited. But this is clearly a permission issue, either with the device or with the VMDK.

Re: Using Win7 in Bootcamp with VirtualBox in OS Mavericks

Posted: 7. Nov 2013, 00:00
by JimBushWhack
If you look at viewtopic.php?f=27&t=51386, and follow along, you will see that you also have to set open access to those 2 files, in your case it would be "sudo chmod 777 /Users/flohy/win7raw*.vmdk".

Re: Using Win7 in Bootcamp with VirtualBox in OS Mavericks

Posted: 7. Nov 2013, 15:27
by Flohy
It works! Thanks mate, you are the best :D

Re: Using Win7 in Bootcamp with VirtualBox in OS Mavericks

Posted: 14. Jan 2014, 00:00
by macnlkc
I have a MacBook Pro with Core i7, 16GB RAM, 512GB SSD, Retina display, MacOS 10.8.5, VirtualBox 4.3.6, BootCamp and Windows7. When I do the initial install of VB, I build a VMDK and reference the Bootcamp partition. At this point, everything works fine and I can restart the Windows VM inside of the MacOS without any problems. The Windows VM is operational inside of the MacOS. However, the moment I shutdown the Windows OS and reboot the MacOS and then attempt to restart the MacOS and then the Windows OS I get an error stating that "VERR_ACCESS_DENIED" with an error code of NS_ERROR_FAILURE. I dismount the Bootcamp partition before attempting to start the Windows OS and have checked ownership and execution rights capabilities on the .vmdk file. This works on my other Macs without a hitch. Any ideas as to what is wrong?

Re: Using Win7 in Bootcamp with VirtualBox in OS Mavericks

Posted: 14. Jan 2014, 19:46
by JimBushWhack
I believe this is because when you rebooted, the access to the /dev/disk0s4 was removed and also the BOOTCAMP partition was most likely mounted on MacOS. If you look at viewtopic.php?f=27&t=51386, you will see that I have built an AppleScript file that will set access to the device file as well as unmount the Bootcamp partition prior to invoking VBox. To start VBox then, you simply invoke the AppleScript file.

Re: Using Win7 in Bootcamp with VirtualBox in OS Mavericks

Posted: 15. Jan 2014, 18:57
by macnlkc
Thanks. I actually used your script on my other machines. However, it still doesn't seem to work. The Bootcamp volume is dismounted and the ownership and permissions on the volume are correct. However, it still doesn't give me access to the volume. This is the first Retina unit that I have set this up on and don't know if that is the reason. Any other thoughts?

Re: Using Win7 in Bootcamp with VirtualBox in OS Mavericks

Posted: 16. Jan 2014, 23:54
by JimBushWhack
Note that my success has always been when using a 32Bit version of Windows 7 within the Bootcamp partition. I have never gotten a 64Bit version of Bootcamp installed Windows 7 to work with VirtualBox, although other folks have been able to set up a 64Bit Bootcamp version. There is some discussion of this in later entries of the HowTo that I put together on this topic. This may be where you are having problems. I would not think that a Retina display would make any difference, but stranger things have happened.