Table of Contents

Increase Disk Size in VMware

With VMware, it's possible to increase the disk size, but unfortunately the VMware increase utility does not know about how to increase the actual BSD partition. This tutorial explains how to expand the file system to take care of the increased space. The screenshots in the tutorial are from VMware Fusion so it may look different if you're running a different version, but the functionality is there in all versions of VMware.

Back up your data before you begin

Prepare VMware

First, remove any snapshots as VMware won't allow us to expand a disk with snapshots. The select the disk and increase to the new size you want.

VMware will then take it's time to increase the size

Next step is to select the Virtual Appliance ISO as a cd, we will need to boot off this ISO as we can't expand the filesystem from within itself.

When the Appliance boots and displays the following screen, hit ESC to interrupt the boot.

Choose to boot from the cdrom drive

Increasing the partition

When the system has finished booting off the ISO, select s to get to the shell.

Your system disk is either wd0 or sd0 depending if you've chosen to emulate IDE or SCSI drives. For the downloadable VMware Appliances, your system disk is going to be sd0 but the screenshots is from a system that uses IDE and the system disk is therefore wd0, select the one that is applicable to you.

We need to use the growfs utility, but that's not available on the ISO so we need to copy that off the file system

mount /dev/sd0a /mnt
cp /mnt/sbin/growfs /tmp
umount /mnt

The next step is to increase the partition size. Please note that you can only increase the last partition on the system. bignum and biggernum is going to vary depending on the size of the disk when you begin, and what you increased it to. Please see the screenshot below.

disklabel -E sd0
> b
Starting sector: [63]
Size ('*' for entire disk): [bignum] *
> c a
Partition a is currently bignum sectors in size, and can have a maximum
size of biggernum sectors.
size [bignum] biggernum
> w
> q
No label changes.
#

The final step is to format the unformatted sectors in the increased partition with the growfs utility.

/tmp/growfs /dev/sd0a

When this as completed, please reboot the system and enjoy your increased disk space

reboot