Open Sjord opened 3 years ago
Hi,
I am having the same issue running Arch Linux.
$ qemu-img info disk.qcow2
image: disk.qcow2
file format: qcow2
virtual size: 24 GiB (25769803776 bytes)
disk size: 1.18 GiB
cluster_size: 65536
Format specific information:
compat: 1.1
compression type: zlib
lazy refcounts: false
refcount bits: 16
corrupt: false
extended l2: false
Error originates here.
let actual_length = io.position();
try!(self.read_extensions(io));
...
if self.v3.header_length as u64 != actual_length {
return Err(Error::FileFormat(format!("header is {} bytes, file claims {}",
io.position(),
self.v3.header_length)));
}
It compares header_length
with actual_length
, but prints header_length
and io.position()
. Line 249 assigns io.position()
to actual_length
, but apparently the io.position()
changes after that. My guess is because of read_extensions
.
@Sjord thanks for finding these! Did you find a fix as well? Would swapping the first two lines work?
No, unfortunately I didn't find a fix for this.
Commenting out the check worked 😆 And I was able to mount an underlying ext4 filesystem using ext4fuse (on masOS).
So perhaps it's just the check that's wrong... Maybe it should be this?
if self.v3.header_length as u64 != io.position() {
I have this same problem
having same issue macos 13.4.1
Encountering on MacOS 13.3.1 (a) Do we have any idea at a solution @vasi ?
Just encountered this issue as well; idk what's causing it, but I am guessing its an issue of mismatched types or a failure to convert between types
I created an image using
qemu-img create -f qcow2 hda.qcow2 5G
and installed Debian. When I runqcow2-fuse -d -f hda.qcow2 mount
, it gives the error:I am using MacOS 11.3.1.