VirtualBox Problem

OK, I took previous advice and installed VirtualBox. It seems to work, but I want to mount a physical drive to it. It’s NTFS, and when I try to load the vmdk file for it, I get a permissions problem.

Failed to open the hard disk file /home/pat/VirtualBox VMs/Windows 8.1/VirtualBox\ VMs\ Windows\ 8.1.vmdk.

Permission problem accessing the file for the medium ‘/home/pat/VirtualBox VMs/Windows 8.1/VirtualBox\ VMs\ Windows\ 8.1.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’m running VB as a user, but a user doesn’t have permission to do a disk mount (also, the drive itself, when I mount it as admin, shows it owned and grouped as root, probably because it’s NTFS). The file itself is owned and grouped by the user. Any suggestions?

10 thoughts on “VirtualBox Problem”

  1. I’d never tried this before as I’d just used the shares, but I managed to make a vmdk file and get Vista to see it. How did you create your vmdk file? I used VB to create a WinXP machine with a vmdk file (so permission’s not a problem, but you might want to see if you’re in the vboxusers group). I had no intention of installing WinXP as I just wanted to make the file. Then I added this vmdk file to the SATA controller in my existing Vista machine. When booting, Vista saw the new “disk” and installed drivers. I then had to go into computer manager and create a volume and format the volume with NTFS. Presto, the new disk appears in Vista as an empty NTFS volume. I then removed the WinXP “machine” from VB but left the vmdk file there and it’s still available to the Vista machine. I had no trouble doing this, but I created the vmdk file within VB. If you have an existing vmdk, you might want to see if its permissions are the same as your machine (a vdi?). This was all done in Ubuntu 14.04.

    1. The problem is that I don’t have an existing machine. I’m trying to get into it from a VM so I can fix/upgrade it.

      That is, I’m not just trying to access a physical drive. I want to make that drive the basis for the Windows VM, because it’s an old Windows 7 installation that I want to upgrade as a VM to preserve the old installed Windows software.

      1. Doing a little digging, I found that people appear to have done what you want but it’s tricky. It appears you have to convert a disk image of the physical drive into something VB can read (typically a vmdk file). There are utilities to do this. The tricky part seems to be that some device drivers may be needed in the new file to make the vmdk file bootable in a virtual machine. Otherwise you risk getting the blue screen of death. I’ve not tried this myself.

  2. I’m not sure this would work, as VB wants to boot into a virtual drive. It would be possible to “see” a physical drive if Linux had mounted it and shared it. But that wouldn’t be your boot drive. I’m a bit confused. You mention a virtual vmdk drive and a physical drive as if they are one and the same. Did you somehow take the contents of the physical drive and convert it to a vmdk? It may be possible to do what you want but it would take a lot of digging into the VB docs.

      1. I tried out the tutorial that was linked to above to see if I could get an OEM XP partition (in my case /dev/sdb1) to boot in VB. I ran into the same problems as you did when making a stub vmdk to point to the physical drive. At first, VBoxManage would not create the file, so I ran it as superuser. That worked, but VB would not access the file. So I changed the ownership of the file from root to me. That did not work, so I changed the ownership of /dev/sdb1 from root to me and then VB could access the vmdk and attempt a boot up. I get a black screen, but I’m pretty sure I’ve got to tweak VB and XP settings at this point to go any further. I suspect that if I had started by changing the ownership of /dev/sdb1 to me right at the start, VB would have been happy. Of course, YMMV.

        1. That sounds like my experience so far, too.

          It may be that you have it loaded but it doesn’t know what to do with it, if it’s not a boot disk. In my case, that would be fine, because the one I want to mount is a broken Windows 7 installation that I want to repair and upgrade to 8.1 with a DVD. So if I can mount it, I can boot with the DVD, which would then theoretically see the old windows drive, and fix it, after which it could boot on its own.

Comments are closed.