packer-post-processor-vhd

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2015 License: MPL-2.0 Imports: 2 Imported by: 0

README

packer-post-processor-vhd

Packer post-processor plugin to produce Virtual Hard Disk (VHD) files.

VHD files can be used with the following hypervisors:

  • Hyper-V
  • VMWare
  • VirtualBox
  • XenServer

packer-post-processor-vhd supports converting VirtualBox and QEMU images to VHDs. It can be used as a post-processor for artifacts from both builders.

Dependencies

  • Packer 0.7+
  • VirtualBox (VBoxManage) is required to convert VirtualBox artifacts.
  • QEMU (qemu-img) is required to convert QEMU artifacts.

Usage

Add a post-processor declaration to your Packer template:

{
  "post-processors": [
    {
      "type": "vhd",
      "only": ["virtualbox-iso"],
    }
  ]
}

Configuration

packer-post-processor-vhd supports the following optional configuration items:

  • output (string)

    The path to the VHD file. This is a configuration template. The template supports the following variables:

    • {{ .BuildName }}

      Replaced by the name of the builder (e.g., virtualbox-iso or a custom name).

    • {{ .Provider }}

      Replaced by the input artifact provider (e.g., virtualbox).

    • {{ .ArtifactId }}

      Replaced by the ID of the input artifact.

    Defaults to packer_{{ .BuildName }}_{{ .Provider }}.vhd.

  • force (boolean)

    Whether to overwrite a pre-existing VHD file at output if it exists. Specifying --force on the command line has the same effect. Defaults to false.

  • keep_input_artifact (boolean)

    Whether to keep the input artifact (e.g., VirtualBox image) after processing. Defaults to false.

Installation

  1. Install Packer.

  2. Install the Go toolchain, then install the package:

    go get github.com/benwebber/packer-post-processor-vhd
    go install github.com/benwebber/packer-post-processor-vhd
    
  3. Copy the binary to your Packer plugins directory.

    • Linux and Mac OS X:

      cp $GOPATH/bin/packer-post-processor-vhd ~/packer.d/plugins
      
    • Windows:

      Copy-Item %GOPATH%\bin\packer-post-processor-vhd %APPDATA%\packer.d\plugins
      

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package vhd implements the packer.PostProcessor interface and adds a post-processor that produces a standalone VHD file.
Package vhd implements the packer.PostProcessor interface and adds a post-processor that produces a standalone VHD file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL