Difference between revisions of "How to resize a VirtualBox VDI disk"
Jump to navigation
Jump to search
(Created page with "How to resize a VirtualBox VDI disk 1. Backup the current disk. (Optional but highly recommended). <pre> $ cd ~/VirtualBox\ VMs/OL6 $ ls -al |grep OL6.vdi -rw------- 1 ichamm...") |
|||
Line 11: | Line 11: | ||
$ VBoxManage clonehd OL6.vdi OL6_cloned.vdi | $ VBoxManage clonehd OL6.vdi OL6_cloned.vdi | ||
+ | <pre> | ||
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% | 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% | ||
Clone hard disk created in format 'VDI'. UUID: c0ee892e-add5-4c6f-8deb-1a7c04d2a2ae | Clone hard disk created in format 'VDI'. UUID: c0ee892e-add5-4c6f-8deb-1a7c04d2a2ae | ||
− | + | ||
ICHAMMA1-04M:OL6 ichamma1$ VBoxManage modifyhd OL6.vdi --resize 61440 | ICHAMMA1-04M:OL6 ichamma1$ VBoxManage modifyhd OL6.vdi --resize 61440 | ||
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% | 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% | ||
− | + | </pre> | |
After you’ve physically resized your drive, both VirtualBox and your OS should know about the changes. | After you’ve physically resized your drive, both VirtualBox and your OS should know about the changes. | ||
− | + | <pre> | |
[oracle@ol6 ~]$ df -k | [oracle@ol6 ~]$ df -k | ||
Filesystem 1K-blocks Used Available Use% Mounted on | Filesystem 1K-blocks Used Available Use% Mounted on | ||
/dev/mapper/vg_ol6-lv_root | /dev/mapper/vg_ol6-lv_root | ||
25907508 20923632 3667832 86% / | 25907508 20923632 3667832 86% / | ||
− | + | </pre> | |
If your VM OS is Windows, you may have to run the Disk Management too to refresh the disk size. | If your VM OS is Windows, you may have to run the Disk Management too to refresh the disk size. |
Revision as of 15:51, 9 October 2013
How to resize a VirtualBox VDI disk
1. Backup the current disk. (Optional but highly recommended).
$ cd ~/VirtualBox\ VMs/OL6 $ ls -al |grep OL6.vdi -rw------- 1 ichamma1 1089479487 26034171904 May 16 09:18 OL6.vdi
$ VBoxManage clonehd OL6.vdi OL6_cloned.vdi
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Clone hard disk created in format 'VDI'. UUID: c0ee892e-add5-4c6f-8deb-1a7c04d2a2ae ICHAMMA1-04M:OL6 ichamma1$ VBoxManage modifyhd OL6.vdi --resize 61440 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
After you’ve physically resized your drive, both VirtualBox and your OS should know about the changes.
[oracle@ol6 ~]$ df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/vg_ol6-lv_root 25907508 20923632 3667832 86% /
If your VM OS is Windows, you may have to run the Disk Management too to refresh the disk size.
References: