How To Mac

How to Add Physical Hard Disk to VirtualBox and VMware on Windows

Written by John

Virtual Machine allows you to run different operating systems such as macOS, Windows and Ubuntu on your computer. The Operating Systems will be installed onto a Virtual Disk Image. With Virtual Machine, you can access your macOS or Ubuntu on physical hard disk within the virtual machine. First you need to connect the physical hard disk with a virtual machine environment!

If you're looking to add a physical hard disk into your virtual machine software, then this tutorial is perfect for beginners! In order the connect Physical Hard Disks with both VirtualBox and VMware Player. The process is more difficult because of the command line interface required for configuration on CMD with VirtualBox - but not necessarily so much when utilizing VMware Player which already supports these functions out-of box!

Virtualbox and VMware player are two free virtualization software, although they do have some features that may be necessary for your needs. The process of accessing physical disks on either platform can vary depending upon which one you decide to use in this tutorial we will learn both ways so there's no guesswork involved!

How to Add Physical Hard Disk to Virtual Machine

1. Use VirtualBox to access Real Hard Disk

VirtualBox has a built-in tool that's called VBoxManage, it enables you to edit or convert hard drives inside of your virtual machine. You can also use this program for managing any Partition on an Entire Hard Disk - just like how we would do with physical storage!

The hard drive needs to be accessed with administrative privileges in order for you run all parts of this tutorial. You will need the "Run as Admin" option so that we can make sure Virtual Machine can access real Hard Disk.

We can use the Commands Prompt (CMD) in Windows with Admin Permission to create a virtual disk associated with Real Hard Disk. We will type these commands below into our computer screen one by one, pressing Enter after each command is complete.

Open Command Prompt

To Add Entire Physical Hard Disk
Acess Physical Hard Disk with VirtualBox Commands

cd "C:\Program Files\Oracle\VirtualBox\"

VBoxManage internalcommands createrawvmdk -filename %USERPROFILE%\Desktop\mydrive.vmdk -rawdisk \\.\PhysicalDrive1

  • Mydrive.vmdk is virtual disk associated with Real Hard Disk.
  • PhysicalDrive1 with number 1 is Hard Disk number, You can find this number in Disk Manager Tool. To open the tool, type "Create and format hard disk" into Windows Search and click on it when you're done searching!
Find PhysicalDrive Number

To Add Individual Physical Disk Partitions
Access Physical Disk Partitions with VirtualBox Commands

cd "C:\Program Files\Oracle\VirtualBox\"

VBoxManage internalcommands listpartitions -rawdisk \\.\PhysicalDrive0

VBoxManage internalcommands createrawvmdk -filename %USERPROFILE%\Desktop\mydrive.vmdk -rawdisk \\.\PhysicalDrive0 -partitions 0,7

  • Listpartitions: This is the command to help you find the Partition number.
  • PhysicalDrive0: With 0 being the number of Hard Disks.
  • Partitions 0.7: Partition 7 in Disk 0.
How to Use VirtualBox to access Physical Disk

To get access to these partitions, we first need run VirtualBox with Admin permissions by right clicking on its icon and selecting Run asAdmin. When you run VBoxManage, it will create two files: one called "mydrive.vmdk" and another named "mydrive-pt.vmdk". We will use the "mydrive.vmdk" to connect to VirtualBox.

Open VirtualBox with Administrator Permission

Click on Virtual Machine settings, go to Storage tab and add "mydrive.vmdk" to access Physical Hard Disk.
Add Physical Disk to VirtualBox

2. Use VMware Workstation Player to Access Real Hard Disk

With the VMware software, you can add an Entire Physical Hard Disk or Individual Physical Disk Partitions. To do so effectively though it's best if we first run VMware Workstation Player under admin privileges by right clicking on its icon and select "Run as Admin".

Add new Hard Disk in VMware

In order to select Virtual Machine Settings, you must click on the Add button and follow these steps: Hard Disk > SATA > Use a physical disk

Select Entire Disk or individual partitions

Next, you can select the entire Hard Disk or individual Partition and then click Next button. Choose your location for save in virtual disk and click Next button.

Physical Disk in VMware Player

At this point you should see successfully added Physical Hard Disk or Physical Partition on VMware and VirtualBox. Here, Virtual machine can be used for editing or reinstalling the operating system on Physical Hard Disk without difficulty- if there are any problems during installation process please comment so we may help quickly!

Leave a Comment