Thanks to machine-drivers/docker-machine-driver-xhyve#123 (comment)
- Go to ~/.docker/machine/machines/machine_name
- sudo hdiutil resize -size new_size root-volume.sparsebundle (i.e. new size can be 30g)
- Edit config.json and provide new size in Driver.DiskSize property
- SSH to the machine
- sudo fdisk /dev/sda then:
- d
- 2
- n
- p
- 2
- enter
- enter
- w
- Restart the machine
- SSH to the machine again
- tce-load -wi e2fsprogs.tcz (to download resize2fs)
- sudo resize2fs /dev/sda2cz (to download resize2fs)
- sudo resize2fs /dev/sda2