- Create a new VM in the VirtualBox GUI with type "Linux" and version "Arch Linux (64-bit)". As part of this process create an 8 GB VDI disk with dynamic allocation and attach the latest Arch Linux ISO.
- Boot into the Arch Linux ISO and set up the OS in the usual way.
- Boot into the OS.
- Fill up the disk.
- Shut down the VM
- Open the virtual media manager and change the size of the disk to a larger size (30 GB in my case).
- Boot into the Arch Linux ISO.
cfdisk /dev/sdaand change the partition size.
- Write the partition table.
At this point
fdisk -l and
cfdisk /dev/sda report /dev/sda1 as being 30 GB, while
df -h reports it as 8 GB. I'm not able to write more to the disk.
Workarounds I've tried:
- Copying the disk image to another dynamically allocated VDI and attaching that instead.
- Copying the disk image to another dynamically allocated VHD and attaching that instead.
- Copying the disk image to another statically allocated VDI and attaching that instead.
This problem looks similar, except I've done all of this in only in VirtualBox without updating or rebooting the host OS.