I'm running VirtualBox on Sierra with a Windows 7 Guest VM. How can I increase the space available to the VM? I started with 20GB but I realise now it wasn't nearly enough.

Dani AI

Generated

Quick note that expands on ’s hint: you can grow the virtual disk with VBoxManage on the macOS host and then grow the Windows partition inside the guest. Back up the VM (or clone the disk) first — resizing is reversible only if you have a full copy to fall back to.

To change the virtual disk size from macOS (example: grow to 40 GB = 40960 MB). If VBoxManage isn’t in your PATH use the full app path; modern VirtualBox uses modifymedium, older installs accept modifyhd (both map to the same action):

/Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifymedium disk "/path/to/Windows7.vdi" --resize 40960

# older syntax also seen:
VBoxManage modifyhd "/path/to/Windows7.vdi" --resize 40960

The --resize value is in megabytes. (docs.oracle.com)

If your VM uses a VMDK or a fixed-size image (or you have snapshots), you often need to convert/clone to a VDI, resize, then (optionally) convert back. Typical sequence:

VBoxManage clonemedium disk "source.vmdk" "cloned.vdi" --format VDI
VBoxManage modifymedium disk "cloned.vdi" --resize 40960
# optionally convert back:
VBoxManage clonemedium disk "cloned.vdi" "resized.vmdk" --format VMDK

Also be aware that snapshots create differencing images; merging/deleting snapshots can be required before or after operations and can take time. (docs.oracle.com)

After the host-side resize, start the Windows 7 guest and expand the partition into the new unallocated space (Disk Management → right‑click C: → Extend Volume, or use DiskPart). If the unallocated space is not immediately to the right of C: you’ll need a partition tool (GParted live ISO) to move/resize partitions. (learn.microsoft.com)

Checklist: power off the VM before running VBoxManage, keep a backup or clone, confirm disk format (VDI/VHD dynamic required for direct resize), watch out for snapshots (merge or delete if needed), and remember --resize only expands (it won’t shrink). These steps should let a 20 GB Win7 VM be safely expanded. (docs.oracle.com)

Recommended Answers

All 2 Replies

Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.