There are times you come to a point of running disk space in your vmware just like what I'd experienced. I'll show you how to expand or add disk space into an existing freebsd-based virtual machine for vmware. There are two ways, the first one is to use the vmware-vdiskmanager.exe found in the bin directory of vmware and the other way is to add the SCSI harddisk in the hardware option of the virtual machine settings.
First way, execute the disk manager toolkit of vmware :
vmware-vdiskmanager.exe -x 50GB “FreeBSDclone.vmdk”
Second way, from the virtual machine settings.
Click add hardware and click hard disk then next.
Click add a new virtual disk space then next.
Choose SCSI and leave the others unchecked.
Allocate the disk space you want. Finish.
After doing the above changes it's time to make the changes in the vmware platform itself. In my case it's freeBSD, boot your freebsd virtual machine to configure the newly added disk space.
Step 1 : Login as root and run the sysinstall(Note that you can also do this using the fdisk if you are familiar with the commands).
Step 2 : Go to configure then fdisk and choose the below drive(that is the newly added disk space).
Step 3 : Create slice and allocated the whole space.
Step 4 : Choose the disk label tool then Create label. Then finish.
Step 5 : Mount the newly added space in /etc/fstab.
Step 6 : Move files in the newly added space.
For my case my newly added space is mounted in /usr/ext/local and I'm having space trouble for /usr so I decided to move my /usr/ports to /usr/ext/local.
Then create a symlink to /usr/ports.
Note: You can also use growfs command but it's a different approach
You might also like: