OpenBSD Handbook

    Theme
    • Part I. Install & Configure
      • Introduction to OpenBSD
      • Installing OpenBSD
      • The X Window System
      • Networking on OpenBSD
      • System Configuration
      • OpenBSD Basics
      • Managing Software: Packages and Ports
    • Part II. Daily Operations
      • OpenBSD Desktop Environments
      • Multimedia
      • Printing
      • Linux Compatibility
      • Windows Compatibility
      • Games
    • Part III. System Administration
      • Virtualization
      • Storage and File Systems
      • Updating and Upgrading
      • Localization
      • The OpenBSD Boot Process
      • Security
    • Part IV. Networking & Daemons
      • Services
        • Database
          • MariaDB
          • PostgreSQL
          • Redis
          • memcached
        • Directory
          • YP (NIS)
          • LDAP
        • File
          • NFS
          • Samba
        • FTP Services
          • ftpd
          • ProFTPD
          • vsftpd
          • Pure-FTPd
          • TFTP
        • Mail
          • OpenSMTPD Mail Server
          • Dovecot IMAP and POP3 Server
          • Postfix
          • Exim
          • Rspamd
        • Name
          • Unbound DNS Resolver
          • NSD Authoritative DNS Server
          • BIND DNS Server
        • Networking
          • OpenBGPD
          • rad
          • DHCP on OpenBSD
          • slaacd
        • Web
          • Apache HTTP Server
          • nginx Web Server
          • OpenBSD httpd Web Server
          • relayd Reverse Proxy
        • Logging
          • syslogd
        • Monitoring
          • SNMP
        • Remote Access
          • Audit OpenSSH
          • OpenSSH Server
        • File Synchronization
          • rsync
        • Messaging
          • RabbitMQ Message Broker
        • Time
          • NTP Time Synchronization
      • PF
        • pfctl cheat sheet
        • PF Anchors
        • PF Filter Rules
        • PF Forwarding
        • PF Lists and Macros
        • PF Load Balancing
        • PF Logging
        • PF NAT
        • PF Options
        • PF Policies
        • PF Shortcuts
        • PF Tables
      • Advanced Networking
        • High Availability and State Replication
        • Multi-WAN and Policy-Based Routing
        • VPN and Cryptographic Tunneling
        • Classic and Lightweight Tunnels
        • IPv6 at Scale
        • QoS and Traffic Shaping
        • MPLS and Label Distribution
        • Network Services at Scale
        • Virtualization and Host Networking
        • Large-Scale L2 and L3 Design
        • Telemetry, Logging, and Flow Export
        • Hardening and Operational Safety
        • Reference Architectures
        • Troubleshooting Playbooks
      • Serial Communication
    • Part V. Miscellaneous
      • Virtualization Cheat Sheet
      • OpenBSD Cheatsheet
      • How-to Guides
        • Complete the First 30 Minutes After Installation
        • Check Hardware Compatibility Before Installing
        • Bootstrap Wi-Fi Firmware Without Ethernet
        • Set Up OpenBSD as a Laptop or Workstation
        • Configure Laptop Power Management
        • Run OpenBSD as a Virtual Machine Guest
        • Install OpenBSD on a VPS or Cloud Server
        • Install OpenBSD with Full-Disk Encryption
        • Troubleshoot Web Browsers on OpenBSD
        • Create an Administrator Account with doas and SSH Keys
        • Establish a Conservative Security Baseline
        • Manage OpenBSD with Ansible
        • Recover Access and Reset the Root Password
        • Collect OpenBSD Diagnostic Evidence
        • Configure Secure Remote Access with OpenSSH
        • Set Up WordPress on OpenBSD
        • Build Third-Party Software from Ports
        • Use FIDO Security Keys with OpenSSH
        • Build OpenBSD from Source
        • Configure Wi-Fi Roaming and Wired Failover
        • Dual-Boot OpenBSD on a UEFI System
        • Troubleshoot PF, NAT, and Routing
        • Automate OpenBSD Installation with Autoinstall and PXE
        • Route Multiple VLANs with PF
        • Configure a Road-Warrior WireGuard VPN
        • Troubleshoot Package Installation and Update Failures
        • Route IPv6 Networks without NAT
        • Schedule Recurring Maintenance
        • Plan a Docker Workload Migration to OpenBSD
        • Build a Mail Server with OpenSMTPD, Dovecot, and Rspamd
        • Build a Simple Router and Firewall
        • Monitor an OpenBSD System
        • Back Up and Restore an OpenBSD System
        • Configure softraid RAID1
        • Recover an OpenBSD System That Does Not Boot
        • Install Z shell (zsh)
      • OpenBSD for Linux Users
      • OpenBSD for FreeBSD Users
      • OpenBSD for macOS Users
    • OpenBSD FAQ
    • OpenBSD Architectures
      • OpenBSD Package Search

        packer-vmm-1.7.4

        Package search / Categories / Current snapshot
        โ† Back to search
        OpenBSD branch
        OpenBSD 8.0 releaseCurrent snapshot

        Current snapshot ยท amd64

        vmm(4) builder engine for HashiCorp Packer

        Description

        This plugin enables packer (sysutils/packer) to use the OpenBSD hypervisor (VMM) as a builder engine.

        Package information

        Ports path
        sysutils/packer-vmm
        Package architecture
        amd64
        Maintainer
        Pavel Korovin <pvk@openbsd.org>
        Categories
        sysutils, lang/go
        Available flavors
        None listed
        Only for architectures
        amd64

        Ports list build and test dependencies as well as runtime dependencies. pkg_add selects those needed for installation.

        Direct dependencies

        Runtime

        • sysutils/packer STEM->=1.7.0

        Build

        • lang/go
        • archivers/unzip
        OpenBSD README

        This README contains unresolved ports variables; replace them before using its commands.

        +-----------------------------------------------------------------------
        | Running packer-vmm on OpenBSD
        +-----------------------------------------------------------------------
        
        To allow interaction with vmd(8) for unprivileged users, create VM template
        in vm.conf(5) and assign permissions for user accounts.
        This template will be used as parent VM for VM instances created by Packer.
        
        For more infornation, see VM INSTANCES section in vm.conf(5) and example files
        provided with the package.
        
        Build process steps
        ===================
        1) Create image output dir if it does not exist
        2) Create disk image, error out if it already exists
        3) Start VM
        4) Start local HTTP server
        5) Generate installation files from templates in HTTP server directiry
        6) Pass boot_command to VM console
        7) Upon OS installation, shutdown VM
        
        Optional steps can include communication with VM by ssh(1) and performing
        various Packer provisioners and post-processors.
        
        List of Variables
        =================
        -------------------------------------------------------------------------------
              Variable       |   Description                                 | Defaults
        -------------------------------------------------------------------------------
        vm_name*             | VM name, image filename, disk image filename  |
        vm_template*         | vm.conf(5) template name                      |
        boot_device          | passed as -B option to vmctl(8) start         | template
        boot                 | passed as -b option to vmctl(8) start         | vmctl(8)
        cdrom                | passed as -r option to vmctl(8) start         | template
        disk_format          | passed to vmctl(8) create, qcow2 or raw       | "raw"
        disk_base            | passed as -b option to vmctl(8) create        | template
        disk_size            | passed as -b option to vmctl(8) create        | template
        memory               | passed as -m option to vmctl(8) start         | vmctl(8)
        log_directory        | path to packer's build log directory          | $PWD
        output_directory     | path to packer's VM image output directory    | $PWD
        gen_files_extension  | file extension for installation templates     | "pkr.in"
        gen_files_pattern    | filename pattern for installation templates   | vm_name
        -------------------------------------------------------------------------------
        * - required
        
        Packer HTTP server and installation files templates
        ===================================================
        Packer starts HTTP server on dynamic port serving files from directory
        specified by http_directory variable. This directory can contain unattended
        scripts like OpenBSD autoinstall(8) response files and autopartitioning
        templates, Linux distributions kickstart/preseed files, etc.
        
        To simplify unattended installation process, Packer vmm builder plugin will
        process files in http_directory by recursively searching for filenames matching
        the fileglob "gen_files_pattern*.gen_files_extension", where "gen_files_pattern"
        and "gen_files_extension" are the template variables, respectively.
        If these variables are not configured, by default fileglob is "vm_name.pkr.in",
        where "vm_name" is the respecive template variable.
        
        Packer will replace the following Packer template variables in these files:
         {{ .VMName }}   - with vm_name variable
         {{ .HTTPIP }}   - with dynamic local interface address created by vmd(8)
         {{ .HTTPPort }} - with the port, on which Packer's HTTP process is listening
        
        and write new files which names are constructed by omiting
        "gen_files_extension", by default "pkr.in".
        E.g. if there's a file "http_directory/openbsd.autoinstall.pkr.in", Packer will
        process its contents, replace variables with actual values, and write a new
        file, "http_directory/openbsd.autoinstall", which can be passed to OpenBSD
        autoinstall(8).
        
        Example workflow
        ================
        1) Configure VM template in ${SYSCONFDIR}/vm.conf
        2) Create directories for Packer's templates, http server, logs, and output
        3) Configure Packer by setting environment variables/editing config files
        4) Create build templates ($PACKER_CONFIG_DIR/*.pkr files)
        5) Copy ISO images and installation files to configured locations
        6) Create base OS image with minimal necessary configurations changes
        7) Create and deploy customized images using base OS images
        
        Example Packer templates, autoinstall scripts for OpenBSD/Linux guests can be
        found in /usr/local/share/examples/packer-vmm.
        
        Caveats
        =======
        If VM template uses an ISO image for build, make sure that parent template
        in vm.conf(5) specifies cdrom as boot device, e.g.:
              vm generic {
                    disable
                    boot device cdrom
                    owner vm_user
                    allow instance { boot, cdrom, disk, instance, interface, memory }
                    memory 1G
                    disk /dev/null
              }
        

        Package guides

        • Installing and updating packages

        Package details as JSON

        Report a bug