

Step by step guide on how to extend Vdi and VMDK Hard disks on VirtualBox
source link: https://computingforgeeks.com/step-by-step-guide-on-how-to-extend-vdi-and-vmdk-hard-disks-on-virtualbox/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

This will show you how to extend Any operating system’s Virtual Hard Disk running on VirtualBox ; both vdi and VMDK virtual hard drive formats. When i was working on a vagrant box i downloaded from the internet, it had only 10GB allocated. After filling up the space, i had to extend it so that i could install more packages.
Below are steps i followed to accomplish that. This guide assumes you’re using Linux Guest OS, but i will let you know how to go about it on Windows Guest and Windows Host. My host operating system is Fedora 23 and you can check my article on Top things to do after Fresh Installation of Fedora 23.
If you’re new to Vagrant and want to add a new box from your existing Virtualbox environment, then look at Step by step guide on using existing virtual machines with Vagrant
So lets get started. Follow steps below.
- Installed Guest operating system on Virtualbox that you want to extend its hard disk
- VirtualBox installed
- Virtual Machine to be modified must be powered off
- Gparted live bootable ISO
Download Gparted live iso image
wget http://downloads.sourceforge.net/gparted/gparted-live-0.25.0-1-i686.iso
Change to directory containing Virtual Machine to modify. If you’re using vagrant first run
vagrant halt
Then change to VirtualBox VMs folder. For my case it’s /home/josepy/ VirtualBox VMs/, cd to Virtual machine’s directory
cd /home/josepy/VirtualBox VMs/ cd centos-asterisk/
If using VMDK, you’ll have to clone it first to vdi. If your virtual hard disk is in vdi format, you can directly resize it.The name of my vmdk file was box-disk1.vmdk
VBoxManage clonehd box-disk1.vmdk centos-asterisk.vdi --format vdi VBoxManage modifyhd centos-asterisk.vdi --resize 50000
The commands above cloned box-disk1.vmdk to centos-asterisk.vdi so that we can resize it. VirtualBox doesn’t support resizing of .vmdk disk type.
In case you would like to convert new resized vdi to vmdk, you’ll have to clone it again, e.g.
VBoxManage clonehd centos-asterisk.vdi box-new-disk1.vmdk --format vmdk
Open VirtualBox GUI and click on your VM.Then Settings > Storage >IDE Controller > Add optical drive ( round like icon on the right) > Point to Gparted iso you downloaded and add it.
Again click on IDE Controller > Adds hard disk and point to your newly resized vdi or vmdk. Mine is centos-asterisk.vdi. See below screenshots for clarification.
After that, on same Virtual Machine GUI, go to settings > System > Motherboard > Boot order. Then, uncheck Hard disk, and select Optical and click on OK button at the bottom to save changes.
Step 5
Boot the VM by clicking on start button, and select Gparted Live on gparted boot menu that will appear. Use default settings by hitting Enter key until you reach the gparted partion Menu.
This is the point we’re doing partioning to make extended drive functional.
Click on Already partitioned drive > ( Resize/Move). Now press and hold CTRL key and drag the dark arrow to the end.
Or add Free space following + New size and put the sum on New Size area.Click on resize the apply changes, then exit.
After shutting down the Virtual Machine.Go back to settings and untick on Optical under boot order and select hard disk. Also remove the iso you added under IDE Controller menu option.
FOR WINDOWS GUEST OPERATING SYSTEM
If you resized Hard disk for Windows Guest Operating system, open DISK PARTITION MANAGER and extend your Windows partion.
That’s all. Your hard disk should be extended by now. To check run lsblk command on your Linux Guest OS.
lsblk
Tags
How to resize VirtualBox’s virtual Hard drive on Windows
How to resize VirtualBox’s virtual Hard drive on Linux
Resizing Guest OS virtual Hard drive on Windows
Resizing Guest OS virtual Hard drive on Linux
You a can check another tutorial on how to Add VirtualBox Guest Additions to Guest OS under
Step by step guide on using existing virtual machines with Vagrant
Recommend
-
6
NAKIVO Blog > VMware Administration and Backup >
-
8
TechNext step for EVs: Design batteries to strengthen car, extend rangePublished Fri, Jul 23 202111:41 AM EDTShare...
-
5
How to enable Nutanix De-duplication per VMDK/VHD/RAW 09/28/2014 The Nutanix performance tier de-duplication allows the sharing of VM data on premium storage tiers (RAM and SSD). Performance of g...
-
10
How to extend Vdi and VMDK Hard disks on VirtualBoxThis will show you how to extend Any operating system’s Virtual Hard Disk running on VirtualBox ; both
-
1
img to vmdk for macos 2021-12-13 字数统计: 192字 ...
-
7
Learn Something Old Every Day, Part V: Early IBM PS/2 Hard Disks So I have been (again) trying to properly archive old MS OS/2 SDKs. The version 1.02 SDK from December 1987 (corresponding to OS/2 1.0) turned out to be...
-
7
【虚拟机数据恢复】VMware虚拟机误删除vmdk文件的数据恢复案例 原创 宋国建 2...
-
7
WD Red Plus 3TB, 4TB, 6TB, 10TB, 14TB CMR NAS hard disks for cheap, cheap prices...
-
8
NAKIVO Blog > VMware Administration and Backup > How to Extract Content fro...
-
6
How to Convert VHD to VMDK: A Step-By-Step Guide Updated: June 2, 2023 | Published: June 1, 2023 By: NAKIVO Team
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK