Giter VIP home page Giter VIP logo

genovf's Introduction

genovf

Generates OVF from template, HW profile and set of supplied RAW/VMDK images

HOWTO

  1. Getting OVF
  2. Replacing KS in OZ
  3. Build stop after no disk activity

Getting OVF

You need to have working Imagefactory and OZ installation.

$ sudo imagefactory base_image template.tdl

or, set pythonpath for Imagefactory or OZ

$ sudo PYTHONPATH=IMAGAFACTORYPATH:OZPATH python ./imagefactory base_image template.tdl

Note the UUID

$ sudo imagefactory target_image --id UUID vsphere

Note the UUID.

The you can abuse this tool. Image is stored in /var/log/imagefactory/storage/TARGET_UUID.body Make it available somehow, by copying, chmodding, etc... Resulting image is RAW so we need to convert it. Current version saves converted VMDK image to current directory.

Example HW profile:

$ cat vsphere.json
{
"vmname": "testvm",
"virtualhwfamily": "vmx-04",
"cpucount": 2,
"ramsize": 4096
}

Which is almost self describing, maybe except virtualhwfamily, but it should be sufficent to leave it as is.

$ ./genovf -c -o output.ovf -p profile.json -i /var/log/imagefactory/storage/TARGET_UUID.body

You should obtain output.ovf, MANIFEST.MF and TARGET_UUID.body.vmdk. (Easiest) way to move it to Windows vSphere machine is to use some python3 magic

Move it to ./tmp and invoke there

$ python3 -m http.server 8000

Now you can rdesktop to vSphere and download vmdk, manifest and ovf together to new directory. Go to File/Deploy OVF Template and target it on the OVF file. vSphere treats whole dir as a OVF "package".

Hopefully it will work.

Replacing KS

OZ's KS templates are in oz/oz/auto. I've edited rhel-6-jeos.ks (it depends on your OS of choice). My adjustments dealt with logvols. It's pretty simple to do it and you might find handy having some KS from anaconda for example. Rest is the same is in 1).

Build stop after no disk activity

It might happen that you'll get smaller images than you wanted. In that case you either need to edit TDL and add ```XML YOURSIZE ```

OR If it won't help you can edit default value for size in generate_diskimage function in oz/oz/Guest.py.

genovf's People

Contributors

hacxman avatar

Watchers

 avatar  avatar  avatar

Forkers

morazi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.