Page 1 of 2

Adding physical disk failed - where I did mistake?

Posted: 3. Dec 2017, 22:35
by MIRKOSOFT
Hi!

I tried to attach to VM physical disk partition, I was following guide and failed.
First I addsharing of two partitions for 5 users with full access.
Then I opened command line as admin and typed commands below - you can see results:

Code: Select all

E:\Desktop>cd C:\Program Files\Oracle\VirtualBox

E:\Desktop>c:

C:\Program Files\Oracle\VirtualBox>VBoxManage internalcommands listpartitions -rawdisk \\.\PhysicalDrive5
VBoxManage.exe: error: Cannot open the raw disk: VERR_SHARING_VIOLATION

C:\Program Files\Oracle\VirtualBox>VBoxManage internalcommands createrawvmdk -filename L:\APPS-NTFS.vmdk -rawdisk \\.\PhysicalDrive5 -partitions 1
VBoxManage.exe: error: Cannot open the raw disk '\\.\PhysicalDrive5': VERR_SHARING_VIOLATION
VBoxManage.exe: error: The raw disk vmdk file was not created

C:\Program Files\Oracle\VirtualBox>VBoxManage internalcommands createrawvmdk -filename L:\DOS-FAT.vmdk -rawdisk \\.\PhysicalDrive5 -partitions 2
VBoxManage.exe: error: Cannot open the raw disk '\\.\PhysicalDrive5': VERR_SHARING_VIOLATION
VBoxManage.exe: error: The raw disk vmdk file was not created

C:\Program Files\Oracle\VirtualBox>
Where do I mistake?

Thank you all for help.
Miro

Re: Adding physical disk failed - where I did mistake?

Posted: 4. Dec 2017, 08:49
by socratis
1) You could ask whoever wrote the guide you're following.
2) You need the disk to be ejected from the host, not being mounted.

Re: Adding physical disk failed - where I did mistake?

Posted: 4. Dec 2017, 11:15
by MIRKOSOFT
what here means ejected? I mean it is not same as disconnected...

Miro

Re: Adding physical disk failed - where I did mistake?

Posted: 4. Dec 2017, 11:19
by Martin
Windows needs to unmount the disk partition so that nothing else from the OS is accessing/locking it.

Re: Adding physical disk failed - where I did mistake?

Posted: 4. Dec 2017, 11:28
by socratis
BTW, it's not just Windows, OSX needs the drive to be ejected/unmounted/whatever too, and I suspect so does Linux and Solaris.

Re: Adding physical disk failed - where I did mistake?

Posted: 4. Dec 2017, 11:43
by MIRKOSOFT
Ok, really I'm not beginner in Windows but with this I meet never before...

So, I'm asking like beginner - how to do it?

Is enough to remove partition letter?

Miro

Re: Adding physical disk failed - where I did mistake?

Posted: 8. Dec 2017, 23:47
by MIRKOSOFT
I tried to remove drive letters, but helped not - same errors.

Can anybody help me?

Miro

Re: Adding physical disk failed - where I did mistake?

Posted: 9. Dec 2017, 00:41
by socratis

Re: Adding physical disk failed - where I did mistake?

Posted: 9. Dec 2017, 02:57
by MIRKOSOFT
Ok, this I didn't knew really and my UEFI has feature which allows to work with drives like removable media... Quick Remove
But last Q is - it must to be unmounted always?
If only while running VirtualBox it's ok, but if always it is useless..

Miro

Re: Adding physical disk failed - where I did mistake?

Posted: 9. Dec 2017, 09:49
by socratis
The raw disk option requires the drive to be unmounted, as long as it is being used as a raw disk. You can of course mount it afterwards.

Re: Adding physical disk failed - where I did mistake?

Posted: 9. Dec 2017, 15:18
by MIRKOSOFT
Yesterday evening I tried to unmount partition and tried also whole disk, but unmount button is gray and it means not usable.
When I triedunmount whole disk from taskbar icon, it reports error "Disk is in use, close programs..."

Today I tried to do the same after logoff and then logon - not success.

But really on disk or partitions which I want to unmount are no files - no data, so don't understand...

Miro

Re: Adding physical disk failed - where I did mistake?

Posted: 13. Dec 2017, 01:33
by MIRKOSOFT
No idea?

Miro

Re: Adding physical disk failed - where I did mistake?

Posted: 13. Dec 2017, 10:34
by socratis
This is not actually a VirtualBox question, per se. Treat it as such, and search the internet accordingly...

Re: Adding physical disk failed - where I did mistake?

Posted: 13. Dec 2017, 12:24
by MIRKOSOFT
So, I have to go to other forum for asking part of Q?

In posts above was recommened how to unmount disk for creating virtual disk from physical...
Sadly it looks like here is not so big support, sadly.

Miro

Re: Adding physical disk failed - where I did mistake?

Posted: 13. Dec 2017, 12:45
by socratis
All I said is to search the internet for your problem. Is that a hard thing to ask? Plus if I'm not mistaken, you do not have a support contract, right? So "demanding" support, is something that you're not entitled to. ;)