qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-img convert to VMDK
@ 2017-10-13 14:20 Guilherme Moro
  2017-10-14  9:45 ` Fam Zheng
  0 siblings, 1 reply; 4+ messages in thread
From: Guilherme Moro @ 2017-10-13 14:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: famz

Hi,

I'm trying to convert some images from raw to vmdk to run in a ESXi6.5 
server but I need to rectify the image before being able to run.

The scenario goes like that:

qemu-img convert -f raw image.raw -O vmdk -o compat6 image.vmdk
ESXi complains with "Failed - File system specific implementation of 
LookupAndOpen"[file] failed
running vmkfstools -x repair on the image make it bootable

  I checked the changes, vmkfstools is basically removing the second 
descriptor from the end of the file, I'm not familiar enough with the 
code and the format to know what this means, maybe compat6 should make 
qemu-img avoid to put that in the end of the file (again, mostly guessing).

Anyway we would need an option to make sure that this second descriptor 
does not end in the final image.

Can anyone advise on that ?

Thanks,

Guillherme

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] qemu-img convert to VMDK
  2017-10-13 14:20 [Qemu-devel] qemu-img convert to VMDK Guilherme Moro
@ 2017-10-14  9:45 ` Fam Zheng
  2017-10-16 11:16   ` Guilherme Moro
  2017-10-17 16:58   ` Guilherme Moro
  0 siblings, 2 replies; 4+ messages in thread
From: Fam Zheng @ 2017-10-14  9:45 UTC (permalink / raw)
  To: Guilherme Moro; +Cc: qemu-devel

On Fri, 10/13 15:20, Guilherme Moro wrote:
> Hi,
> 
> I'm trying to convert some images from raw to vmdk to run in a ESXi6.5
> server but I need to rectify the image before being able to run.
> 
> The scenario goes like that:
> 
> qemu-img convert -f raw image.raw -O vmdk -o compat6 image.vmdk
> ESXi complains with "Failed - File system specific implementation of
> LookupAndOpen"[file] failed
> running vmkfstools -x repair on the image make it bootable
> 
>  I checked the changes, vmkfstools is basically removing the second
> descriptor from the end of the file, I'm not familiar enough with the code
> and the format to know what this means, maybe compat6 should make qemu-img
> avoid to put that in the end of the file (again, mostly guessing).
> 
> Anyway we would need an option to make sure that this second descriptor does
> not end in the final image.

What do you mean by "second descriptor"? The one at offset 0x200? But other than
this descriptor I don't see a second one. Maybe I'm missing something?

Fam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] qemu-img convert to VMDK
  2017-10-14  9:45 ` Fam Zheng
@ 2017-10-16 11:16   ` Guilherme Moro
  2017-10-17 16:58   ` Guilherme Moro
  1 sibling, 0 replies; 4+ messages in thread
From: Guilherme Moro @ 2017-10-16 11:16 UTC (permalink / raw)
  To: Fam Zheng; +Cc: qemu-devel

On 10/14/2017 10:45 AM, Fam Zheng wrote:
> On Fri, 10/13 15:20, Guilherme Moro wrote:
>> Hi,
>>
>> I'm trying to convert some images from raw to vmdk to run in a ESXi6.5
>> server but I need to rectify the image before being able to run.
>>
>> The scenario goes like that:
>>
>> qemu-img convert -f raw image.raw -O vmdk -o compat6 image.vmdk
>> ESXi complains with "Failed - File system specific implementation of
>> LookupAndOpen"[file] failed
>> running vmkfstools -x repair on the image make it bootable
>>
>>   I checked the changes, vmkfstools is basically removing the second
>> descriptor from the end of the file, I'm not familiar enough with the code
>> and the format to know what this means, maybe compat6 should make qemu-img
>> avoid to put that in the end of the file (again, mostly guessing).
>>
>> Anyway we would need an option to make sure that this second descriptor does
>> not end in the final image.
> What do you mean by "second descriptor"? The one at offset 0x200? But other than
> this descriptor I don't see a second one. Maybe I'm missing something?
>
> Fam

Hi,

maybe there's something else happening on my side, I will double check, 
but my converted image have descriptors in the end and in the beginning 
of the file:

linux-kv33:/data/NFS # tail -c 512 
SLES15-JeOS-for-VMware.x86_64-1.3.0-Build.vmdk
encoding="UTF-8"
# Disk DescriptorFile
version=1
CID=f7105bc0
parentCID=ffffffff
createType="monolithicSparse"

# Extent description
RW 50331648 SPARSE "SLES15-JeOS-for-VMware.x86_64-1.3.0.vmdk"

# The Disk Data Base
#DDB

ddb.virtualHWVersion = "4"
ddb.geometry.cylinders = "49932"
ddb.geometry.heads = "16"
ddb.geometry.sectors = "63"
ddb.adapterType = "ide"

ddb.toolsInstallType = "4"
ddb.toolsVersion = "10282"


linux-kv33:/data/NFS # head -c 1024 
SLES15-JeOS-for-VMware.x86_64-1.3.0-Build.vmdk
KDMV\x01\x03\x03�\x01\x14\x02\x15^[
              �\x18

# Disk DescriptorFile
version=1
CID=f7105bc0
parentCID=ffffffff
createType="monolithicSparse"

# Extent description
RW 50331648 SPARSE "SLES15-JeOS-for-VMware.x86_64-1.3.0.vmdk"

# The Disk Data Base
#DDB

ddb.virtualHWVersion = "4"
ddb.geometry.cylinders = "49932"
ddb.geometry.heads = "16"
ddb.geometry.sectors = "63"
ddb.adapterType = "ide"


Again, not acquainted with the code as much, but the code seems to 
indicate VMDK4 files having a footer. Specifically the function 
vmdk_open_vmdk4 inside block/vmdk.c .

I couldn't trace further if there's any other code *writing*  a footer.

Guilherme

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] qemu-img convert to VMDK
  2017-10-14  9:45 ` Fam Zheng
  2017-10-16 11:16   ` Guilherme Moro
@ 2017-10-17 16:58   ` Guilherme Moro
  1 sibling, 0 replies; 4+ messages in thread
From: Guilherme Moro @ 2017-10-17 16:58 UTC (permalink / raw)
  To: qemu-devel

On 10/14/2017 10:45 AM, Fam Zheng wrote:
> On Fri, 10/13 15:20, Guilherme Moro wrote:
>> Hi,
>>
>> I'm trying to convert some images from raw to vmdk to run in a ESXi6.5
>> server but I need to rectify the image before being able to run.
>>
>> The scenario goes like that:
>>
>> qemu-img convert -f raw image.raw -O vmdk -o compat6 image.vmdk
>> ESXi complains with "Failed - File system specific implementation of
>> LookupAndOpen"[file] failed
>> running vmkfstools -x repair on the image make it bootable
>>
>>   I checked the changes, vmkfstools is basically removing the second
>> descriptor from the end of the file, I'm not familiar enough with the code
>> and the format to know what this means, maybe compat6 should make qemu-img
>> avoid to put that in the end of the file (again, mostly guessing).
>>
>> Anyway we would need an option to make sure that this second descriptor does
>> not end in the final image.
> What do you mean by "second descriptor"? The one at offset 0x200? But other than
> this descriptor I don't see a second one. Maybe I'm missing something?
>
> Fam
>
Hi,

never mind that, another tool was touching the description and writing 
it in the wrong place, sorry the false alarm :)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-17 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-13 14:20 [Qemu-devel] qemu-img convert to VMDK Guilherme Moro
2017-10-14  9:45 ` Fam Zheng
2017-10-16 11:16   ` Guilherme Moro
2017-10-17 16:58   ` Guilherme Moro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).