-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqemu-ubuntu-bionic.json
73 lines (73 loc) · 2.2 KB
/
qemu-ubuntu-bionic.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
"builders": [{
"type": "qemu",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"output_directory": "packer-artifacts/{{user `vm_name`}}",
"vm_name": "packer-{{user `vm_name`}}.raw",
"disk_size": "{{user `disk_size`}}",
"format": "raw",
"accelerator": "kvm",
"headless": "{{user `headless`}}",
"http_directory": "http",
"boot_wait": "5s",
"boot_command": [
"<enter><wait>",
"<f6><esc>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs>",
"/install/vmlinuz ",
"initrd=/install/initrd.gz ",
"net.ifnames=0 ",
"biosdevname=0 ",
"auto-install/enable=true ",
"debconf/priority=critical ",
"preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/{{user `vm_name`}}-preseed.cfg ",
"<enter>"
],
"ssh_timeout": "{{user `ssh_timeout`}}",
"ssh_username": "ubuntu",
"ssh_password": "ubuntu",
"shutdown_command": "sudo poweroff",
"vnc_bind_address": "0.0.0.0",
"qemuargs": [
["-m", "{{user `memory`}}"],
["-smp", "{{user `cpus`}}"]
]
}],
"provisioners": [{
"type": "shell",
"scripts": [
"scripts/env.sh",
"scripts/apt.sh",
"scripts/sshd.sh",
"scripts/cleanup.sh",
"scripts/sshkey.sh"
]
}],
"post-processors": [{
"type": "manifest",
"strip_path": true,
"output": "packer-artifacts/{{user `vm_name`}}.manifest"
}],
"variables": {
"vm_name": "qemu-ubuntu-bionic",
"compression_level": "6",
"cpus": "2",
"disk_size": "5000",
"headless": "true",
"iso_checksum": "1413c9797dbfa1e57fabfb5c91cfb96f",
"iso_checksum_type": "md5",
"iso_url": "http://old-releases.ubuntu.com/releases/18.04.0/ubuntu-18.04-server-amd64.iso",
"memory": "2048",
"ssh_timeout": "60m"
}
}