Git Product home page Git Product logo

packer-ova-forge's Introduction

ova-forge packer post-processor plugin

A plugin for packer that allows users to convert VirtualBox ISO builds into OVAs for both VirtualBox and VMWare - without rebuilding the virtual machine!

Use cases

Certain VMWare tools (such as vSphere) are very picky about OVF configurations. As of vSphere 6.5.x, it is not possible to create a VirtualBox OVF and deploy it without modification. In addition, introducing VMWare into build tooling is fraught with gotchas and headaches in the forms of licensing, unfixed bugs, and lack of support.

This plugin effectively allows developers to build one VirtualBox VM and OVF, and then create VirtualBox and VMWare OVAs. This means that we never need to touch a VMWare tool to build a VMWare compatible appliance - greatly speeding up and simplifying the build process.

How does it work?

After installing the plugin, add the plugin to your packer config's post-processors section:

(...)
    }
  ],
  "post-processors": ["ova-forge"],
  "variables": {
(...)

This will convert your VirtualBox OVF into VirtualBox and VMWare OVAs. This will be indicated in the build output:

==> virtualbox-iso: Exporting virtual machine...
    virtualbox-iso: Executing: export centos7 --output output-centos7-virtualbox-iso/centos7.ovf
==> virtualbox-iso: Deregistering and deleting VM...
==> virtualbox-iso: Running post-processor: ova-forge
    virtualbox-iso (ova-forge): VMWareifying 'output-centos7-virtualbox-iso/centos7.ovf'...
    virtualbox-iso (ova-forge): Finished VMWareifying .ovf at 'output-centos7-virtualbox-iso/centos7-vmware.ovf'
    virtualbox-iso (ova-forge): Creating .ova for 'output-centos7-virtualbox-iso/centos7.ovf' with files 'output-centos7-virtualbox-iso/centos7-disk001.vmdk'...
    virtualbox-iso (ova-forge): Finished creating .ova at 'output-centos7-virtualbox-iso/centos7.ova'
    virtualbox-iso (ova-forge): Creating .ova for 'output-centos7-virtualbox-iso/centos7-vmware.ovf' with files 'output-centos7-virtualbox-iso/centos7-disk001.vmdk'...
    virtualbox-iso (ova-forge): Finished creating .ova at 'output-centos7-virtualbox-iso/centos7-vmware.ova'
Build 'virtualbox-iso' finished.

==> Builds finished. The artifacts of successful builds are:
--> virtualbox-iso: VM files in directory: output-centos7-virtualbox-iso
--> virtualbox-iso: OVA related files: output-centos7-virtualbox-iso/centos7-vmware.ovf, output-centos7-virtualbox-iso/centos7.ova, output-centos7-virtualbox-iso/centos7-vmware.ova

How do I install it?

As of Packer version 1.3.2, you need to do the following:

  1. Download the compiled binary for your system from the releases / tags page
  2. Create the following directory path in your home directory: .packer.d/plugins/
  3. Move the plugin into the directory and make sure it is named packer-post-processor-ova-forge
  4. Make sure it is set as executable (on *nix systems)

Building from source

You can use any of the following methods to build the plugin:

  • go build cmd/packer-post-processor-ova-forge/main.go - Build the plugin directly with the go CLI
  • build.sh - A simple wrapper around 'go build' that saves build artifacts to build/ and sets a version number in the compiled binary. This script expects a version to be provided by setting an environment variable named VERSION
  • buildall.sh - Build the plugin for all supported OSes by wrapping the build.sh script

packer-ova-forge's People

Contributors

stephen-fox avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

khamidziyo

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.