Moving existing VMs to another pool?

Whiskydrinker

Dabbler
Joined
Mar 15, 2022
Messages
17
The subject basically says everything already.

My SCALE version is Bluefin. and I have not added a second pool yet. But I'm thinking about doing this.

So how could I move the existing VMs from one pool to another?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Sure. Just shutdown the VMs, copy the zvols that contain the virtual disk drives via zfs send and receive, then reconfigure the VM to use the new zvol. Once everything looks good, delete the old ones.

if you need more detailed help, feel free to come back when your new pool is ready.
 

Whiskydrinker

Dabbler
Joined
Mar 15, 2022
Messages
17
Finally finished that low priority project of mine. I've successfully moved the storage devices to the new pool using zfs send and receive.

Changed the disk paths in the VMs and everything works fine.
 

Yamon234

Dabbler
Joined
Oct 5, 2021
Messages
13
Just did this today, it took a bit of digging through different threads to figure it out but here's the process. I hope it'll help someone else who's also doing this for the first time:
1. Make a snapshot of your dataset. You can do this via the Gui under Datasets or in Shell with this command:
zfs snapshot poolA/dataset@migrate

Datasets.JPG


Now using this command as a template:
zfs send -vR poolA/dataset@migrate | zfs recv poolB/dataset

I made this hopefully idiot proof graphic that would have helped me as a first timer doing this:
snapshots.JPG


I substituted in my own datasets and information into the picture to help make it easier for someone who is learning. After running that command the data will move and then you need to go into your VM Devices and edit the disk to target your new pool.

I hope this graph helps someone looking for help along the way.
 
Last edited:

pk1977

Cadet
Joined
Sep 4, 2023
Messages
4
Just did this today, it took a bit of digging through different threads to figure it out but here's the process. I hope it'll help someone else who's also doing this for the first time:
1. Make a snapshot of your dataset. You can do this via the Gui under Datasets or in Shell with this command:
zfs snapshot poolA/dataset@migrate

View attachment 69946

Now using this command as a template:
zfs send -vR poolA/dataset@migrate | zfs recv poolB/dataset

I made this hopefully idiot proof graphic that would have helped me as a first timer doing this:
View attachment 69947

I substituted in my own datasets and information into the picture to help make it easier for someone who is learning. After running that command the data will move and then you need to go into your VM Devices and edit the disk to target your new pool.

I hope this graph helps someone looking for help along the way.
I did exactly this but in the VM config it won't let me pick the zvol for the copied VM, in the new pool...
Help!
 

Patrick_3000

Contributor
Joined
Apr 28, 2021
Messages
167
I did exactly this but in the VM config it won't let me pick the zvol for the copied VM, in the new pool...
Help!
I've always been able to select any zvol when adding a disk to a VM. Are you doing it under Devices, add Disk? Does it let you see all zvols? Or are some missing?
 

Clemesis

Cadet
Joined
Dec 8, 2023
Messages
4
If you want to only use the GUI, you can copy the dataset with a replication task.
Then in the VM "Devices" change the path for the "DISK" to the new dataset.
 
Top