Guide for migrating a VM along with its pool to another drive

mdedetrich

Dabbler
Joined
Jul 9, 2021
Messages
16
Issue is pretty simple, I have a VM using bhyve along with a zvol (created by doing the typical VM setup via the TrueNAS web gui) and the disk where the zvol is sitting on is running out of space so I need to migrate the whole VM to a new larger disk.

Does anyone know if there is a guide on how to do this? The current plan is to put the new larger disk in the same machine where the current disk is sitting to simplify the process.

Thanks!
 

chruk

Dabbler
Joined
Sep 4, 2021
Messages
27
You didnt provide all information, but it sounds like you are using ZFS in a single disk mode, no redundancy?

If so the only way I think is possible is something like this.

Add the new disk.
Create the ZFS pool on that disk.
Make a snapshot on the existing pool/zvol.
Transfer the snapshot to new pool.

At that point you have moved the data including the zvol, you would then need to just expand the zvol, which is trivial to do.

After that any disks inside the guest OS would need expanding as well which is outside the scope of this question.
 
Top