vm migration with big hdd

informant

Renowned Member
Jan 31, 2012
780
10
83
hi all, i have a question. i do migrate a vm with 1TB hdd qcow2 to a other host over eth, at moment the new qcow2 file is over 1.7tb and was bigger every minute, but original file is only 1 Tb and in configuration of vm hdd size is 1024 gb. why hdd is on new host very big in migrating time? do this shrink automatical after migration? regards
 
You have to run a `TRIM` inside the guest after the migration. Also your disks need to have `Discard` enabled.
 
Please provide the VM config qm config <VMID> and the storage config cat /etc/pve/storage.cfg.
 
here the confis:
Code:
cat /etc/pve/storage.cfg
dir: local
        path /var/lib/vz
        maxfiles 0
        content rootdir,iso,images,vztmpl

nfs: SLS-001
        path /mnt/pve/SLS-001
        server 10.11.12.50
        export /volume1/storage
        options vers=3
        maxfiles 3
        content iso,backup,vztmpl

Code:
qm config 5532
bootdisk: virtio0
cores: 4
ide2: none,media=cdrom
memory: 10240
name: mail.myhostname.com
net0: e1000=C2:D1:EE:23:87:C2,bridge=vmbr0
onboot: 1
ostype: other
scsihw: virtio-scsi-pci
smbios1: uuid=2fcc5ad8-d70f-43f3-91bc-a7c91b969a1c
sockets: 1
virtio0: local:5532/vm-5532-disk-3.qcow2,format=qcow2,size=150G
virtio1: local:5532/vm-5532-disk-4.vmdk,format=vmdk,backup=no,size=1024G
 
Ah, sorry for the late response.

Could you provide the complete migration task log?
 
Code:
2021-08-31 11:56:14 starting migration of VM 5532 to node 'prometheus' (10.11.12.3)
2021-08-31 11:56:15 found local disk 'local:5532/vm-5532-disk-1.raw' (via storage)
2021-08-31 11:56:15 found local disk 'local:5532/vm-5532-disk-2.qcow2' (via storage)
2021-08-31 11:56:15 found local disk 'local:5532/vm-5532-disk-3.qcow2' (in current VM config)
2021-08-31 11:56:15 found local disk 'local:5532/vm-5532-disk-4.vmdk' (in current VM config)
2021-08-31 11:56:15 copying local disk images
2021-08-31 11:56:17 0+0 records in
...
drive-virtio1: transferred 1024.0 GiB of 1.0 TiB (100.00%) in 7h 42m 15s
drive-virtio1: transferred 1.0 TiB of 1.0 TiB (100.00%) in 7h 42m 16s, ready
all 'mirror' jobs are ready
2021-09-01 02:06:27 starting online/live migration on unix:/run/qemu-server/5532.migrate
2021-09-01 02:06:27 set migration capabilities
2021-09-01 02:06:27 migration downtime limit: 100 ms
2021-09-01 02:06:27 migration cachesize: 1.0 GiB
2021-09-01 02:06:27 set migration parameters
2021-09-01 02:06:27 start migrate command to unix:/run/qemu-server/5532.migrate
2021-09-01 02:06:27 migrate uri => unix:/run/qemu-server/5532.migrate failed: VM 5532 qmp command 'migrate' failed - The vmdk format used by node '#block353' does not support live migration
2021-09-01 02:06:28 ERROR: online migrate failure - VM 5532 qmp command 'migrate' failed - The vmdk format used by node '#block353' does not support live migration
2021-09-01 02:06:28 aborting phase 2 - cleanup resources
2021-09-01 02:06:28 migrate_cancel
drive-virtio1: Cancelling block job

vmdk files aren't supported.
remove the vmdk file from config, or convert it to qcow and edit the configuration file afterwards.

you can convert with something like this:
Code:
qemu-img convert -f vmdk /path/to/your/disk.vmdk -O qcow2 file.qcow2
 
Last edited:
ok vmdk cant also migrate. ok but all qcow files with big size i have problems on backup. if hdd in qcow2 is only 30 gb and qcow2 hdd is 1tb i have on backup over 600 gb backup file.
 
@oguz i have convert on node and change in conf of vm. but on vm-start i get error:

kvm: -drive file=/var/lib/vz/images/5532/vm-5532-disk-4.qcow2,if=none,id=drive-virtio1,format=qcow2,cache=none,aio=native,detect-zeroes=on: Unsupported qcow2 version 1 TASK ERROR: start failed: QEMU exited with code 1

how can i solve it? regards
 
hi i have show it and have make re convert with
qemu-img convert -f qcow /var/lib/vz/images/5532/vm-5532-disk-4.qcow2 -O qcow2 vm-5532-disk-4-n.qcow2and move to org filename. than its works.
regards^^
 
great!

does it migrate now?

if the issue is solved please mark the thread [SOLVED]
 
hi all, a question to this thread, if i make a migration of hdd, they is very big, but if i make a complete backup and retore it, hdd was smaller as before and have only size of my data.
how can i make this size/cleaning with a command before migrating?
regards
 

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!