• Hi there and welcome to PC Help Forum (PCHF), a more effective way to get the Tech Support you need!
    We have Experts in all areas of Tech, including Malware Removal, Crash Fixing and BSOD's , Microsoft Windows, Computer DIY and PC Hardware, Networking, Gaming, Tablets and iPads, General and Specific Software Support and so much more.

    Why not Click Here To Sign Up and start enjoying great FREE Tech Support.

    This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to unmount harddisk or partition?

Status
Not open for further replies.

MIRKOSOFT

PCHF Member
Aug 30, 2016
204
21
44
Hi!

In discussion on VirtualBox forum about using physical HDD or partition as virtual disk was recommended unmount HDD or partition.
I tried it by these steps:
1. I opened File Explorer
Unmount drive 1.png
2. selected this PC
Unmount drive 2.png
3. selected wished partition
Unmount drive 3.png
4. changed in toolbox to Drive tools in manage tab
Unmount drive 4.png
5. tried to use Eject - and here is problem - Eject button is disabled (gray) and I can't to do next step
Unmount drive 5.png
6. safe remove...
Unmount drive 6.png

So, Q is really simple but
I don't know if is answer easy.
My computer UEFI has also option for each HDD "quick disconnect" - which allows me to unmount it by other way.
By this way I can after pressing safe remove button in tray unmount wished harddisk - all are there placed like USB devices - but there is other problem:
When I click to unmount it always reports "Disk is in use. Close all applications and try again." - but also when I click drive where is no any file, only three clean partitions prepared for VirtualBox physical disk as virtual disk use.

So, howto unmount whole harddisk or single partition?

Thank you for each reply.
Miro
 
have you researched the DISKPART command, and in particular the Select Vdisk File, Attach Vdisk, Detach Vdisk commands?
but what is it you are trying to achieve?
if you just want to setup a Virtual PC using VM software, it will create a virtual hard drive where ever you specify as a single file, usually a VHD file.
 
I know about DISKPART command but don't know its possibilities.

What I want to reach?
Add to virtual machine physical disk or partition like its HDD - so not any virtual disk or shared folder - access to real physical disk.
It needs to use command to create virtual disk file only with info of access type and what access.
But without unmounting it reports always error about sharing violation - even disk is not shared

If can DISKPART help, please tell me how to use it.
Thank you very much!
Miro
 
I've only used 2 VM programs in the past, Oracles VirtualBox and now VMWare's Workstation Player.
I had a VHD (Virtual Hard Drive) for whatever OS I was playing with at the time.
Both programs allowed a shared networked folder to a folder on the physical drive so I would map, say, X:\ drive to C:\Shared Data\ in all the VM's and share data that way.
You could also setup access to an external USB stick and shared data that way between the virtual and the actual PC's.
 
I'm using VirtualBox and know what do you think, but not all operating systems have VBox Extensions available and without them is not possible to share any folder or drive. Example Windows older than 2000 have them not and there is not possible to use also USB. I'm using even older Windows and can to do only add physical disk by creating Virtual Disk by way written in this thread. I know that VMware it has much more easier but I'm not rich to buy it.
All what I'm asking in this thread is how to unmount HDD or partition, all other can do by myself.
Miro
 
So, here's unmount script (R drive as example) - must to be started as admin:
Code:
@echo off

REM Be sure to change this to the drive you want to unmount!
set drive=R:

echo Unmounting Drive...
mountvol %drive% /p
echo Drive R unmounted!

pause
exit

And here's mounting script (R drive as example) - must to be started as admin:
Code:
@echo off

REM Be sure to change this to the drive letter you want to mount the drive to!
set drive=R

REM Be sure to change this to the Volume Name of the drive you want to mount!
set volume=\\?\Volume{b8af929f-559f-4a08-81d9-0f52e5cb0886}\

:start
echo Mounting Drive...
mountvol %drive%: %volume%
echo Drive R mounted!

pause
exit

Miro
 
Not fully satisfaction - VirtualBox forum helps members minimally and I know not yet how to add physical disk to virtual machine, but mounting and unmounting works.
Miro
 
Status
Not open for further replies.