VirtualBox--trying to add raw drive, access denied error

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
harfleur
Level 1
Level 1
Posts: 14
Joined: Mon Jul 06, 2020 9:43 pm

VirtualBox--trying to add raw drive, access denied error

Post by harfleur »

Hi all--

I'm a complete newbie to Linux, and I'm trying to do something way out of my league here. I've managed to set up a VirtualBox machine (Mint 20) on my "regular" (physical?) Mint 20 machine. It works fine, but I want to set up access to a physical drive where I can keep files (system drive is really small). I found a tutorial and created a .vmdk file that points to the drive, but when I go into VirtualBox and try to add the drive, I get the following error:

Permission problem accessing the file for the medium '/home/user/VirtualBox VMs/Box1/DataDocs.vmdk' (VERR_ACCESS_DENIED).

The "other" drive is formatted as NTFS (so I could also hook this drive up to a Windows machine, if'n I wanted to).

I'm grateful for any help, since I have no idea what I'm doing! :-)

Thanks.
User avatar
Pierre
Level 20
Level 20
Posts: 10599
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: VirtualBox--trying to add raw drive, access denied error

Post by Pierre »

your main issue, would be that the 'other drive' is formatted to NTFS . .

there is no point is doing that, as any 'sharing' of the virtual drive(s) with the Windows System,
most probably won't work that well.

you should be able to move the .vmdk file, to another drive though,
- just an Linux based ext4 system . .
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
User avatar
spamegg
Level 4
Level 4
Posts: 384
Joined: Mon Oct 28, 2019 2:34 am

Re: VirtualBox--trying to add raw drive, access denied error

Post by spamegg »

Just set up a shared folder. In Virtualbox select your guest, click Settings, go to Shared Folders, click the green plus button. Then you might have to (inside the guest)

Code: Select all

sudo usermod -aG vboxsf yourusername 
and reboot.
harfleur
Level 1
Level 1
Posts: 14
Joined: Mon Jul 06, 2020 9:43 pm

Re: VirtualBox--trying to add raw drive, access denied error

Post by harfleur »

Thanks for the replies.

I tried setting up a shared folder, but the VirtualBox program doesn't see the other drive I'm trying to reach--only folders on the system drive.
Rocky Bennett
Level 5
Level 5
Posts: 567
Joined: Tue May 12, 2015 6:22 pm

Re: VirtualBox--trying to add raw drive, access denied error

Post by Rocky Bennett »

Do you have Guest Additions installed? You need to have that extension for you to be able to share files with the host.
Last edited by Rocky Bennett on Fri Jul 10, 2020 1:33 pm, edited 1 time in total.
harfleur
Level 1
Level 1
Posts: 14
Joined: Mon Jul 06, 2020 9:43 pm

Re: VirtualBox--trying to add raw drive, access denied error

Post by harfleur »

Not sure--I'll research that and get back to you.
harfleur
Level 1
Level 1
Posts: 14
Joined: Mon Jul 06, 2020 9:43 pm

Re: VirtualBox--trying to add raw drive, access denied error

Post by harfleur »

I'm running through the process to install the Guest Additions. When I check my "optical drives" in the Devices menu, I see the Guest Additions iso, and it says attached.

When I then click on Device-->Insert Guest Additions CD Image, I get "Unable to insert the virtual optical disk /usr/share/virtualbox/VBoxGuestAdditions.iso into the machine Box1." If I navigate to that location, I can see the iso file.
harfleur
Level 1
Level 1
Posts: 14
Joined: Mon Jul 06, 2020 9:43 pm

Re: VirtualBox--trying to add raw drive, access denied error

Post by harfleur »

Hello? Did I offend somehow? Apologies if I did.
harfleur
Level 1
Level 1
Posts: 14
Joined: Mon Jul 06, 2020 9:43 pm

Re: VirtualBox--trying to add raw drive, access denied error

Post by harfleur »

I stumbled across the command line to install the Guest Additions, so I believe that's done now.
RIH
Level 5
Level 5
Posts: 650
Joined: Sat Aug 22, 2015 3:47 am

Re: VirtualBox--trying to add raw drive, access denied error

Post by RIH »

OK.. Can you see the drive in your Mint Host??
If you can then it is easy enough to set it up as a shared folder in the guest, but just a bit convoluted to do so.

In VirtualBox go to settings, shared folders & click the green plus sign.
Click the drop down arrow in the Folder Path box.
Select Other
The Find Directory Window will open.
Click on the Computer Icon in the left hand panel & then double mouse click the root (/) symbol in the right hand panel
Open the Media Folder
Double mouse click on your name.
The drive should now show..Select & OK everything...
Select if to make it Read Only & if to Auto Mount...
Host: bob-Aspire-TC-705 Kernel: 4.15.0-112-generic x86_64 bits: 64
compiler: gcc v: 7.4.0 Desktop: Cinnamon 4.4.8
Distro: Linux Mint 19.3 Tricia base: Ubuntu 18.04 bionic
harfleur
Level 1
Level 1
Posts: 14
Joined: Mon Jul 06, 2020 9:43 pm

Re: VirtualBox--trying to add raw drive, access denied error

Post by harfleur »

Thanks, but I'm afraid I'm going to have to back up a little. I CAN see the drive in the host BUT...I'm getting some strange behavior in the host that I can't fix. At some point as a test in the host I created a text file and a folder on that drive and then deleted the text file, just to make sure I had write access. Now, I'm unable to make any changes to the drive. When I bring it up in the...I'll call it File Manager (please forgive the Windows terminology!), right-clicking no longer gives me the option to create a file or folder--they're greyed out. I've checked permissions on the drive, and to the best of my knowledge, it's read-write. What the heck could have changed so that I can no longer write to it? I have restarted several times, to no avail.

Update: I connected the troublesome hard drive to a Windows machine, and was able to write on it, no issues. I connected a DIFFERENT HD to the Linux machine, and was able to write on it, no issues. I reconnected the first hard drive to the Linux machine and...still can't write to it.

Thanks
Post Reply

Return to “Newbie Questions”