sobota, 3 maja 2014

How to extend VirtualBox partition - Windows XP example

The Problem

Due to insufficient free space in my one of my Virtual Machines running under Windows XP I would like to extend existing disk image.
I originally created a 10GB virtual disk image, but soon realized that it isn't enough space.

The solution

1. Extend disk image using VBoxManage

Open command line (under windows 8 without Administrator privileges) and run command:

VBoxManage modifyhd Windows XP.vdi --resize 20480

where:
  • Windows XP.vdi is the name of disk image file
  • 20480 new size in MB (in this case 20 GB)

2. Extend the NTFS partition

Although we extended the physical disk image, Windows XP still shows it's partition as 10GB.
We need to extend the NTFS partition into the new size.
To achieve that I downloaded the free GParted Live CD ISO image and attached it to my virtual machine.
Restart VM and set up new size.

2. Reboot Windows

Close VM and remove the ISO image from the Storage menu.
Start VM again and now Windows XP is starting up with check disk.
I got no errors message and Windows correctly recognizes new bigger partition.

Brak komentarzy:

Prześlij komentarz