3

I am looking to create an OVF file during a nightly build process. I currently have this process creating a qcow2 image, which I convert to vmdk using qemu.

qemu-img convert -f qcow2 ${image_name} -O vmdk ${image_name}.vmdk 

The process I am looking to replace is one where I run an update on a ESx VM with the desired image and use ovftool to export an ovf of the updated image (this downloads me the ovf, vmdk and mf). I then insert EULA information into the ovf, update the manifest (mf) which contains sha1sum's of the ovf and vmdk. I tar up the mvf, vmdk and mf into an ova which can then be delivered and imported into VMs and ESx. This process works.

My hope here is that I would be able to create my vmdk and generate both an ovf and mf file that would work with my vmdk. However any ova/ovf I attempt to create ends up giving me an EOF error when I try to load it in to VirtualBox, which is pasted below.

Could not create the imported medium '/home/shayne/VirtualBox VMs/disk1.vmdk' (VERR_EOF).


Result Code: 
VBOX_E_FILE_ERROR (0x80BB0004)
Component: 
ApplianceWrap
Interface: 
IAppliance {8398f026-4add-4474-5bc3-2f9f2140b23e}

I am able to create a new image in VirtualBox using the vmdk that I generate so I don't suspect that is the issue. The only lines that I would expect I would need to change from my working ovf that is generated off an existing loaded VM would be the following.

Update the field ovf:size to be the new size of the vmdk

<File ovf:href="disk1.vmdk" ovf:id="file1" ovf:size="3144482816"/>

Update the field ovf:format to be monolithic sparse, which is the new format of my vmdk.

<Disk ovf:capacity="8" ovf:capacityAllocationUnits="byte * 2^30" ovf:diskId="vmdisk1" ovf:fileRef="file1" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized"/>

Any help would be greatly appreciated on any process I can use to go from qcow2 to ova.

Shayne
  • 31
  • 2

0 Answers0