This repository has been archived by the owner on May 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathubuntu_esx_standalone.json
80 lines (80 loc) · 2.68 KB
/
ubuntu_esx_standalone.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
74
75
76
77
78
79
80
{
"variables": {
"boot_command_prefix": "",
"compression_level": "6",
"iso_checksum": "",
"iso_checksum_type": "",
"iso_url": "",
"vm_disk_adapter_type": "",
"vm_disk_size": "",
"vm_memory": "",
"vm_name": "",
"vm_ssh_password": "",
"vm_ssh_username": "",
"vm_vcpu": ""
},
"builders": [
{
"boot_command": [
"{{ user `boot_command_prefix` }}",
"/install/vmlinuz <wait>",
"auto <wait>",
"console-setup/ask_detect=false <wait>",
"console-setup/layoutcode=us <wait>",
"console-setup/modelcode=pc105 <wait>",
"debconf/frontend=noninteractive <wait>",
"debian-installer=en_US <wait>",
"fb=false <wait>",
"initrd=/install/initrd.gz <wait>",
"kbd-chooser/method=us <wait>",
"keyboard-configuration/layout=USA <wait>",
"keyboard-configuration/variant=USA <wait>",
"locale=en_US <wait>",
"netcfg/get_domain=vm <wait>",
"netcfg/get_hostname=packer <wait>",
"grub-installer/bootdev=/dev/sda <wait>",
"noapic <wait>",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu/preseed.cfg <wait>",
"-- <wait>",
"<enter><wait>"
],
"disk_adapter_type": "{{ user ` vm_disk_adapter_type` }}",
"disk_size": "{{ user `vm_disk_size` }}",
"disk_type_id": 0,
"guest_os_type": "ubuntu-64",
"headless": true,
"http_directory": "http",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_url": "{{ user `iso_url` }}",
"output_directory": "output-{{ user `vm_name` }}-{{ build_type }}-{{ timestamp }}",
"shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'packer'|sudo -S bash 'shutdown.sh'",
"ssh_password": "{{ user `vm_ssh_password` }}",
"ssh_username": "{{ user `vm_ssh_username` }}",
"ssh_wait_timeout": "60m",
"type": "vmware-iso",
"vm_name": "{{ user `vm_name` }}-{{ timestamp }}",
"vmx_data": {
"memsize": "{{ user `vm_memory` }}",
"numvcpus": "{{ user `vm_vcpu` }}"
}
}
],
"provisioners": [
{
"type": "shell",
"scripts": ["scripts/base.sh", "scripts/vmware.sh", "scripts/cleanup.sh"]
}
],
"post-processors": [
{
"type": "shell-local",
"inline": "/usr/local/bin/ovftool output-{{ user `vm_name` }}-{{ build_type }}-{{ timestamp }}/{{ user `vm_name` }}-{{ timestamp }}.vmx output-{{ user `vm_name` }}-{{ build_type }}-{{ timestamp }}/{{ user `vm_name` }}-{{ timestamp }}.ovf"
},
{
"type": "manifest",
"output": "manifest.json",
"strip_path": true
}
]
}