Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Packer plugin to create Hyper-V vagrant boxes from VirtualBox artifacts

License

Notifications You must be signed in to change notification settings

dwickern/packer-post-processor-virtualbox-to-hyperv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archived

See #3 (comment)


Download

Packer post-processor: VirtualBox to Hyper-V

A packer plugin to create Hyper-V vagrant boxes from VirtualBox artifacts.

You can use this plugin without having Hyper-V installed.

Usage

Add the plugin to your packer template:

{
  "builders": [
    {
      "type": "vmware-iso", ...
    },
    {
      "type": "virtualbox-iso", ...
    }
  ],
  "post-processors": [
    {
      "type": "vagrant",
      "output": "output_{{.Provider}}.box",
    },
    {
      "type": "virtualbox-to-hyperv",
      "only": ["virtualbox-iso"],
      "output": "output_hyperv.box"
    }
  ]
}

This would generate a vagrant box for vmware, virtualbox and hyperv providers

In order for a box to work in Hyper-V, the guest VM will need Hyper-V integration tools installed. Otherwise, vagrant will not be able to determine the guest's IP address.

For some real examples, see packer templates for Windows 2008 R2 and Ubuntu 14.04.

Configuration

This plugin extends the Vagrant post-processor and accepts the same configuration options.

It also accepts this additional configuration:

  • vm_name (string) - the name of the virtual machine displayed in Hyper-V Manager. By default this is "packer-BUILDNAME", where "BUILDNAME" is the name of the build. Can be changed in the Vagrantfile by setting vmname in the hyperv provider.

Installation

  1. Download the plugin into the same directory as your packer executable.
  2. Add the plugin to ~/.packerconfig or %APPDATA%\packer.config on Windows:
{
  "post-processors": {
    "virtualbox-to-hyperv": "packer-post-processor-virtualbox-to-hyperv"
  }
}

See also Installing Plugins.

Credits

Based on MSOpenTech/packer-hyperv using the techniques described in Creating a Hyper-V Vagrant box from a VirtualBox vmdk or vdi image

About

Packer plugin to create Hyper-V vagrant boxes from VirtualBox artifacts

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages