{
  "_comment": "Build with `packer build ubuntu.json`",
  "builders": [
    {
      "iso_urls": [ "output-base/base" ],
      "iso_checksum": "none",
      "disk_image": "true",
      "use_backing_file": "true",
      "headless": "{{ user `headless` }}",
      "disable_vnc": "false",
      "output_directory": "output-{{ user `vm_name` }}",
      "qemuargs": [
        [
          "-m",
          "{{ user `memory` }}"
        ],
        [
          "-display",
          "none"
        ],
        [
          "-machine",
          "accel=kvm"
        ],
        [
          "-cpu",
          "host"
        ],
        [
          "-smp",
          "cpus={{ user `cpus`}}"
        ],
        [
            "-serial",
            "mon:stdio"
        ]
      ],
      "shutdown_command": "echo '{{ user `ssh_password` }}'|sudo -S shutdown -P now",
      "ssh_password": "{{ user `ssh_password` }}",
      "ssh_timeout": "10000s",
      "ssh_username": "{{ user `ssh_username` }}",
      "type": "qemu",
      "vm_name": "{{ user `vm_name` }}"
    }
  ],
  "provisioners": [
    {
      "execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
      "scripts": [
        "scripts/install-tas.sh"
      ],
      "type": "shell"
    }
  ],
  "variables": {
    "cleanup_pause": "",
    "cpus": "4",
    "custom_script": ".",
    "desktop": "false",
    "disk_size": "10000",
    "headless": "", "hostname": "vagrant",
    "memory": "4096",
    "preseed": "preseed.cfg",
    "ssh_fullname": "vagrant",
    "ssh_password": "ubuntu",
    "ssh_username": "ubuntu",
    "vagrantfile_template": "",
    "version": "0.1.0",
    "vm_name": "tas"
  }
}

