{ "variables": { "iso_url": "http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/x86_64/alpine-virt-3.12.0-x86_64.iso", "iso_checksum": "fe694a34c0e2d30b9e5dea7e2c1a3892c1f14cb474b69cc5c557a52970071da5", "vm_name": "alpine_gui.qcow2", "setup_script": "setup.sh", "disk_size": "1000" }, "builders": [ { "type": "qemu", "iso_url": "{{user `iso_url`}}", "iso_checksum": "{{user `iso_checksum`}}", "iso_checksum_type": "sha256", "shutdown_command": "poweroff", "headless": true, "ssh_username": "root", "ssh_password": "root", "vm_name": "{{user `vm_name`}}", "disk_interface": "ide", "disk_compression": true, "net_device": "e1000", "disk_size": "{{user `disk_size`}}", "boot_wait": "20s", "ssh_wait_timeout": "60s", "boot_command": [ "root", "echo 'root:root' | chpasswd", "ifconfig lo up", "ifconfig eth0 up && udhcpc -i eth0", "setup-sshd -c openssh", "sed -i.orig '$aPermitRootLogin yes' /etc/ssh/sshd_config", "service sshd restart" ] } ], "provisioners": [ { "type": "shell", "script": "scripts/install.sh" }, { "type": "shell", "inline": [ "reboot" ] }, { "type": "shell", "pause_before": "20s", "inline": [ "apk upgrade --update-cache" ] }, { "type": "shell", "script": "scripts/gui.sh" }, { "type": "shell", "script": "scripts/{{user `setup_script`}}" }, { "type": "shell", "script": "scripts/post_setup.sh" } ] }