[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

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!