cloning fails

falves1

Well-Known Member
Jan 11, 2009
99
3
48
a Windows virtual machine (powered off) fails to clone, this hangs forever

qm clone 104 109
create full clone of drive virtio0 (Disk2T:104/vm-104-disk-1.qcow2)
Formatting '/nfs1/images/109/vm-109-disk-0.qcow2', fmt=qcow2 size=536870912000 cluster_size=65536 preallocation=metadata lazy_refcounts=off refcount_bits=16
transferred: 0 bytes remaining: 536870912000 bytes total: 536870912000 bytes progression: 0.00 %

df -H
Filesystem Size Used Avail Use% Mounted on
/dev/sdc1 2.4T 1.2T 1.3T 47% /nfs1

uname -r
4.15.18-20-pve

the server is fully patched.

What should I do?
 
Hello all!

Just recently installed Proxmox 6.1-7 on a Dell R710 with 6x 2 TB drives in a raid5 fashion and ran into the same problem as the OP.
Creating new vms from scratch works very well - cloning them, less so.

Running qm clone 102 103 on the cli, gives me the below in the gui-status page.

create full clone of drive scsi0 (local-lvm:vm-102-disk-1)
Logical volume "vm-103-disk-1" created.


After what feels like forever, it's still running , so I stopped it. It does say it's 100% though in the gui.

create full clone of drive scsi0 (local-lvm:vm-102-disk-1)
Logical volume "vm-103-disk-0" created.
transferred: 0 bytes remaining: 34359738368 bytes total: 34359738368 bytes progression: 0.00 %
transferred: 343597383 bytes remaining: 34016140985 bytes total: 34359738368 bytes progression: 1.00 %
...
transferred: 34050500722 bytes remaining: 309237646 bytes total: 34359738368 bytes progression: 99.10 %
transferred: 34359738368 bytes remaining: 0 bytes total: 34359738368 bytes progression: 100.00 %
transferred: 34359738368 bytes remaining: 0 bytes total: 34359738368 bytes progression: 100.00 %


The vm isn't that big, it newly created with a 32GB hd, one cpu and 512 MB RAM (the default setting in Proxmox) which is basically empty, so it shouldn't use the entire 32 GB of space, which may take a longer time.

Retried the cloning on the cli, and got this:

root@dragonborn:~# qm clone 102 104
WARNING: Device /dev/dm-11 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/dm-12 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/dm-12 not initialized in udev database even after waiting 10000000 microseconds.
clone failed: command '/sbin/lvs --separator : --noheadings --units b --unbuffered --nosuffix --options lv_size /dev/pve/vm-102-disk-
1' failed: got timeout
root@dragonborn:~#


So what gives??

Any help appreciated.
If more or other info is needed please let me know.
Thanks in advance!
 
As I've posted in a separate thread on the German part of the forum, I'm encountering the same issue.

Independent of using the GUI or CLI, it will just wait indefinitely at 100% as you report. Cloning seems to be such a fundamental feature, I can't imagine this not working for everyone. So something must be different here.

Have any of you learned more about the issue? Have you found a fix? I might install Proxmox on another machine and see if it has the same behavior there.
 
Have any of you learned more about the issue? Have you found a fix? I might install Proxmox on another machine and see if it has the same behavior there.

Haven't tried since I posted half a year ago.
Should problably do it just to check.
There have been I think at least two minor release versions since then.
 
create full clone of drive scsi0 (local-lvm:vm-105-disk-0)
Logical volume "vm-115-disk-0" created.
transferred: 0 bytes remaining: 34359738368 bytes total: 34359738368 bytes progression: 0.00 %
.
.
.
transferred: 34050500722 bytes remaining: 309237646 bytes total: 34359738368 bytes progression: 99.10 %
transferred: 34359738368 bytes remaining: 0 bytes total: 34359738368 bytes progression: 100.00 %
transferred: 34359738368 bytes remaining: 0 bytes total: 34359738368 bytes progression: 100.00 %
TASK OK
 
Any idea of how long you had to wait? 5min, 10min, 20min?

Then I'll give it another try and wait 30min.
 
WARNING: Device /dev/dm-65 not initialized in udev database even after waiting 10000000 microseconds.
Logical volume "vm-104-disk-0" successfully removed
.
.
.
clone failed: command '/sbin/lvs --separator : --noheadings --units b --unbuffered --nosuffix --options lv_size /dev/pve/vm-104-disk-1' failed: got timeout

-----------

After about 20min it aborted. Maybe there are some updates I haven't found a way to apply.
 
Any idea of how long you had to wait? 5min, 10min, 20min?

Then I'll give it another try and wait 30min.

About eleven minutes. That's why I commented on the size of the original vm.
Feels kinda' long for a 36 GB-vm.

My server is a Dell PE R710 with 6x 2TB SAS-drives in a RAID5-fashion.
It's old, but stuff shouldn't take that long I think. Or should they?
 
WARNING: Device /dev/dm-65 not initialized in udev database even after waiting 10000000 microseconds.
Logical volume "vm-104-disk-0" successfully removed
.
.
.
clone failed: command '/sbin/lvs --separator : --noheadings --units b --unbuffered --nosuffix --options lv_size /dev/pve/vm-104-disk-1' failed: got timeout

-----------

After about 20min it aborted. Maybe there are some updates I haven't found a way to apply.

I run the free version BTW, and update regularly.


root@dragonborn:~# pveversion --verbose
proxmox-ve: 6.2-2 (running kernel: 5.4.60-1-pve)
pve-manager: 6.2-11 (running version: 6.2-11/22fb4983)
pve-kernel-5.4: 6.2-6
pve-kernel-helper: 6.2-6
pve-kernel-5.3: 6.1-6
pve-kernel-5.4.60-1-pve: 5.4.60-2
pve-kernel-5.4.55-1-pve: 5.4.55-1
pve-kernel-5.3.18-3-pve: 5.3.18-3
pve-kernel-5.3.10-1-pve: 5.3.10-1
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.4-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: residual config
ifupdown2: 3.0.0-1+pve2
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.16-pve1
libproxmox-acme-perl: 1.0.5
libpve-access-control: 6.1-2
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.2-2
libpve-guest-common-perl: 3.1-3
libpve-http-server-perl: 3.0-6
libpve-storage-perl: 6.2-6
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.3-1
lxcfs: 4.0.3-pve3
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.2-12
pve-cluster: 6.1-8
pve-container: 3.2-1
pve-docs: 6.2-5
pve-edk2-firmware: 2.20200531-1
pve-firewall: 4.1-2
pve-firmware: 3.1-3
pve-ha-manager: 3.1-1
pve-i18n: 2.2-1
pve-qemu-kvm: 5.1.0-2
pve-xtermjs: 4.7.0-2
qemu-server: 6.2-14
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-2
zfsutils-linux: 0.8.4-pve1
root@dragonborn:~#
 
Thank you for the response.

I was meaning to mention that I'm cloning a 16 GB disk. For hardware compatibility reasons I'm currently on 5.3. I'll reboot with the 5.4 and see if that changes the situation.

Update1: It also failed with the 5.4 kernel. I'll install proxmox to different hardware and see how it behaves there.
Update2: I can confirm that with a different hardware it worked. The other machine was also freshly installed. So I'm a bit puzzled as to where the difference lies.
 
Last edited:
I got the same issue, the cloning process just hanged after what seemed to be done.. but it was frozen and locked.
So, this is the work around I did to get it working.

1: Stop the cloning (just click stop on the GUI)
2.- Go into host console and unlock the vm
3.- rm the config file
4.- CP the original config file to the new name
5:- Edit the config to the new 'hard drive' (I understand some might not be able to if using ZFS on local but there are ways around that also)
6.- On new vm hardware tab:
  1. remove the net, and add a new one.
  2. Change BIOS twice (just to be sure and clean)
  3. Change the Processor type (just to be sure and clean)
7.- Boot.. it worked perfectly for me.
 

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!