qcow2 convert error

hafezz3

New Member
Apr 21, 2024
4
0
1
I didn't know in which forum I could've asked, so my apologize for my asking here.

Converting a qcow2 image to qcow2 image won't been done properly. Error while comparing with base disk: "Content mismatch".
Using -c flag (compressing) will fix this issue.
Why is that? actually using the above flag is not what I want.
Where's the problem come from?
 
Converting a qcow2 image to qcow2 image won't been done properly. Error while comparing with base disk: "Content mismatch".
No idea what you're attempting to do & how.
You need to provide details & commands used -for anyone to attempt trying to help you.
 
No idea what you're attempting to do & how.
You need to provide details & commands used -for anyone to attempt trying to help you.
purpose: convert my qcow2 to another qcow2. wanna have a replicate.

How: $ qemu-img convert -f qcow2 -O qcow2 -p base.img replicate.img.
 
Why aren't you just using a regular copy; cp command to do that. You aren't converting the format at all. Be aware that the VM using the image should be stopped while you're coping it.
 
Last edited:
Why aren't you just using a regular copy; cp command to do that. You aren't converting the format at all. Be aware that the VM using the image should be stopped while you're coping it.
I guess using the
Bash:
cp
command is ignoring the main issue.
What I'm saying is that converting from qcow2 to qcow2 is not working properly.

I guess it's better to mention that the conversion happen in SAN storage. The interesting point? converting from SAN to local storage of server will make the qcow2 image without any problem!
Is there any problem with SAN storage? I mean its configs or maybe its hards are not compatible with the SAN.
 
What I'm saying is that converting from qcow2 to qcow2 is not working properly.

I guess it's better to mention that the conversion happen in SAN storage
You are not "converting" anything. You're in the same storage & file type, what conversion do you expect? qcow2 to qcow2 is the same - what conversion? If you just want another copy of the qcow2 image - copy it anywhere you like with whatever name you like - as above with cp.
 
If using "-c" "fixes" the issue when you are doing byte comparison later, doesn't that imply that the source is _compressed_? And, so when you do the "conversion" the output is not "compressed" unless the option is specified?

I don't know why it "works" the other way, perhaps there is a difference in the underlying filesystems and qemu-img is doing some smart optimizations. Or may be your source on non-SAN is not compressed?

In either case, qemu-img is not a PVE-specific command. It is part of qemu-utils package created by QEMU project:


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
  • Like
Reactions: hafezz3
If using "-c" "fixes" the issue when you are doing byte comparison later, doesn't that imply that the source is _compressed_
I know what you mean, but the things is doing this procedure on local is okay. So, the source is not actually compressed.
Thanks anyway. I'll let you know if I could fix it.
 
I know what you mean, but the things is doing this procedure on local is okay. So, the source is not actually compressed.
Easy to check:
Code:
qemu-img info /mnt/pve/bbnas/template/iso/ubuntu-20.04-minimal-cloudimg-amd64.img
image: /mnt/pve/bbnas/template/iso/ubuntu-20.04-minimal-cloudimg-amd64.img
file format: qcow2
virtual size: 2.2 GiB (2361393152 bytes)
disk size: 247 MiB
cluster_size: 65536
Format specific information:
    compat: 0.10
    compression type: zlib <<<<<<<<<<<<<<<<<<
    refcount bits: 16
Child node '/file':
    filename: /mnt/pve/bbnas/template/iso/ubuntu-20.04-minimal-cloudimg-amd64.img
    protocol type: file
    file length: 248 MiB (260046848 bytes)
    disk size: 247 MiB


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: hafezz3

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!