Migration from ZFS to LVM thin

thex

Active Member
Mar 25, 2021
35
4
28
I have a small cluster setup here.
- host 1 is running on ZFS (zfs-local) as he has two disks
- host 2 is running on one disk using LVM thin (thin-local) for vm-disk storage

I now want to migrate a vm (104) from host 1 (proxmox) to host 2(proxmix) using this command on host 1
Code:
qm migrate 104 proxmix --with-local-disks --targetstorage local-thin

This fails as it seems to not be possible to migrate from zfs to lvm thin
Code:
2021-03-31 13:19:30 starting migration of VM 104 to node 'proxmix' (192.168.42.23)
2021-03-31 13:19:30 found local disk 'local-zfs:vm-104-disk-0' (in current VM config)
2021-03-31 13:19:30 copying local disk images
2021-03-31 13:19:30 ERROR: Failed to sync data - storage migration for 'local-zfs:vm-104-disk-0' to storage 'local-thin' failed - cannot migrate from storage type 'zfspool' to 'lvmthin'
2021-03-31 13:19:30 aborting phase 1 - cleanup resources
2021-03-31 13:19:30 ERROR: found stale volume copy 'local-zfs:vm-104-disk-0' on node 'proxmix'
2021-03-31 13:19:30 ERROR: migration aborted (duration 00:00:00): Failed to sync data - storage migration for 'local-zfs:vm-104-disk-0' to storage 'local-thin' failed - cannot migrate from storage type 'zfspool' to 'lvmthin'
migration aborted

What is the migration strategy in such a case? Is it possible to do this without some storage shared between the hosts?

Thanks
 
Which version of PVE are you running? Online migration with local disks should work if you run a somewhat current version of PVE on these nodes.
 
Should be the latest on both
Code:
root@proxmox:~# pveversion
pve-manager/6.3-6/2184247e (running kernel: 5.4.106-1-pve)

root@proxmix:~# pveversion
pve-manager/6.3-6/2184247e (running kernel: 5.4.106-1-pve)

what do you mean by "online"? The VM currently is not running (I read something when trying it via GUI, there it was complaining that I don't have the same storage available on both machines which is true)
 
Last edited:
The VM currently is not running (I read something when trying it via GUI, there it was complaining that I don't have the same storage available on both machines which is true)
Have you tried it? This works for a while now. If you did run a bit of an older version until recently and just updated to the latest, try to reload the GUI freshly (CTRL+R or CTRL+F5).

One thing though, are there snapshots present for the VM? If so, that is a problem as they cannot be transferred that easily and not form ZFS to LVM(thin)
 
There are no snapshots for this VM but there are snapshots for others.
Code:
root@proxmox:~# zfs list -r -t snapshot -H -o name rpool
rpool/data/vm-101-disk-0@first_setup
rpool/data/vm-102-disk-0@initial_migration
rpool/data/vm-102-disk-1@initial_migration
rpool/data/vm-105-disk-0@intital

I did only install them recently so no big upgrades happened.
I could try again "online" (with running VM) via web gui but I would like to understand why the command above doesn't work.
With this VM it could be fine if I can only migrate it if it is running but I can imagine many scenarios where starting it would not be possible for migration.
 
With this VM it could be fine if I can only migrate it if it is running but I can imagine many scenarios where starting it would not be possible for migration.

Hi,
which is exactly my case, the vm is on a local-zfs, I setup the backups to be made with vzdump daily, but none works to the end: during the backup the guest crashes and it stops, so the backup just started fails because the vm is not running, thus I don't have working backups to move to another server which I setup with local-lvm (no zfs since it's quite ram demanding and I suspect tat the guests crashing while backup in progress could be because of this).
So I'm also trying to understand if there's a way to move guests or at least only the virtual disks from a ZFS based pve server to a LVM based pve server.

Thanks for any help.
 
I was able to migrate a vm from zfs on one node of a cluster to another using the GUI though it looks like the full size of the image was provisioned. To compare I created a newly provisioned machine from scratch, using lvs command I can see the Origin Data % at 100% for the VM I copied and the newly provisioned VM for the same metric is 3.93. is there a conversion or tool to rewrite the bits to disk?
 
Hi,

I have the same problem:
- both nodes are on PVE 7.1
- VM is running on ZFS, the other node has LVM
- I was using GUI migration

So I expected live migration - which BTW was working many times in such setup, so I'm surprised.

Is there anything else I could try?
 
Hi,

I have the same problem:
- both nodes are on PVE 7.1
- VM is running on ZFS, the other node has LVM
- I was using GUI migration

So I expected live migration - which BTW was working many times in such setup, so I'm surprised.

Is there anything else I could try?
I tried migrating a VM from ZFS on source host to LVM on target host today and it failed. For some reason, when I joined the new pve host with the LVM disk to the cluster master with the ZFS array, the clustering software tried to merge the ZFS disk array. I didn't ask for this to happen. It happened automatically and didn't work properly.