We use Proxmox Backup Server and Client v3.3.1 to backup our KVM guests. These use qcow2 for the disks with ext4 as file system.
To ensure that the backed up images are valid, the backed up disks are mounted via
We have now noticed that some of the uploaded disk-images are corrupt:
We investigated further and found that the image is indeed corrupt. Even after various repair attempts, the data could only be partially restored. To get to the bottom of the matter and rule out other causes, we shut down the VM and backed up the disk directly. Verification of the original source image before backup was successful, but the verification of the backed up image failed.
Configuration of the disk:
We were also able to reproduce the behavior on a hypervisor with Debian 12 and Ubuntu 24.04.
In the course of further analysis, we discovered that images from freshly provisioned KVM guests were primarily affected. This means that the following behavior can now be reliably reproduced (we are able to provide a valid qcow2 image that can safely reproduce the error) :
1. Create a new KVM Guest
2. Backup the KVM Guest
3. qemu-check fails
Workaround:
1. Create a new KVM Guest
2. Write data in the KVM guest (e.g. with
3. Backup the KVM Guest
4. qemu-check works
Is this behavior known? What is the cause of it? Thank you in advance!
To ensure that the backed up images are valid, the backed up disks are mounted via
proxmox-backup-client map
after uploading to the Proxmox Backup Server and checked with qemu-img check
.We have now noticed that some of the uploaded disk-images are corrupt:
Code:
qemu-img: Could not open '/dev/loop0': Could not read L1 table: Input/output error
We investigated further and found that the image is indeed corrupt. Even after various repair attempts, the data could only be partially restored. To get to the bottom of the matter and rule out other causes, we shut down the VM and backed up the disk directly. Verification of the original source image before backup was successful, but the verification of the backed up image failed.
Configuration of the disk:
XML:
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none' discard='unmap'/>
<source file='/path/to/disk.qcow2'/>
<target dev='sda' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
We were also able to reproduce the behavior on a hypervisor with Debian 12 and Ubuntu 24.04.
In the course of further analysis, we discovered that images from freshly provisioned KVM guests were primarily affected. This means that the following behavior can now be reliably reproduced (we are able to provide a valid qcow2 image that can safely reproduce the error) :
1. Create a new KVM Guest
2. Backup the KVM Guest
3. qemu-check fails
Workaround:
1. Create a new KVM Guest
2. Write data in the KVM guest (e.g. with
'dd if=/dev/urandom of=/tmp/testfile bs=1M count=2048
')3. Backup the KVM Guest
4. qemu-check works
Is this behavior known? What is the cause of it? Thank you in advance!