Move a bhyve VM to a new pool?

the_jest

Explorer
Joined
Apr 16, 2017
Messages
71
I imagine this is a simple task, but I can't find a nice summary of how to do it:

I recently added an SSD-based pool to my system, to use for jails and VMs. Following instructions elsewhere in these forums, I successfully moved my iocage jails into this new pool. How do I move my VMs?

I have, for example, a VM called (let's pretend) MyVM. My main pool is at (say) /mnt/tank, and I have a zvol, MyVM-qtgsj, under this. I want to move this VM to /mnt/dozer. That's it. What's the procedure for this?
 

the_jest

Explorer
Joined
Apr 16, 2017
Messages
71
Did you find a solution for this?

Well, I'm sure there's an actual "solution" that's simple and makes sense. I ended up using zfs send/receive to copy the zvol to the new pool, and created a new VM and pointed it to the copy, and this worked. I'm hoping I didn't do something crazy, or I accidentally copied a partial snapshot and things will vanish when I delete the original, but for now, it seems to have been successful.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
The zfs send | zfs receive part was perfectly correct, but instead of creating a new VM you could have just
1. shutdown the VM
2. go to "devices" in the web UI
3. edit the disk device
4. change the zvol to the new copy on your SSD
5. start the VM
6. after a sufficient grace period and having checked trice delete the old zvol

Kind regards,
Patrick
 
Top