On 2014-10-15 07:56, freebsd-li...@potato.growveg.org wrote:
> Hello list,
> 
> Can a bhyve instance be resized? I'm talking about the disk. 
> Say your end user needs more diskspace. They have 32GB. They need 64GB.
> How do you do it? I presume one has to stop the guest, then use truncate.
> What about if the guest OS isn't freebsd, and they use say ext2 or 3? Will
> ext3 start yelling at me because I've resized it?
> 
> What if they just want another disk? How does one refer to a 
> newly created virtual disk from a guest? How is it mounted to the guest?
> 
> thanks
> 

It works much the same as doing it in any VM

1. Shutdown VM
2. Resize the backing disk (expand the file, zvol, whatever)
3. Boot the VM
4. Recover the partition table (GPT's backup copy of the partition table
is in the last sector of the drive, which is now in a different place)
5. Resize the partition (gpart resize for FreeBSD, if you do not specify
a size it will expand to all available space)
6. Resize the file system (growfs for UFS on FreeBSD, lvm or whatever
for linux)

You might have to reboot an extra time between step 5 and 6.

The instructions for everything you do inside the VM (steps 4 - 6) are
set out in more detail with example output in the handbook:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-growing.html


-- 
Allan Jude

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to