By default, when you create a virtual machine, you also create a virtual hard disk on which you install the desired operating system.
Everything you store in this virtual hard disk is therefore stored in a ".vmdk" file on a hard disk of your physical computer.
However, if you need better input / output (I/O) performance for data storage, you can configure your virtual machine to use a physical hard drive of your computer directly from the guest operating system of this one.
This technique is mainly used in business to virtualize a database server while storing its databases directly on a physical hard drive and not in a virtual hard disk (represented by a ".vmdk" file).
Thus, the desired database server runs in a virtual environment, but its data are stored directly on a physical hard drive. This allows you to obtain better performance for inputs / outputs (I/O).
The 1st thing to do is to locate the number of the desired physical hard disk automatically assigned by Windows.
This is because VMware Workstation Pro only displays these numbers.
In our case, we can see that our physical hard drive is called "Disk 2" in Windows 10 Disk Management.
Warning : never open the "Disk Management" console when a virtual machine is running.
Otherwise, your physical computer will freeze and eventually become unresponsive.
More information on this page : Conflict detected - Disk Management.
To get information about a disk from this console, right click "Properties" on the desired disk.
In our case, we can see that it's our "WDC WD1003FZEX-00MK2A0" physical hard drive.
To begin, select the virtual machine from which you want to use your physical hard drive, then click : Edit virtual machine settings.
Click on the "Add" button (at the bottom of the window).
Select "Hard Disk" and click Next.
Select the desired connection.
In our case, we have selected "SATA" since it's a SATA hard drive.
Select : Use a physical disk (for advanced users).
Since Windows 10, an error may occur regarding insufficient rights.
In this case, close VMware Workstation Pro and relaunch it as an administrator.
This will fix the problem.
Source : Solved: Re: Insufficient permission to access file. (Windo... - VMware Technology Network VMTN.
Failed to load partitions for device \\.\PhysicalDrive0. Insufficient permission to access file.
Select the desired physical disk from the "Device" list.
In our case, we select "PhysicalDrive2" since Windows displays it as "Disk 2".
Only the number is useful.
Select "Use entire disk" to have the hard disk seen as is from the virtual machine.
In this case, all partitions of the desired physical hard drive will be visible from the guest operating system.
Specify a name for the associated ".vmdk" file that will be created.
Important : this file will weigh almost nothing in this case.
Indeed, this file will contain only the necessary information concerning the physical hard drive selected previously and not the data which you will store from the guest operating system.
As you can see, a new hard drive has been added and VMware Workstation Pro tells you :
Click on OK.
The newly added physical hard drive appears.
If you go to your virtual machine's folder, you will find the ".vmdk" file created earlier.
As you can see, this one weighs less than 1KB.
If you open this file with Notepad, you will see that this ".vmdk" file in this case contains information about the physical hard disk that will be used by this virtual machine.
Start the virtual machine.
Open the file explorer and you will be able to see the partition(s) present on your physical hard drive appear in the virtual machine.
Right click "Manage" on "This PC".
If you go to Device Manager -> Disk drives, you will see that the physical hard drive added in your virtual machine's virtual hardware will appear as a "VMware Virtual SATA Hard Drive".
If you go to Disk Management, you will see your physical hard drive appear.
Right click "Properties" on it.
As you can see, Windows recognizes it as a "VMware Virtual SATA Hard Drive".
But, this is your physical hard drive, as you can check in the "Volumes" tab.
Note that when the virtual machine using this physical hard disk is started, this physical hard disk becomes inaccessible from the host operating system of your physical computer.
If you try to access it, Windows will display an error: "D:\ is not accessible - Access is denied".
® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.
Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.
You must be logged in to post a comment