qemu-img can't convert vmdk file: Operation not permitted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned | ||
qemu-kvm (Fedora) |
Won't Fix
|
Medium
|
|||
qemu-kvm (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
There is no reason why the vdmk image can't be converted. Even running it as root does not help.
$ ls -lh
insgesamt 60G
-rw-rw-rw- 1 root root 479M 2011-09-10 17:47 freetz-
$ sudo qemu-img convert freetz-
qemu-img: Could not open 'freetz-
qemu-img: Could not open 'freetz-
I get a similar Error when I try to rum vmdk images directly. After adding a new machine and adding vmdk disks with virt-manager, it tells me when I start the virtual machine:
Error starting domain: internal error process exited while connecting to monitor: char device redirected to /dev/pts/1
kvm: -drive file=/var/
Runnung raw images works perfectly for me.
Hint: i have a symlink set:
/var/lib/libvirt$ ls -lh
insgesamt 12K
drwxr-xr-x 2 root root 4,0K 2011-07-26 14:30 boot
lrwxrwxrwx 1 root root 9 2011-08-19 10:47 images -> /home/vms
drwxr-xr-x 2 root root 4,0K 2011-08-19 09:38 network
drwxr-xr-x 5 libvirt-qemu kvm 4,0K 2011-12-16 04:34 qemu
but this should not be the reason hopefully
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: qemu-kvm 0.14.0+
ProcVersionSign
Uname: Linux 2.6.38-13-generic x86_64
Architecture: amd64
CheckboxSubmission: 8f12e98536291f5
CheckboxSystem: d00f84de8a55581
Date: Fri Dec 16 04:24:10 2011
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
KvmCmdLine: Error: command ['ps', '-C', 'kvm', '-F'] failed with exit code 1: UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
MachineType: Dell Inc. Latitude E5510
ProcEnviron:
LANGUAGE=de_DE:en
PATH=(custom, user)
LANG=de_DE.UTF-8
SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: qemu-kvm
UpgradeStatus: Upgraded to natty on 2011-08-18 (119 days ago)
dmi.bios.date: 09/08/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A11
dmi.board.name: 023HKR
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.
dmi.product.name: Latitude E5510
dmi.product.
dmi.sys.vendor: Dell Inc.
Changed in qemu-kvm (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in qemu-kvm (Fedora): | |
importance: | Unknown → Medium |
status: | Unknown → Won't Fix |
Description of problem:
qemu-img convert cannot convert a VMDK4 format file to (eg) raw (or
anything else). It silently produces a large file that mostly
contains zero bytes, and is completely unusable.
Version-Release number of selected component (if applicable):
Tested with qemu-img 0.10.5, 0.11.0, and
git d9a50a366f2178 (2009-12-11).
How reproducible:
Always.
Steps to Reproduce: disk1.vmdk TestLinux-disk1.raw
1. Export to OVF from VMWare vSphere / ESX 4.0.0.
2. Copy the resultant disk image to a Fedora machine.
3. Check the SHA1 sums (from *.mf file) to make sure image was not
corrupted during the copy.
4. Run:
qemu-img convert -O raw TestLinux-
5. Try to mount / use the resulting raw file, eg. using guestfish.
Actual results:
The raw file contains mostly zeroes, see below. It contains zeroes
where there should be partition tables, superblocks etc. and so is
totally unusable.
Expected results:
A usable disk image.
Additional info:
Compare the entropy of the VMDK file with the resulting raw disk.
I would expect the entropy to be about the same, but you can see the
raw disk is mostly compressible (zeroes).
$ ls -l TestLinux- disk1.vmdk disk1.vmdk disk1.vmdk | wc -c
-rw-rw-r-- 1 rjones rjones 887312896 2009-12-18 10:35 TestLinux-
$ gzip -c TestLinux-
860846320
$ gzip -c TestLinux-disk1.raw | wc -c
8744715
VMWare's OVF metadata says the following about the disk format:
<References> "TestLinux- disk1.vmdk"
ovf: id="file1" ovf:size= "887312896" />
ovf: capacityAllocat ionUnits= "byte * 2^30"
ovf: diskId= "vmdisk1" ovf:fileRef="file1"
ovf: format= "http:// www.vmware. com/interfaces/ specifications/ vmdk.html# streamOptimized" />
<File ovf:href=
</References>
<DiskSection>
<Info>Virtual disk information</Info>
<Disk ovf:capacity="8"
</DiskSection>
qemu-img 0.10.5 fails in a different way. It gives the error
message:
qemu-img: error while reading
qemu-img >= 0.11.0 fail silently, no error message or error code.
I've tried this with several disk images exported from vSphere 4
and they have all failed to convert in the same way.
Test files (at time of writing these are STILL UPLOADING, with ETA
of 2009-12-19).
http:// homes.merjis. com/~rich/ TestLinux- disk1.vmdk 5ACC51DA9D02593 5470149D55 homes.merjis. com/~rich/ TestLinux. ovf 1A1FCBB728769B5 F71056A580
SHA1: 2C81BAE89210B07
http://
SHA1: 30831689B8C6F1B