5

So I followed the instructions here. However, when I went to Virtualbox and told it to use the file I got the error

Failed to open the hard disk file /home/parth/Win7.vmdk.

Permission problem accessing the file for the medium '/home/parth/Win7.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)

1 Answer 1

7

The VirtualBox user should be the owner of .vmdk file and have read & write permissions for both .vmdk and the device it refers to (like /dev/sda). Everything in /dev/ is owned by root, so you have two options:

  1. Run VirtualBox as root. I wouldn't suggest it because such a huge application as VirtualBox potentially have bugs that are capable to crash your system being rooted.

  2. Grant your user the permissions for the .vmdk file and the /dev/sdX device:

    a. Make sure .vmdk is somewhere in your home directory

    b. Make sure that your user is the owner of .vmdk and have read and write permissions for it (right click -> Properties -> Permissions)

    c. Grant your user the permissions for the device:

    sudo chmod 666 /dev/sdX

    (place the required device instead of /dev/sdX)

2
  • 2
    If you added the the group "disk" to the vboxuser/virtualbox user, make sure you reboot the Host OS or log out and login in to ensure the user can access devices whose group is "disk". Mar 16, 2016 at 22:26
  • normal user add to disk group is dangerous, chown/chmod specified device is better.
    – yurenchen
    Sep 16, 2022 at 12:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .