Skip to contentSkip to conversation

qemu-img: unable to convert raw image > 2GB with git master

Qemu-devel Mark Cave-Ayland 2 participants 2 messages Sep 12, 2014

lore
Share & tools
lore
#0 lore raw

Hi all,

I've been trying to convert a raw disk partition from my laptop for use on VMWare player and I'm seeing the following error from qemu-img git master during conversion:

# qemu-img convert -f raw -O vmdk /dev/mapper/vm-raw out.vmdk
qemu-img: error while writing sector 4247552: Invalid argument

A quick glance at the resulting output file makes me thing that an artificial 2GB limit has accidentally been introduced:

# ls -l | grep out.vmdk
-rw-r--r-- 1 root root 2147483648 Sep 12 09:49 out.vmdk

Can anyone else reproduce this? The input /dev/mapper/vm-raw is simply a raw 4GB LVM partition on my local disk which is mapped through as a standard hard disk into QEMU.

Many thanks,

Mark.

#1 lore raw
Quoted 12 lines · Mark Cave-Ayland

Hi all,

I've been trying to convert a raw disk partition from my laptop for use on VMWare player and I'm seeing the following error from qemu-img git master during conversion:

# qemu-img convert -f raw -O vmdk /dev/mapper/vm-raw out.vmdk
qemu-img: error while writing sector 4247552: Invalid argument

A quick glance at the resulting output file makes me thing that an artificial 2GB limit has accidentally been introduced:

Quoted 7 lines
# ls -l | grep out.vmdk
-rw-r--r-- 1 root root 2147483648 Sep 12 09:49 out.vmdk

Can anyone else reproduce this? The input /dev/mapper/vm-raw is simply a raw 4GB LVM partition on my local disk which is mapped through as a standard hard disk into QEMU.

Yes, I can reproduce it easily:

$ ~/build/master/qemu-io /stor/vm/arch.vmdk -c 'write 2G 1k'
write failed: Invalid argument

This is a regression, I'll send a patch to fix it shortly.

Thanks,
Fam