Bug 698392 - qemu-img doesnt convert from raw to vmdk properly.
Summary: qemu-img doesnt convert from raw to vmdk properly.
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: 14
Hardware: x86_64
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-20 19:24 UTC by solanum
Modified: 2013-01-09 23:49 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-21 11:24:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description solanum 2011-04-20 19:24:58 UTC
Description of problem:
qemu-img doesnt convert from raw to vmdk properly. Solaris has a hidden partition/slice and the hidden flags get lost during the conversion. 

Version-Release number of selected component (if applicable):

qemu-img-0.13.0-1

How reproducible:
It happened twice. 


Steps to Reproduce:
1. install solaris 10 on fedora kvm stack
2. run qemu-img convert raw -> vmdk
3. put vmdk in VMware stack.
4. it boots to single user mode. (you can't boot to multi-user mode.
5. run format -> partition you will see a slice that should be hidden, but you can see it. 

Actual results:


Expected results:
I don't expect to see the hidden slice. 

Additional info:

from http://www.justlinux.com/forum/showthread.php?t=149828

Here is a list of the commonly used partitions, hide and unhide

< bit position>-----ID------Partition type------------
0 0 0 0 0 1 1 1 --- 7 ---- ntfs
0 0 0 1 0 1 1 1 --- 17 --- ntfs (hidden)
1 0 0 0 0 0 1 1 --- 83 --- native Linux
1 0 0 1 0 0 1 1 --- 93 --- native Linux (hidden)
0 0 0 0 0 1 1 0 --- 6 ---- fat16
0 0 0 1 0 1 1 0 --- 16 --- fat16 (hidden)
0 0 0 0 1 1 0 0 --- c ---- fat32 (LBA)
0 0 0 1 1 1 0 0 --- 1c --- fat32 (LBA) (hidden)
1 0 1 0 0 1 0 1 --- a5 --- BSD
1 0 1 1 0 1 0 1 --- b5 --- BSD (hidden)
1 0 1 1 1 1 1 1 --- bf --- Solaris
1 0 1 0 1 1 1 1 --- af --- Solaris (hidden)
0 0 0 0 0 1 0 1 --- 5 ---- Dos extended partition
0 0 0 1 0 1 0 1 --- 15 --- Dos extended partition (hidden)
1 0 0 0 0 1 0 1 --- 85 --- Linux extended partition
1 0 0 1 0 1 0 1 --- 95 --- Linux extended partition (hidden)

As always there is an exception to the rule. The Solaris partition is unhide with ID "bf" and hiding it make it into "af". Therefore to hide a Solaris partition in Grub the "unhide" instruction has to be used to toggle its 5th bit from "1" to "0".
---

I haven't been able to test the unhide/hide thing to see if that is a temporary work around yet. It appears as thought it could be an easier fix..

Comment 1 Kevin Wolf 2011-04-21 08:49:29 UTC
Please provide a qemu-io dump of the partition table immediately before and after the conversion. Image format conversion isn't supposed to change any of the content of an image file. You can dump the MBR like this (parameters to read are start and length):

qemu-io -c 'read -v 0 512' foo.img

Comment 2 Cole Robinson 2012-05-21 11:24:48 UTC
F14 is end-of-life, and reporter never responded, so closing. If anyone can still reproduce with latest qemu (fedora 16+), please reopen this report.


Note You need to log in before you can comment on or make changes to this bug.