Offline migration for KVM virtual machine very slow

rootnetworks

New Member
Feb 13, 2022
24
0
1
31
Hi Guys,


I dot not use any share storage
I'm trying to migrate a virtual machine to another host but it's very slow (Offline mode).


My virtual machine has a 20GB disk(QCOW2) usage is about 3GB in real but take about 15 minutes to complete this migration

I see the NIC run at 11.7 MB/s, on this speed to transfer 3GB file only need 5 minutes (3*1024/11=279s) why PVE take 3 times the time.

Is this by DD pipe? did transfer a lot of empty disk spaces? I'm not sure PVE Is it possible to compress the disk and transfer data for offline mode?



Task Logs:
Virtual Environment 6.4-13
Virtual Machine 104 (test) on node 'DCLAX1A3MC08'
2022-02-13 12:58:38 starting migration of VM 104 to node 'DCLAX1A3MC08' (x.x.x.x)
2022-02-13 12:58:38 found generated disk 'local:104/vm-104-cloudinit.qcow2' (in current VM config)
2022-02-13 12:58:38 found local disk 'local:104/vm-104-disk-0.qcow2' (in current VM config)
2022-02-13 12:58:39 copying local disk images
2022-02-13 12:58:40 Formatting '/var/lib/vz/images/104/vm-104-cloudinit.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=metadata compression_type=zlib size=4194304 lazy_refcounts=off refcount_bits=16
2022-02-13 12:58:40 1104+0 records in
2022-02-13 12:58:40 1104+0 records out
2022-02-13 12:58:40 4521984 bytes (4.5 MB, 4.3 MiB) copied, 0.30285 s, 14.9 MB/s
2022-02-13 12:58:40 33+91 records in
2022-02-13 12:58:40 33+91 records out
2022-02-13 12:58:40 4521984 bytes (4.5 MB, 4.3 MiB) copied, 0.202989 s, 22.3 MB/s
2022-02-13 12:58:40 successfully imported 'local:104/vm-104-cloudinit.qcow2'
2022-02-13 12:58:40 volume 'local:104/vm-104-cloudinit.qcow2' is 'local:104/vm-104-cloudinit.qcow2' on the target
2022-02-13 12:58:41 Formatting '/var/lib/vz/images/104/vm-104-disk-0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=metadata compression_type=zlib size=21474836480 lazy_refcounts=off refcount_bits=16
2022-02-13 13:13:58 2621904+0 records in
2022-02-13 13:13:58 2621904+0 records out
2022-02-13 13:13:58 10739318784 bytes (11 GB, 10 GiB) copied, 916.531 s, 11.7 MB/s
2022-02-13 13:13:58 89+327582 records in
2022-02-13 13:13:58 89+327582 records out
2022-02-13 13:13:58 10739318784 bytes (11 GB, 10 GiB) copied, 913.805 s, 11.8 MB/s
2022-02-13 13:13:58 successfully imported 'local:104/vm-104-disk-0.qcow2'
2022-02-13 13:13:58 volume 'local:104/vm-104-disk-0.qcow2' is 'local:104/vm-104-disk-0.qcow2' on the target
2022-02-13 13:14:00 migration finished successfully (duration 00:15:22)
TASK OK


Virtual machine Disk:
# du -sh /var/lib/vz/images/104/*
676K /var/lib/vz/images/104/vm-104-cloudinit.qcow2
2.8G /var/lib/vz/images/104/vm-104-disk-0.qcow2

Thank you
 
Last edited:
I know another way backup and use scp transfer backup file to the new host then restore the virtual machine on the new host
Test time < 5 minutes. But need to make a script to do it, not as convenient as GUI
 

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!