TurnKey Linux Virtual Appliance Library

How can I convert a TKLpatched iso to an OVF

Eric (tssgery)'s picture

I'm working on a TKLpatch but would like to offer users the opportunity to utilzie an OVF/OVA distribution instead of an installable ISO image.

I've searched but have found no way to do this, though I likelyh just missed it somewhere.

How can I go about building an OVF/OVA from my patched ISO?

Jeremy's picture

I haven't done that before...

But I imagine that the easiest way to do that would be to install to a VM (I'd use VirtualBox) and then export as an OVF from there... There maybe a better way but that's what I'd do.

Also make sure you use a non-static HDD image (ie don't allocate all HDD space initially). The VM images TKL have available have a 20GB HDD image (but not all space allocated so it's not a 20GB download). before you finish you will probably want to clean up as much as possible and I think there is a way to remove the excess free space but not sure how, you'll probably need to consult the VBox docs.

One thing other thing you will want to do too is reset the 'firstboot' flag in initihooks prior to image export, documentation here. That way the firstboot scripts will run when the VM is first started (ie set passwords etc).

Be great if you document and post your process as others will probably appeciate it.

Good luck! :)

Eric (tssgery)'s picture

I can do that with VMware,

I can do that with VMware, I'm more familiar with it and have it readily available.

 

I just need to make my firstboot scripts re-entrant and functioning :) Guess I have more to add to my todo list.


Jeremy's picture

I'm sure VMware would be fine...

Just that I have a preference for VirtualBox. :) Good luck!

Eric (tssgery)'s picture

I'm sure either would work

I'm sure either would work but I've been using VMware player/workstation/server/ESXi/ESX/vCenter for about... 8 years now. All the tools are already installed and ready to use.

 

I was just hoping there was an automated means to build the OVFs instead of installing from iso, resetting the firstboot flag, and then exporting the image to OVF.


Jeremy's picture

There probably is a way... but I don't know how

I know that VBox has VBoxMange (commandline tool) so at least part of the process could be automated using that. AFAIK KVM has even better commandline tools although I haven't really used them so can't comment there. I would imagine that VMware probably has similar tools so I'm sure that you could do something similar.

Another thought, rather than patch your ISO then install from it and export as VM. How about start with a TKL VM image then patch it (rather than patching an ISO, you can apply a patch directly to the running system - although you may need to stop some services as they can sometimes cause problems in the patching process). That would at least eliminate one step - installing from ISO. It still wouldn't be very automated, but it would be quicker!

I'm not sure how the TKL core devs do it but I'm sure they don't do each appliance manually. Hopefully one of them could give you some hints?

I have exactly the same

I have exactly the same question. Is there an automated way that the TKL core devs use to generate the VMDK/OVF appliance builds?

Eric (tssgery)'s picture

I never got a reply

I never got a reply on this so am not sure how they do it.

I've actually been looking at the kiwi build system for OpenSuSE/SuSE and love the fact that it can spit out any imaginable format. Kiwi does not support debian based systems (as of yet) but I am thinking I could add support to it or at least use it as a model for image creation.


Jeremy's picture

Possibly extract ISO to VMDK and have script to create OVF

I'm not sure but I think it may be as straight forward as extract the ISO and recompress as VMDK (using some commandline tool), with a basic script to create the OVF (which would essentially be generic for all appliances from what I can gather).

It would be good to know for sure how they do it though!

it is easiest thing in the world ..u idiots....

on vm right click on ovf that left click that is all folks.....easy as iz

Eric (tssgery)'s picture

I mean without deploying the iso first.

please don't call us idiots. It's offensive and completely unnecessary.


Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)