• Infrastructure
    • terraform
    • packer
  • Networking
    • consul
  • Security
    • vault
    • boundary
  • Applications
    • nomad
    • waypoint
    • vagrant
  • HashiCorp Cloud Platform

    A fully managed platform to automate infrastructure on any cloud with HashiCorp products.

    • consul
    • terraform
    • vault
    • packerbeta
    Visit cloud.hashicorp.com
  • Overview
  • Tutorials
  • Docs
  • Plugins
  • Community
GitHubInstall PackerTry HCP Packer
  • About External Plugins

      • 1&1
      • Alicloud ECS
      • Alicloud Import
      • Anka Registry Push
      • VM Clone
      • VM Create
      • Ansible (Remote)
      • Ansible Local
      • Overview
      • Amazon AMI
      • Parameter Store
      • Secrets Manager
      • Overview
      • chroot
      • EBS
      • EBS Surrogate
      • EBS Volume
      • Instance
      • Amazon Import
      • Overview
      • ARM
      • chroot
      • DTL
      • Azure DTL Artifact
      • Chef Client
      • Chef Solo
      • CloudStack
      • Converge
      • digitalocean
      • digitalocean-import
      • Docker
      • Docker Import
      • Docker Push
      • Docker Save
      • Docker Tag
      • Overview
      • Commit
      • Repository
      • Tree
      • Google Cloud Platform
      • googlecompute-export
      • googlecompute-import
      • Overview
      • Receipt
      • Overview
      • Toppings
      • Overview
      • Coffees
      • Ingredients
      • Overview
      • Order
      • Hetzner Cloud
      • HuaweiCloud
      • HyperOne
      • Overview
      • ISO
      • VMCX
      • InSpec
      • JDCloud
      • Kamatera
      • Linode
      • Libvirt
      • LXC
      • LXD
      • Naver Cloud
      • OpenStack
      • Overview
      • Classic
      • OCI
      • Overview
      • BSU
      • BSU Surrogate
      • BSU Volume
      • chroot
      • Overview
      • ISO
      • PVM
      • ProfitBricks
      • Overview
      • Clone
      • ISO
      • Puppet Masterless
      • Puppet Server
      • QEMU
      • Salt Masterless
      • Scaleway
      • SSH Key
      • Tencent Cloud
      • Triton
      • UCloud
      • UCloud Import
      • upcloud
      • upcloud-import
      • Vagrant
      • Vagrant
      • Vagrant Cloud
      • Overview
      • ISO
      • OVF
      • VM
      • Overview
      • Clone
      • ISO
      • vSphere
      • vSphere Template
      • Overview
      • ISO
      • VMX
      • Vultr
      • Yandex
      • yandex-export
      • yandex-import
Type '/' to Search
Community
v2.3.1

Veertu's Anka VM Create Builder

Type: veertu-anka-vm-create

NOT CURRENTLY COMPATIBLE WITH ANKA 3.

The veertu-anka-vm-create Packer builder is able to create new Anka VM Templates for use with the Anka Virtualization package and the Anka Build Cloud. The builder takes the path to macOS installer .app and installs that macOS version inside of an Anka VM Template.

The builder does not manage templates. Once a template is created, it is up to you to use it or delete it.

This builder is part of the Veertu Anka plugin. To install this plugin using packer init, add the following Packer block to your hcl template:

packer {
  required_plugins {
    veertu-anka = {
      version = ">= 2.1.0"
      source  = "github.com/veertuinc/packer-plugin-veertu-anka"
    }
  }
}
packer {
  required_plugins {
    veertu-anka = {
      version = ">= 2.1.0"
      source  = "github.com/veertuinc/packer-plugin-veertu-anka"
    }
  }
}

Configuration Reference

There are many configuration options available for the builder. They are segmented below into two categories: required and optional parameters.

Required Configuration

  • installer_app (String)

The path to a macOS installer. This process takes about 20 minutes.

  • type (String)

Must be veertu-anka-vm-create.

Optional Configuration

  • vm_name (String)

The name for the VM that is created. One is generated with installer_app data if not provided (anka-packer-base-{{ installer_app.OSVersion }}-{{ installer_app.BundlerVersion }}).

  • vcpu_count (String)

This change gears us up for Anka 3.0 release when cpu_count will be vcpu_count. For now this is still CPU and not vCPU.

The number of vCPU cores, defaults to 2.

  • ram_size (String)

The size in "[0-9]+G" format, defaults to 4G.

  • disk_size (String)

The size in "[0-9]+G" format, defaults to 40G.

We will automatically resize the internal disk for you by executing diskutil apfs resizeContainer disk1 0 inside of the VM

  • stop_vm (Boolean)

Whether or not to stop the vm after it has been created, defaults to false.

  • use_anka_cp (Boolean)

Use built in anka cp command. You shouldn't need this option. Defaults to false.

  • anka_password (String)

Sets the password for the vm. Can also be set with ANKA_DEFAULT_PASSWD env var. Defaults to admin.

  • anka_user (String)

Sets the username for the vm. Can also be set with ANKA_DEFAULT_USER env var. Defaults to anka.

  • boot_delay (String)

The time to wait before running packer provisioner commands, defaults to 7s.

Example

Here is an example with port forwarding.


variable "vm_name" {
  type = string
  default = "anka-packer-base-macos"
}

variable "installer_app" {
  type = string
  default = "/Applications/Install macOS Big Sur.app/"
}

variable "vcpu_count" {
  type = string
  default = ""
}

source "veertu-anka-vm-create" "base" {
  installer_app = "${var.installer_app}"
  vm_name = "${var.vm_name}"
  vcpu_count = "${var.vcpu_count}"
}

build {
  sources = [
    "source.veertu-anka-vm-create.base"
  ]

  provisioner "shell" {
    inline = [
      "echo hello world",
      "echo llamas rock"
    ]
  }
}
 
variable "vm_name" {
  type = string
  default = "anka-packer-base-macos"
}
 
variable "installer_app" {
  type = string
  default = "/Applications/Install macOS Big Sur.app/"
}
 
variable "vcpu_count" {
  type = string
  default = ""
}
 
source "veertu-anka-vm-create" "base" {
  installer_app = "${var.installer_app}"
  vm_name = "${var.vm_name}"
  vcpu_count = "${var.vcpu_count}"
}
 
build {
  sources = [
    "source.veertu-anka-vm-create.base"
  ]
 
  provisioner "shell" {
    inline = [
      "echo hello world",
      "echo llamas rock"
    ]
  }
}

github logoEdit this page
IntroGuidesDocsCommunityPrivacySecurityPress KitConsent Manager