permission error adding hard disk to virtual machine

Discussions related to using VirtualBox on Windows hosts.
Post Reply
omegamale
Posts: 2
Joined: 18. Mar 2015, 16:27

permission error adding hard disk to virtual machine

Post by omegamale »

I am trying to add a partition as a disk to my guest machine. This is what I tried.
Firstly I used Windows Disk management to shrink the existing partition on my hard disk.I then created a new unformatted partition from the free space.
Next I started command prompt as administator. I changed directory to C:\Program Files\Oracle\Virtual Box
From there I issued the command
VBoxManage internalcommands createrawvmdk -filename "C:\Users\ajf\VirtualBox VMs\Ubuntu 14.10\t2k.vmdk" -rawdisk \\.\PhysicalDrive0 -partitions 3
RAW host disk access VMDK file C:\Users\ajf\VirtualBox VMs\Ubuntu 14.10\t2k.vmdk
created successfully.

Next in virtualbox I went to
Settings
Storage
Add Hard Disk
Choose existing disk
- selected virtual machine disk format file called t2k
Open

I get an error
Failed to open the hard disk file

Permission problem accessing the file
VERR_ACCESS_DENIED
Failed to open the hard disk file C:\Users\ajf\VirtualBox VMs\Ubuntu 14.10\t2k.vmdk.

Permission problem accessing the file for the medium 'C:\Users\ajf\VirtualBox VMs\Ubuntu 14.10\t2k.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)

Any idea what is wrong?
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, OSX
Location: U S of A

Re: permission error adding hard disk to virtual machine

Post by ChipMcK »

omegamale wrote: . . . created a new unformatted partition from the free space . . .
As I recall, an existing virtual disk is expected to have been formatted.
Martin
Volunteer
Posts: 2562
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: permission error adding hard disk to virtual machine

Post by Martin »

The problem here most probably is that the host os has not released the access to the disk/partition.
omegamale
Posts: 2
Joined: 18. Mar 2015, 16:27

Re: permission error adding hard disk to virtual machine

Post by omegamale »

I don't see how I can format it from windows, as it is going to be a Linux format partition, once I can access it from the guest (Linux) system I can format it.

How can I tell windows to release the partition ?
Post Reply