[Guest OS: Windows 10/Linux(Ubuntu)] How to Expand VM Disk Space in VMware Workstation

User Author

Achilles.H

Junary 17, 2024

[Guest OS: Windows 10/Linux(Ubuntu)] How to Expand VM Disk Space in VMware Workstation

How do I expand the disk space of a virtual machine in VMware Workstation? If you are confused about this question, This article is perfect for you. In how to Expand VM Disk Space in VMware Workstation, I will tell you how to expand the disk space of virtual machine when the guest operating system is Ubuntu(a distribution of Linux) or Windows. It can be divided into two steps, the first step is expand the size of hard disk in VMware and the second step is expand the storage space in guest operating system. Let's get started now.

Caution: Please backup your important data before performing any expand operations to prevent unexpected situations.

1. Prerequisite

Before expanding disk space of virtual machine, you need to verify that you have met these conditions.

  • All snapshots of this virtual machine have been removed.
  • Shut down the virtual machine you want to expand disk space for.
  • Ensure that the virtual disk is not mapped or mounted.

2. Solutions

Solution 1: Add a new Hard Disk in VMware

Proc 1: Add a new Hard Disk

Step 1: Select the virtual machine you want to expand disk space for from Library.

tip: You can use "F9"/"Fn + F9" to let the Library show up or click view -> Customize -> Library.

vmware show library

Step 2: Click "Edit virtual machine settings", then select the "Add" option in the lower left corner of the "Virtual Machine Settings" window displayed.

edit virtual machine settings

Step 3: Select "Hard Disk" and click "Next" button in the "Add Hardware Wizard" window.

vmware add hardware wizard

Step 4: Follow the instructions displayed in the window. (Generally, the default option is fine.)

Step 5: You can specify disk space you expect in the "Specify Disk Capacity" page.

specify disk capacity

note: The maximum disk size for any hard disk is 8TB(8192GB).

Step 6: Click "OK" in the "Virtual Machine Settings" window after adding the hard disk.

add new hard disk result

Step 7: You can see a new Hard Disk is displayed in the "Devices" sector. Up to now, we have completed the "expand disk space of virtual machine in VMware Workstation"operation by adding a new Hard Disk.

If your guest os is Windows 10, refer Guest OS: Windows 10 next, otherwise, refer Guest OS: Ubuntu.

Proc 2: Expand storage space in Guest OS

Guest OS: Windows 10

Use Disk Management tool to expand disk space

Step 1: Open Disk Management. You can open it by right-click Windows logo and click "Disk Management" in the menu.

open disk management

Step 2: The program will prompt you to initialize the disk, Click "OK".

initialize disk

Step 3: The new disk will be displayed in the bottom of the interface, right-click it and select "New Simple Volume".

add new hard disk new simple volume

Step 4: The New Simple Volume Wizard will prompt, then complete the operation as wizard instructs.

new simple volume wizrd

Step 5: You can see a New Volume is displayed now. By far, we've completed all the expansion operations, so enjoy.

new simple volume add a new disk

You can also choose other ways to complete the expansion operation, such as diskpart command or third-party expansion tools. If you need more advanced operations, a third-party expansion tools will be a wise way.

Guest OS: Ubuntu 22.04.3 Desktop LTS

way 1: Use Disks(a built-in disk management tool)

Step 1: Open the "Disks". (You can find it in the utilities in the Application Menu.)

ubuntu disks position demo

Step 2: You will see the new Hard Disk in the left panel. Select it and right-click "gear" icon then select "Format Partition" option.

ubuntu in disks select format partition
format volume

Step 3: Follow the prompts on the page. Enter the password to confirm the operation at the last.

format volume confirm details
authentication required to format

Step 4: Click "Play" icon to mount the partition.

disks edit mount options

Step 5: If you want to mount the disk at boot time automatically, please perform the following operations.

5.1: Open the "terminal" by pressing "Ctrl + Alt + T".

5.2: Use "sudo nano /etc/fstab" to edit the fstab file. You will see the following contents.

sudo nano /etc/fstab
ubuntu cmd fstab file

5.3: Add "/dev/sdb /media/demo/demo-partition ext4 defaults 0 0" to the end of the file.

/dev/sdb /media/demo/demo-partition ext4 defaults 0 0

5.4: Press "Ctrl + X" to exit edit mode, and input "yes" to save the changes made to the file.

5.5: At this point, all operations are completed and the disk is then automatically mounted at boot time. You can continue to use your virtual machine freely.

way 2: Use some commands

Step 1: Open the "terminal" in the Application Menu.

Step 2: Check disk status by "sudo fdisk -l" and find the disk device you need to mount.

sudo fdisk -l

note: Generally, the id of the hard disk is "/dev/sdx".(The x is a letter, such as sda, sdb and so on.)

Like this:

ubuntu cmd fdisk l dev sdx

Step 3: Format partation by running "sudo mkfs.ext4 /dev/sdx". (replace "x" with your actual device id)

sudo mkfs.ext4 /dev/sdx

Step 4: Use "sudo mkdir /mnt/customname" to create a directory for mounting the disk.

sudo mkdir /mnt/customname

Step 5: Use "sudo mount /dev/sdx /mnt/customname" to mount the disk to the file sytem.

sudo mount /dev/sdx /mnt/customname

Step 6: If you want to set up automatic partition mounting during start-up, please see how to set automount above.

Step 7: You can use "df -hT" to display information about disk space usage for all mounted filesystems.

df -hT

Solution 2: Expand the current Hard Disk in VMware

Proc 1: Expand the current Hard Disk

You can also add storage space for virtual machine by expanding the current Virtual Hard Disk space. This is a simpler way. Let's get started now.

Step 1: Select the virtual machine you want to expand. You can refer show Library to perform this.

Step 2: Click "Edit virtual machine settings", then select "Hard Disk" you want to expand in "Hardware" category, then click "Expand" in the right interface.

expand current disk space in vmware

Step 3: Input the value you want to expand to, then click "Expand" option.

Step 4: Click "OK" option twice.

Step 5: So far, the first procedure that expand the size of Hard Disk in VMware has been completed.

If your guest operating system is Windows 10, please refer Windows10 next, and if your guest os is Ubuntu, refer Ubuntu.

Proc 2: Expand storage space in Guest OS

Guest OS: Windows 10

Use Disk Management tool

Step 1: Run "diskmgmt.msc" command to open Disk Management tool.

diskmgmt.msc

Step 2: You will see "Unallocated" space displayed in the interface. You can create a new simple volume or add it to an existing volume. I'll show you how to add it to an existing volume next.

Step 3: Select an existing volume adjacent to it, then right-click it and select "Extend Volume" option.

extend volume windows

Step 4: Follow Extend Volume Wizard's instructions to complete the extend operation.

extend volume capacity

Step 5: The result is like this:

extend volume result demo

Step 6: Now you can continue to use your computer with plenty of disk space.

If you want to merge non-adjacent partition, a third-party tool is more suitable for you. What's more, you can complete this operation using diskpart command.

Guest OS: Ubuntu 22.04.3 Desktop LTS

Use Disks(a built-in disk management tool)

Step 1: Open the "Disks". (You can find it in the utilities in the Application Menu.)

Step 2: Select the Hard Disk you just expanded, then you will see some free space here.

ubuntu expand current disk free space demo

Step 3: Click the existing partition and right-click "gear" icon.

ubuntu expand current disk free space resize

Step 4: Select "Resize" option in the menu, and resize the partition to your desired size.

ubuntu expand current disk free space resize demo

Step 5: Click "Resize" button in the top-right corner, and enter password to confirm operations.

ubuntu expand current disk free space resize select optimal size

Step 6: Congratulations, you have successfully expanded disk space of your virtual machine now.

3. Summary

This article provides some basic ways to expand the disk space of virtual machine in VMware Workstation Pro. It contains the content that how to increase the size of virtual disk in VMware and the method that expand the size of the file system within Windows 10 guest os and Ubuntu 22.04 guest os.

If you're not very familiar with commands, a graphical interface is a good choice. And this article mainly describes the way of graphical interface. Finally, be sure to back up in case something unexpected happens. Hope this article will help you expand your disk space easily.