forked from AntonioMeireles/ClearLinux-packer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer.conf.vmware.json
69 lines (69 loc) · 1.55 KB
/
packer.conf.vmware.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
{
"variables": {
"cloud_token": "{{ env `VAGRANT_CLOUD_TOKEN` }}",
"version": "{{ env `VERSION` }}",
"name": "{{ env `BOX_NAME` }}",
"box_tag": "{{ env `REPOSITORY` }}"
},
"builders": [
{
"type": "vmware-vmx",
"source_path": "media/clear-{{user `version`}}-vmware-factory/ClearLinux-{{user `version`}}.vmx",
"boot_wait": "20s",
"ssh_username": "clear",
"ssh_password": "V@grant!",
"output_directory": "boxes/tmp",
"ssh_port": 22,
"ssh_wait_timeout": "5m",
"vm_name": "{{ user `name` }}",
"shutdown_command": "cat /dev/zero > zero.fill; sync; sleep 5; sync; rm -f zero.fill; sudo shutdown -P now",
"vmx_data": {
"cpuid.coresPerSocket": "1",
"memsize": "2048",
"numvcpus": "2"
},
"vmx_data_post": {
"cleanShutdown": "TRUE",
"softPowerOff": "FALSE",
"ethernet0.startConnected": "TRUE",
"ethernet0.wakeonpcktrcv": "false"
}
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"sudo timedatectl set-ntp true"
],
"pause_before": "5s"
}, {
"type": "shell",
"expect_disconnect": true,
"start_retry_timeout": "600s",
"inline": [
"echo 'rebooting...'",
"sudo reboot"
]
}, {
"type": "shell",
"inline": [
"uname -a; swupd info"
],
"pause_before": "5s"
}
],
"post-processors": [
[
{
"type": "vagrant",
"output": "boxes/{{ .Provider }}/{{user `name` }}-{{ user `version`}}.{{ .Provider }}.box",
"compression_level": 9,
"vagrantfile_template": "Vagrantfile.template.rb",
"include": [
"info.json"
]
}
]
]
}