Expand a VM?

Status
Not open for further replies.

Tim1962

Patron
Joined
Feb 26, 2015
Messages
281
Although I should probably just wipe and reinstall... Is there a simple way of expanding the size of a (ubuntu) VM in FreeNAS?
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
The answer is yes. How depends on if the disk is a raw file or a zvol. A zvol can be expanded from the UI. A raw file would require a tiny (one line) of CLI work.
 

Tim1962

Patron
Joined
Feb 26, 2015
Messages
281
Its a zvol. I've expanded that in the gui but the VM internally only "sees" 10Gb as originally set... (Rebooted etc)
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@Tim1962 You now need to expand the filesystem within your Ubuntu VM. The steps will depend on whether you installed it using LVM or not. One way to do this is to boot the VM from an Ubuntu LiveCD and use gparted. It can also be done using CLI tools, there are plenty of examples on the web, here are just two refs:

http://fabianlee.org/2016/07/18/ubuntu-extending-a-virtualized-disk-using-fdisk-when-not-using-lvm/
https://fabianlee.org/2016/07/26/ubuntu-extending-a-virtualized-disk-when-using-lvm/

It's a common task when using virtual machines, there's probably vids on youtube too.
 

Tim1962

Patron
Joined
Feb 26, 2015
Messages
281
Thanks, sorted, and bookmarked
 
Status
Not open for further replies.
Top