data loss in conversion to or from vpc
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qemu-kvm (Fedora) |
Invalid
|
Medium
|
|||
qemu-kvm (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Given the script script, I would expect that out.raw* files would
be bit for bit identical. And indeed, a little test image I made, they were.
However, when I tried it on a oneiric compressed qcow disk, they were not.
With 'in' of oneiric-
output looks like:
f4a076d62bf13a5
c1f6e09e96361c4
c1f6e09e96361c4
0f4b00a770aa795
-rw-r--r-- 1 2147483648 2011-10-26 14:31 /tmp/convtest.raw
-rw-r--r-- 1 2147483648 2011-10-26 14:31 /tmp/convtest.
-rw-r--r-- 1 2147991552 2011-10-26 14:31 /tmp/convtest.
-rw-r--r-- 1 709017088 2011-10-26 14:30 /tmp/convtest.vpc
Note, that the from-vpc file is ~ 500k larger than the raw files
and obvisously the md5sum differs as a result.
--
#!/bin/sh
in=${1}; out=${2}
qemu-img convert -O vpc /dev/stdin $out.vpc < "$in"
qemu-img convert -O raw /dev/stdin $out.raw < "$in"
qemu-img convert -O raw "$in" "$out.raw.
qemu-img convert -f vpc -O raw $out.vpc $out.raw.from-vpc
md5sum $out.vpc $out.raw $out.raw.from-file $out.raw.from-vpc
ls -l $out.vpc $out.raw $out.raw.from-file $out.raw.from-vpc
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: qemu-kvm 0.14.1+
ProcVersionSign
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
Date: Wed Oct 26 13:53:33 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
KvmCmdLine: Error: command ['ps', '-C', 'kvm', '-F'] failed with exit code 1: UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
MachineType: LENOVO 7417CTO
PccardctlIdent:
Socket 0:
no product info available
PccardctlStatus:
Socket 0:
no card
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: qemu-kvm
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/06/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 7UET91WW (3.21 )
dmi.board.name: 7417CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.name: 7417CTO
dmi.product.
dmi.sys.vendor: LENOVO
Changed in qemu-kvm (Fedora): | |
importance: | Unknown → Medium |
status: | Unknown → Invalid |
Description of problem:
If you create a raw file, convert it to VPC format with qemu-img, and then convert it back to raw format, the resulting raw file is not the same as the original. All the other disk formats roundtrip reliably, but not VPC.
Version-Release number of selected component (if applicable):
How reproducible: 11.0-6. fc11.i586
qemu-0.
Steps to Reproduce:
1. dd if=/dev/zero of=input.img bs=1M count=50
2. qemu-img convert -f raw -O vpc input.img output.img
3. qemu-img convert -f vpc -O raw output.img input2.img
4. md5sum input.img
5. md5sum input2.img
6. ls -l input.img
7. ls -l input2.img
Actual results: 46cc84c503a6d1f 85 input.img bd7264df67ca7f7 98 input2.img
25e317773f308e4
b699e19dd8d468d
-rw-rw-r--. 1 berrange berrange 52428800 2009-10-13 11:44 input.img
-rw-r--r--. 1 berrange berrange 52432896 2009-10-13 11:45 input2.img
Expected results:
input.img and input2.img should be identical in everyway.
Additional info: