Adding and removing hard disks in VMware Workstation

VMware Workstation allows us to create and use virtual machines. A virtual machine allows us to test applications and software in a virtual environment.

A virtual machine is a virtual computer. You can use it as a physical computer. It is created on a physical computer. You can create multiple virtual machines on a computer. For example, the following tutorial explains how to create three virtual machines on a single computer and create a practice lab for RHCE exam topics.

RHCE Practice Lab Setup in VMWare and in VirtualBox

One of the best things about virtual machines is that you can customize their hardware at any time. For example, you can add a new hard disk or remove an existing hard disk. Let us understand this process through an example.

Suppose, we want to add a new hard disk to the virtual machine. For this, we will use the following steps.

In the first step, we need to power off the virtual machine. We cannot add or remove a new hardware device on a running machine.

power off virtual  machine

In the second step, click the Edit virtual machine settings option

It opens Virtual machine Settings in a new window. On the opened window, the left pane shows the current hardware devices of the virtual machine. The right pane shows the information and options about the selected device in the left pane. For example, if we select the hard disk in the left pane, it shows options related to the hard disk in the right pane.

device settings

The Add button available in the left pane allows us to add a new device to the virtual machine.

Click the Add button available in the left pane. It opens a new wizard. On the opened wizard, select Hard Disk and click Next.

add button

The next screen allows us to select the hard disk type. There are four types of hard disks. SCSI, IDE, SATA, and NVMe.

  • SCSI uses a SCSI cable. It offers a data transfer speed of 80 Mbps.
  • IDE is also known as PATA. It uses an IDE cable. It provides a maximum data transfer speed of 133 Mbps.
  • SATA uses a SATA cable. It provides a maximum data transfer speed of 6 Gbps.
  • NVMe uses an onboard slot. It provides a maximum data transfer speed of 32 Gbps.

Select the hard disk type you want to use and click Next.

hard disk type

The next screen has three options.

  1. Create a new virtual disk
  2. Use an existing virtual disk
  3. Use a physical disk

The first option creates a new virtual disk. The second option allows us to reuse an existing hard disk. The third option allows us to access the physical disk.

To create a new hard disk select the first option and click Next.

new hard disk

The next screen allows us to specify the hard disk size, space allocation type, and storage method.

Disk size

To specify the hard disk size, you have an input box with up and down arrow keys. The input box allows you to type the hard disk size. The up and down arrow keys allow you to adjust the typed size in a block size.

Allocation method

VMware can allocate disk space in two ways: immediately and gradually as per requirement. If you select the check box, it allocates all the disk space immediately. If you do not select the check box, it allocates a very small portion of the disk size and adds more space when you add data to the disk.

Let us take an example. Suppose you specify the hard disk size to 20 GB. If you select this option, it will allocate all 20 GB right now. But if you do not select this option, it will allocate only 2 to 3 GB space now. It will add more space when you add data to this disk. Suppose, you added 1.5 GB of data to the hard disk. Then, it will expand the hard disk size to 5 GB. Similarly, it will increase the hard disk size again when the specified disk space is close to fill. It will repeat this process until it reaches the maximum specified size, which is 20 GB in this case.

Disk file storage method

There are two ways to store a virtual hard disk.

  1. Store virtual disk as a single file
  2. Split virtual disk into multiple files

If we use the first option, It will store the hard disk as a single file. The file size depends on the size of the hard disk we create. We can use this option if we have no intention to move this hard disk out of the host system.

If we use the second option, It will store the hard disk in multiple small-sized files. This option allows us to easily move the hard disk to another system using a USB drive.

Let us take an example. Suppose, we add a 20 GB hard disk. The first option will create a single 20 GB file to store this disk. The second option will create 10 files of 2 GB. Moving a single 20 GB file is a bit more difficult than moving 10 files of 2 GB. To move a 20 GB file, you need a 20 GB or bigger USB drive. However, to move a 2 GB file, you only need a 2 GB or bigger USB drive.

Select your options and click Next. It brings the last screen of the wizard.

file size

The last screen of the wizard allows us to customize the hard disk file location. To store the hard disk file in a specific location, click the Browse option, select the folder you want to use to save the file, and click Finish.

finish wizard

The new hard disk will be listed on the right pane of the settings window.

listing new hard disk

Removing a hard disk

To remove an existing hard disk, select it from the right pane of the settings window and click Remove.

remove button

The disk will be removed immediately.

hard disk removed

That's all for this tutorial. In this tutorial, we learned how to add or remove a hard disk on a virtual machine in VMware Workstation.

ComputerNetworkingNotes Linux Tutorials Adding and removing hard disks in VMware Workstation