How to unmount harddisk or partition?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MIRKOSOFT
    PCHF Member
    • Aug 2016
    • 203

    #1

    How to unmount harddisk or partition?

    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
    2. selected this PC
    3. selected wished partition
    4. changed in toolbox to Drive tools in manage tab
    5. tried to use Eject - and here is problem - Eject button is disabled (gray) and I canโ€™t to do next step
    6. safe removeโ€ฆ

    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
  • Bruce
    PCHF Member
    • Oct 2017
    • 10697

    #2
    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.

    Comment

    • MIRKOSOFT
      PCHF Member
      • Aug 2016
      • 203

      #3
      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

      Comment

      • Bruce
        PCHF Member
        • Oct 2017
        • 10697

        #4
        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.

        Comment

        • MIRKOSOFT
          PCHF Member
          • Aug 2016
          • 203

          #5
          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

          Comment

          • Bruce
            PCHF Member
            • Oct 2017
            • 10697

            #6
            VMWareโ€™s Workstation Player is free.
            I havenโ€™t used VBox for years and never with an OS older than Win7, so Iโ€™ll take a step back and hopefully some other members will step in.

            Comment

            • MIRKOSOFT
              PCHF Member
              • Aug 2016
              • 203

              #7
              WMware Player allows to create virtual machines?
              Miro

              Comment

              • Bruce
                PCHF Member
                • Oct 2017
                • 10697

                #8
                of course, thatโ€™s its sole purposeโ€ฆ

                Comment

                • phillpower2
                  PCHF Administrator
                  • Sep 2016
                  • 15205

                  #9
                  Any update MIRKOSOFT?

                  Comment

                  • MIRKOSOFT
                    PCHF Member
                    • Aug 2016
                    • 203

                    #10
                    I found on the web script to do it, works - but not successfully in VirtualBox physical to virtual disk assigning.
                    WhenI complete it, Iโ€™ll post it here.

                    Miro

                    Comment

                    • phillpower2
                      PCHF Administrator
                      • Sep 2016
                      • 15205

                      #11
                      (y)

                      Comment

                      • MIRKOSOFT
                        PCHF Member
                        • Aug 2016
                        • 203

                        #12
                        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

                        Comment

                        • system
                          PCHF Owner
                          • Jan 2015
                          • 7636

                          #13
                          So have you answered your own question to your satisfaction?

                          Comment

                          • MIRKOSOFT
                            PCHF Member
                            • Aug 2016
                            • 203

                            #14
                            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

                            Comment

                            • DOUGIE
                              PCHF Member
                              • Jun 2017
                              • 424

                              #15
                              See if this helps.

                              Shouldnโ€™t make a lot of difference what VM Work station you are running.

                              Comment

                              Working...