playerla / packer-debian-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Packer ESX debian demo

Requirements

Linux host

Remote ssh access and API access to ESX

ESXi

# Allow ARP Packet Inspection of the Guest VM to infer the IP address
esxcli system settings advanced set -o /Net/GuestIPHack -i 1
# Enable inbound VNC 5900 to boot and configure iso (simulating keystroke). Can't add port to esx firewall so hack this rule.
esxcli network firewall ruleset set --enabled=true --ruleset-id=gdbserver
# Enable outbound Packer HTTP static server (preseed.cfg)
esxcli network firewall ruleset set --enabled=true --ruleset-id=httpClient

Run

packer build -var-file variables.json template.json

Generated template

Default sudoer username and password are debian, defined in preseed.cfg and used in template.json

Inspiration

About

License:MIT License