VM Backup/restore plan with zfs disks

jslanier

Well-Known Member
Jan 19, 2019
45
0
46
41
Hey folks,

I have a little R410 with Proxmox 5.3 and 4 4TB spinners in a ZFS striped mirror config. There is currently only 1 Server 2016 VM running, and it is basically only acting as a fileserver. I thought that the 4 spinners in a striped mirror configuration would perform much better than they currently are in this Windows Server 2016 VM, so I have decided to upgrade to an r510 with a couple SSDs for VM OS's and I will use those same 4 4TB drives as data storage for the VMs.

I want to be sure that I can do what I am trying to do. My 1 VM has 2 disks (both are from that same striped mirror zpool). If I start from scratch on a new PVE install on the r510 and import the zpools from the 4 4TB disks, what do I do next to basically re-create that original VM with the OS disk on a new SSD zpool and the other disk still on the original zpool that I have imported? I am guessing that I want to copy the original vm.conf so that I can edit it to match the new storage configuration. How would I go about copying that OS vmdisk from the original zpool over to the new SSD zpool?

I may be way off with where to start so please let me know if I need to be going about this a different way.

Thanks,
Stan
 
If you already split your VM into OS and data part, this is very easy to achieve. You can import your 4 disk pool in the new machine, but you cannot have ZFS on the SSDs with the same name. You need either to export the pool and reimport with a new name, but you need a ZFS capable rescue system. In the end, it could be easier for unexperienced users to just backup the VM, copy it off to another system, reinstall everything including the ZFS pool and import the VM again.

How would I go about copying that OS vmdisk from the original zpool over to the new SSD zpool?

After the VM is imported, you can just use the move button in the GUI that will automatically (even online) move the disk to another PVE storage.
 
I actually performed a little test. I transferred both the ZFS datasets to another host via ZFS send tank/dataset@snapshot | ssh host2 zfs receive tank2/dataset2. After transferring the datasets to a new host, I created a similar VM and did not start it. I renamed each imported dataset to align with the naming scheme of the newly created VM (VM-105-disk-2 and VM-105-disk3). I then edited the 105.conf file to reflect these new imported dataset names. The VM started up perfectly on the new host.

So it looks like what I am attempting to do should work without issue.

Thanks,
Stan
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!