[SOLVED] qm migrate help

May 18, 2019
231
15
38
Varies
I need to move VM (on ZFS) to another disk (on LVM thin) on the same machine.

I can't use the GUI for this migration. I will offline the VM, then just
Code:
qm migrate 201 -targetstorage /dev/lvmt_containers0/vm-201-disk-0
followed by a manual delete of the VM disks from the original storage?

I ran move storage for another VM which I can do via the GUI, and this is the cmd that ran under the hood
Code:
/usr/bin/qemu-img convert -p -n -T none -f raw -O raw /dev/zvol/zfs-storage-sdx5/vm-202-disk-0 zeroinit:/dev/lvmt_containers0/vm-202-disk-0
What is zeroinit (I imagine it's something related to LVMthin and filling space) and should I use it when initiating the move via CLI?
 
Last edited:
Hi,
I need to move VM (on ZFS) to another disk (on LVM thin) on the same machine.

I can't use the GUI for this migration. I will offline the VM, then just
Code:
qm migrate 201 -targetstorage /dev/lvmt_containers0/vm-201-disk-0
followed by a manual delete of the VM disks from the original storage?
qm migrate is for migrating the full VM to another node. You want
Code:
qm move-disk <vmid> <drive (e.g. scsi0)> <target storage>

I ran move storage for another VM which I can do via the GUI, and this is the cmd that ran under the hood
Code:
/usr/bin/qemu-img convert -p -n -T none -f raw -O raw /dev/zvol/zfs-storage-sdx5/vm-202-disk-0 zeroinit:/dev/lvmt_containers0/vm-202-disk-0
What is zeroinit (I imagine it's something related to LVMthin and filling space) and should I use it when initiating the move via CLI?
zeroinit is a custom filter for QEMU block drives which AFAIU is to avoid writing zero blocks at the end of the image. It's not something you can manually specify for qm move-disk.
 
  • Like
Reactions: Proxygen