Increasing the size of disk is shown on VirtualBox platform.
Increasing the size of disk on other hypervisors, like VMWare ESXi and other, is different, because it have another functional.
Virtualbox platform was installed on Ubuntu 16.04.

Look at our disk in system.

# gpart show


Poweroff server.

Go to directory in Ubuntu, where is image of virtual machine.

Look information of this image with VirtualBox built-in program.

# vboxmanage showhdinfo f5s.vdi


Resize image.

# vboxmanage modifyhd f5s.vdi --resize 10000


Check image again.
# vboxmanage showhdinfo f5s.vdi


Start server and booi in Single User Mode.
Look at our disk.

# gpart show


Size is changed, but we have CORRUPT status.
Correct it.
# gpart recover ada0


Delete swap.

# gpart delete -i 3 ada0


Resize partition.

# gpart resize -i 2 -s 6G ada0


Check it.

# gpart show -p


Growup file system.

# growfs /dev/ada0p2


Check disk with df.

# df -h


Create swap.

# gpart add -t freebsd-swap -s 1G ada0


Reboot server.

# reboot