-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnew-ubuntu1804.json
73 lines (72 loc) · 2.5 KB
/
new-ubuntu1804.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
{
"_comment": "Build with `packer build -var-file=ubuntu1804.json ubuntu.json`",
"variables": {
"boot_command_prefix": "<esc><esc><enter><wait>",
"cpus": "1",
"locale": "en_GB",
"memory": "512",
"no_proxy": "{{env `no_proxy`}}",
"preseed" : "preseed.cfg",
"rsync_proxy": "{{env `rsync_proxy`}}",
"hostname": "ubuntu1804",
"ssh_fullname": "ansible",
"ssh_password": "ansible",
"ssh_username": "ansible",
"accelerator": "kvm"
},
"builders":
[
{
"type": "qemu",
"iso_url": "/home/tux/play/packer/ubuntu-18.04.4-server-amd64.iso",
"iso_checksum": "e2ecdace33c939527cbc9e8d23576381c493b071107207d2040af72595f8990b",
"iso_checksum_type": "sha256",
"output_directory": "output_image",
"shutdown_command": "echo '{{ user `ssh_password` }}'|sudo -S shutdown -P now",
"disk_size": 5000,
"format": "raw",
"headless": true,
"accelerator": "{{ user `accelerator` }}",
"http_directory": "httpdir",
"http_port_min": 10082,
"http_port_max": 10089,
"ssh_host_port_min": 2222,
"ssh_host_port_max": 2229,
"ssh_username": "{{ user `ssh_username` }}",
"ssh_password": "{{ user `ssh_password` }}",
"ssh_port": 22,
"ssh_wait_timeout": "900m",
"vm_name": "ubuntu1804.img",
"net_device": "virtio-net",
"disk_interface": "virtio",
"boot_wait": "5s",
"qemuargs": [
[ "-m", "{{ user `memory` }}" ],
[ "-display", "none" ],
[ "-machine", "accel={{ user `accelerator` }}" ],
[ "-cpu", "host" ],
[ "-smp", "cpus={{ user `cpus`}}"]
],
"boot_command":
[
"{{ user `boot_command_prefix` }}",
"/install/vmlinuz noapic ",
"file=/floppy/{{ user `preseed` }} ",
"debian-installer={{ user `locale` }} auto locale={{ user `locale` }} kbd-chooser/method=us ",
"hostname={{ user `hostname` }} ",
"fb=false debconf/frontend=noninteractive ",
"keyboard-configuration/modelcode=SKIP ",
"keyboard-configuration/layout=gb ",
"keyboard-configuration/variant= console-setup/ask_detect=false ",
"passwd/user-fullname={{ user `ssh_fullname` }} ",
"passwd/user-password={{ user `ssh_password` }} ",
"passwd/user-password-again={{ user `ssh_password` }} ",
"passwd/username={{ user `ssh_username` }} ",
"initrd=/install/initrd.gz -- <enter>"
],
"floppy_files": [
"httpdir/{{ user `preseed` }}"
]
}
]
}