Clone fails on TPM disk

blueavenger84

New Member
Dec 3, 2021
2
1
3
68
My clone fails when cloning a WIN11 guest that is using TPM. Get the following error:

create full clone of drive efidisk0 (vzperformance:210/vm-210-disk-0.qcow2)
Formatting '/var/lib/vzstaging/images/212/vm-212-disk-0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=metadata compression_type=zlib size=540672 lazy_refcounts=off refcount_bits=16
create full clone of drive tpmstate0 (vzperformance:210/vm-210-disk-1.qcow2)
Formatting '/var/lib/vzstaging/images/212/vm-212-disk-1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=metadata compression_type=zlib size=4194304 lazy_refcounts=off refcount_bits=16
transferred 0.0 B of 4.0 MiB (0.00%)
qemu-img: Could not open '/var/lib/vzperformance/images/210/vm-210-disk-1.qcow2': Image is not in qcow2 format
TASK ERROR: clone failed: copy failed: command '/usr/bin/qemu-img convert -p -n -f qcow2 -O qcow2 /var/lib/vzperformance/images/210/vm-210-disk-1.qcow2 zeroinit:/var/lib/vzstaging/images/212/vm-212-disk-1.qcow2' failed: exit code 1

pveversion -v
proxmox-ve: 7.1-1 (running kernel: 5.13.19-1-pve)
pve-manager: 7.1-7 (running version: 7.1-7/df5740ad)
pve-kernel-5.13: 7.1-4
pve-kernel-helper: 7.1-4
pve-kernel-5.11: 7.0-10
pve-kernel-5.4: 6.4-6
pve-kernel-5.13.19-1-pve: 5.13.19-3
pve-kernel-5.11.22-7-pve: 5.11.22-12
pve-kernel-5.11.22-5-pve: 5.11.22-10
pve-kernel-5.4.140-1-pve: 5.4.140-1
pve-kernel-5.4.73-1-pve: 5.4.73-1
ceph-fuse: 14.2.21-1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown: residual config
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.22-pve2
libproxmox-acme-perl: 1.4.0
libproxmox-backup-qemu0: 1.2.0-1
libpve-access-control: 7.1-5
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.0-14
libpve-guest-common-perl: 4.0-3
libpve-http-server-perl: 4.0-4
libpve-storage-perl: 7.0-15
libqb0: 1.0.5-1
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.9-4
lxcfs: 4.0.8-pve2
novnc-pve: 1.2.0-3
proxmox-backup-client: 2.1.2-1
proxmox-backup-file-restore: 2.1.2-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.4-4
pve-cluster: 7.1-2
pve-container: 4.1-2
pve-docs: 7.1-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.3-3
pve-ha-manager: 3.3-1
pve-i18n: 2.6-2
pve-qemu-kvm: 6.1.0-3
pve-xtermjs: 4.12.0-1
qemu-server: 7.1-4
smartmontools: 7.2-pve2
spiceterm: 3.2-2
swtpm: 0.7.0~rc1+2
vncterm: 1.7-1
zfsutils-linux: 2.1.1-pve3

Configuration file:
agent: 1
balloon: 4096
bios: ovmf
boot: order=ide2;virtio0
cores: 3
cpu: host,hidden=1
efidisk0: vzperformance:210/vm-210-disk-0.qcow2,efitype=4m,pre-enrolled-keys=1,size=528K
hostpci0: 0000:01:00,pcie=1
ide0: vzstaging:iso/virtio-win-0.1.208.iso,media=cdrom,size=543390K
ide2: none,media=cdrom
machine: pc-q35-6.1
memory: 10240
name: ms-win11-base
net0: virtio=D2:C4:B5:55:AC:EF,bridge=vmbr0
numa: 0
ostype: win10
scsihw: virtio-scsi-pci
smbios1: uuid=32d98042-37bb-4e14-bcfd-761d8d6ed96f
sockets: 1
tpmstate0: vzperformance:210/vm-210-disk-1.qcow2,size=4M,version=v2.0
vga: memory=512
virtio0: vzperformance:210/vm-210-disk-2.qcow2,size=100G
vmgenid: 8ad94bf0-51b2-4f9d-98d8-99ef3c81fdc1
 
  • Like
Reactions: Luca Campestrini
hi,

it works fine here when i try to clone win11 VM with a tpm disk.

what do you get when you run file /var/lib/vzperformance/images/210/vm-210-disk-1.qcow2
 
Hi,
I have the same error when I try to clone a Windows 11 VM.

qemu-img: Could not open '/mnt/HDD/images/303/vm-303-disk-2.qcow2': Image is not in qcow2 format TASK ERROR: clone failed: copy failed: command '/usr/bin/qemu-img convert -p -n -f qcow2 -O qcow2 /mnt/HDD/images/303/vm-303-disk-2.qcow2 zeroinit:/mnt/HDD/images/305/vm-305-disk-2.qcow2' failed: exit code 1

If I use file /mnt/HDD/images/303/vm-303-disk-2.qcow2 and have

/mnt/HDD/images/303/vm-303-disk-2.qcow2: data
 
Last edited:
If I use file /mnt/HDD/images/303/vm-303-disk-2.qcow2 and have

/mnt/HDD/images/303/vm-303-disk-2.qcow2: data
that doesn't look right. normally you should get something like:
Code:
QEMU QCOW2 Image (v3), 2147991552 bytes

instead of data. data is what you get when the file format is not recognized, so there might be something wrong with your qcow2 disk (or maybe it's a raw disk named wrongly as qcow2)
 

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!