[SOLVED] After PVE9 upgrade Linked Clones are Full Clones

Jul 3, 2025
9
1
3
We are using PVE to provide Virtual Desktops as Linked Clone. After upgrading to PVE9 the Linked Clones are Full Clones. I have created a new VM, convertetd to a template and I see the same behavoir.

Storage is a local XFS integrated as File System.
 
Hi!

I just tried to reproduce this, but it seems to work for me in PVE 9. Could you provide some additional info? Are you unable to even create linked clones on PVE 9, or do they appear as full clones even if you select "Linked Clone"? Also, could you please provide the contents of /etc/storage.cfg and the VM configs (qm config <vmid>) of the template and the linked clone?
 
Thank you for checking. Here my results. I have created a vm with 100MB volume, convertet to template and cloned as linked clone.

/etc/pve/storage.cfg
INI:
dir: local
        path /var/lib/vz
        content vztmpl,images,iso,rootdir,snippets,backup
        prune-backups keep-all=1

Clone log:
Code:
create linked clone of drive scsi0 (local:108/base-108-disk-0.qcow2)
clone 108/base-108-disk-0.qcow2: images, vm-109-disk-0.qcow2, 109 to vm-109-disk-0.qcow2 (base=../108/base-108-disk-0.qcow2)
Formatting '/var/lib/vz/images/109/vm-109-disk-0.qcow2', fmt=qcow2 cluster_size=131072 extended_l2=on preallocation=metadata compression_type=zlib size=107374592 backing_file=../108/base-108-disk-0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
TASK OK


Code:
# qm config 108
boot: order=scsi0;ide2;net0
cores: 1
cpu: x86-64-v2-AES
ide2: none,media=cdrom
memory: 2048
meta: creation-qemu=10.0.2,ctime=1756888022
name: test
net0: virtio=BC:24:11:64:03:34,bridge=vmbr_SRV,firewall=1
numa: 0
ostype: l26
scsi0: local:108/base-108-disk-0.qcow2,discard=on,iothread=1,size=104858K
scsihw: virtio-scsi-single
smbios1: uuid=c666cb1d-21a7-4d63-aca6-ced62add36cb
sockets: 1
template: 1
vmgenid: 340a3f05-4e03-468f-b516-b155b475cd78

# qm config 109
boot: order=scsi0;ide2;net0
cores: 1
cpu: x86-64-v2-AES
ide2: none,media=cdrom
memory: 2048
meta: creation-qemu=10.0.2,ctime=1756888022
name: testclone
net0: virtio=BC:24:11:36:6F:EA,bridge=vmbr_SRV,firewall=1
numa: 0
ostype: l26
scsi0: local:108/base-108-disk-0.qcow2/109/vm-109-disk-0.qcow2,discard=on,iothread=1,size=104858K
scsihw: virtio-scsi-single
smbios1: uuid=d3a64014-d97f-40af-9e07-caacfba9d5ce
sockets: 1
vmgenid: 4c646465-6f25-44a0-a3a7-79f06542af73


Code:
 # ls -lah /var/lib/vz/images/*/*
-r--r--r-- 1 root root 103M Sep  3 10:27 /var/lib/vz/images/108/base-108-disk-0.qcow2
-rw-r--r-- 1 root root 104M Sep  3 10:27 /var/lib/vz/images/109/vm-109-disk-0.qcow2

# qemu-img info /var/lib/vz/images/108/base-108-disk-0.qcow2
image: /var/lib/vz/images/108/base-108-disk-0.qcow2
file format: qcow2
virtual size: 102 MiB (107374592 bytes)
disk size: 1.75 MiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/vz/images/108/base-108-disk-0.qcow2
    protocol type: file
    file length: 103 MiB (107741184 bytes)
    disk size: 1.75 MiB
    Format specific information:
        extent size hint: 1048576

# qemu-img info /var/lib/vz/images/109/vm-109-disk-0.qcow2
image: /var/lib/vz/images/109/vm-109-disk-0.qcow2
file format: qcow2
virtual size: 102 MiB (107374592 bytes)
disk size: 1.03 MiB
cluster_size: 131072
backing file: ../108/base-108-disk-0.qcow2 (actual path: /var/lib/vz/images/109/../108/base-108-disk-0.qcow2)
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: true
Child node '/file':
    filename: /var/lib/vz/images/109/vm-109-disk-0.qcow2
    protocol type: file
    file length: 103 MiB (108032000 bytes)
    disk size: 1.03 MiB
    Format specific information:
        extent size hint: 1048576
 
that looks like a linked clone to me?
 
That's correct. I have overseen this, but the file has the same size like the original file. "disk size" looks preallocated

qemu-img info for an PVE8 cloned disk:
Code:
image: vm-29413-disk-1.qcow2
file format: qcow2
virtual size: 130 GiB (139586437120 bytes)
disk size: 4.64 GiB
cluster_size: 65536
backing file: ../22268/base-22268-disk-1.qcow2
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: vm-29413-disk-1.qcow2
    protocol type: file
    file length: 4.83 GiB (5187567616 bytes)
    disk size: 4.64 GiB
    Format specific information:
        extent size hint: 1048576

qemu-img info for an PVE9 cloned disk:
Code:
image: ./images/109/vm-109-disk-0.qcow2
file format: qcow2
virtual size: 100 GiB (107374182400 bytes)
disk size: 100 GiB
cluster_size: 131072
backing file: ../108/base-108-disk-0.qcow2 (actual path: ./images/109/../108/base-108-disk-0.qcow2)
backing file format: qcow2
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: true
Child node '/file':
    filename: ./images/109/vm-109-disk-0.qcow2
    protocol type: file
    file length: 100 GiB (107389386752 bytes)
    disk size: 100 GiB
    Format specific information:
        extent size hint: 1048576
 
virtual size: 102 MiB (107374592 bytes) disk size: 1.03 MiB
see your first qemu-img info output.. are these all from the same system? if not, maybe on one of them you set preallocation to full?
 
First one was a try on the "local" storage and second one same system, new VMs with same IDs and different storage.

This is the storage config for this path:
Code:
dir: local
        path /var/lib/vz
        content vztmpl,images,iso,rootdir,snippets,backup
        prune-backups keep-all=1
...
dir: d2
        path /storage/d2
        content vztmpl,images,iso,import,rootdir,backup,snippets
        nodes mynode
        preallocation falloc
        prune-backups keep-all=1
        shared 0


Code:
# qm config 108
boot: order=scsi0;ide2;net0
cores: 1
cpu: x86-64-v2-AES
ide2: none,media=cdrom
memory: 2048
meta: creation-qemu=10.0.2,ctime=1756891312
name: test
net0: virtio=BC:24:11:A3:59:3D,bridge=vmbr_SRV,firewall=1
numa: 0
ostype: l26
scsi0: d2:108/base-108-disk-0.qcow2,iothread=1,size=100G
scsihw: virtio-scsi-single
smbios1: uuid=a1d41afa-1a1f-49f1-9de8-cedb8bba6a7b
sockets: 1
template: 1
vmgenid: dbcf1f58-ec9e-4569-a2f7-0fa09467e6ec

# qm config 109
boot: order=scsi0;ide2;net0
cores: 1
cpu: x86-64-v2-AES
ide2: none,media=cdrom
memory: 2048
meta: creation-qemu=10.0.2,ctime=1756891312
name: testclone
net0: virtio=BC:24:11:EA:48:8B,bridge=vmbr_SRV,firewall=1
numa: 0
ostype: l26
scsi0: d2:108/base-108-disk-0.qcow2/109/vm-109-disk-0.qcow2,iothread=1,size=100G
scsihw: virtio-scsi-single
smbios1: uuid=2f5db99d-c4ac-4922-b82d-de67edc66ccb
sockets: 1
vmgenid: 44ccc80c-213f-46ea-937c-562f24c1137d
 
I have created a new VM with 2 Disks:
Code:
# qm config 110
boot: order=virtio0;ide2;net0
cores: 1
cpu: x86-64-v2-AES
ide2: none,media=cdrom
memory: 2048
meta: creation-qemu=10.0.2,ctime=1756895513
name: testA
net0: virtio=BC:24:11:F1:B0:86,bridge=vmbr_SRV,firewall=1
numa: 0
ostype: l26
scsihw: virtio-scsi-single
smbios1: uuid=6a0b18aa-f25e-4ad3-8862-846daeb45d0d
sockets: 1
virtio0: d2:110/vm-110-disk-0.qcow2,iothread=1,size=100G
virtio1: local:110/vm-110-disk-0.qcow2,iothread=1,size=100G
vmgenid: 8c5b3ab5-df63-4b4b-83c7-1e06580b2b43

Result:
Code:
# qemu-img info /var/lib/vz/images/110/vm-110-disk-0.qcow2
image: /var/lib/vz/images/110/vm-110-disk-0.qcow2
file format: qcow2
virtual size: 100 GiB (107374182400 bytes)
disk size: 204 MiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/vz/images/110/vm-110-disk-0.qcow2
    protocol type: file
    file length: 100 GiB (107390828544 bytes)
    disk size: 204 MiB
    Format specific information:
        extent size hint: 1048576

# qemu-img info d2/images/110/vm-110-disk-0.qcow2
image: d2/images/110/vm-110-disk-0.qcow2
file format: qcow2
virtual size: 100 GiB (107374182400 bytes)
disk size: 100 GiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: d2/images/110/vm-110-disk-0.qcow2
    protocol type: file
    file length: 100 GiB (107390828544 bytes)
    disk size: 100 GiB
    Format specific information:
        extent size hint: 1048576


I have checked more. It looks like there is an difference when I choose a differnt mount point. Local disks are XFS mounted with "nodev,nosuid,noexec". Setting attribute to shared dosn't help.
 
Happy you got it sorted, maybe mark this thread as Solved. At the top of the thread, choose the Edit thread button, then from the (no prefix) dropdown choose Solved.
 
  • Like
Reactions: SL-FH