To stay up to date, remember to subscribe to our YouTube channel!
SUBSCRIBE ON YOUTUBE
The use of virtual machines is currently one of the most versatile and functional mechanisms to test new operating systems, applications and performance, but without affecting the physical machine at any time, much less the user's information, which can reach be a really complex topic..
When a virtual machine is created, we set a size for the virtual hard disk which can be one of the following types:
- VMDK – This is VMware's virtual hard disk format.
- VHD/VHDX: This is the Microsoft Hyper-V virtual hard disk format.
- VDI: is the Oracle VirtualBox virtual hard disk format
- Likewise, virtual hard disks can be fixed or dynamic.
Now, with the passage of time, we may need to modify the size of the hard disk to have the ability to add more information, which is why TechnoWikis will explain some ways to increase the size of the virtual hard disk in VirtualBox and in VMware.
1 How to expand the size of the virtual hard disk in VirtualBox from the app
This is the first method to perform and it will be directly from the VirtualBox application, we open our application:
Once open, we will go to the "File" menu and there we will go to "Tools - Virtual Media Manager":
The following will be displayed:
On the right side we can see the various virtual hard drives with their current and used size, just double click on the drive to be modified to access its properties:
At the bottom it will be possible to adjust the new size of the hard drive with the slider bar:
We apply the changes:
2 How to extend the size of the virtual hard disk in VirtualBox from CMD
The command prompt console is another of the options available to carry out this process of adjusting the size of the hard drive, to achieve this we are going to open the CMD console as administrators from the search engine:
Now with the following command we are going to access the path where VirtualBox is installed by default:
cd "C:\Program Files\Oracle\VirtualBox"
Now, to adjust the size of the hard drive, we are going to execute the following syntax:
VBoxManage modifyhd "C:\vm_path\disk_name.type" --resize ####
There it is possible to see that the percentage of the task was correct. So we will use the Command Prompt console to adjust the size of this disk in VirtualBox.
3 How to extend the size of the virtual hard disk in VMware from the app
In the case of VMware we have equally simple methods, the first will be using the application itself, for this case we open VMware, select the virtual machine to modify and then click on "Edit virtual machine settings":
In the displayed window we will go to the "Hard disk" section:
Once there we click on the "Expand" button and then assign the new size of the hard drive:
We click on "Expand" to proceed with this change:
We click "Ok" and we can see that the hard drive has the new size:
4 How to extend virtual hard disk size in VMware using ISO
This method can also apply to VirtualBox since we will use a program that allows us to manage the partitions and it applies when the virtual machine has unallocated space on the hard disk, for this case we are going to download the GParted utility at the following link:
Some of the tasks that we can perform with this utility are:
- Create or delete partitions
- Resize or move a partition
With Gparted it is possible to work with file systems like btrfs, exfat, ext2 / ext3 / ext4, fat16 / fat32, hfs / hfs+, linux-swap and many more..
To use this method, in this case in VMware, we select the virtual machine and click on "Edit virtual machine settings", then we will go to the CD/DVD section:
We click on "Browse" and select the ISO image of the GParted utility:
We click on "Open" to add it: Then we click on "OK" to confirm this change.
We start the virtual machine and we will see the following. We click on "GParted Live" and wait a moment
, now we are going to enter the desired number to choose the interface language:
By entering it and pressing Enter we expect it to load the interface:
We can see in the gray area the unallocated space of the hard drive, we right click on the partition and in the displayed options we click on "Resize/move":
The following will open:
In the field "Previous free space" we are going to enter the value of the space to use:
We click on "Resize / move" and the following message will open:
We click "OK" to confirm the process and we will see the following:
We click on the verification sign and we must confirm the message to apply the changes:
There we click on "Apply" so that the hard drive can use its maximum capacity:
Now we can exit GParted from the GParted menu and clicking on “Quit”:
There we click on "Exit" to exit the utility and thus be able to increase the capacity of the hard drive.
This is how we can increase the size of the hard drive in VirtualBox and VMware and have full storage for our virtual machines.