-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathpacker-esxi.json
72 lines (72 loc) · 1.89 KB
/
packer-esxi.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
{
"variables": {
"iso_file": null,
"iso_checksum": "",
"disk_size": "40960",
"root_password": "Vagrant!23"
},
"builders": [
{
"name": "vmware-esxi",
"vm_name": "vmware-esxi",
"cpus": 2,
"memory": 4096,
"vmdk_name": "vmware-esxi-disk0",
"type": "vmware-iso",
"headless": false,
"disk_size": "{{ user `disk_size` }}",
"disk_type_id": 0,
"disk_adapter_type": "scsi",
"guest_os_type": "vmkernel6",
"iso_url": "{{user `iso_file`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"network_adapter_type": "vmxnet3",
"ssh_username": "root",
"ssh_password": "{{user `root_password`}}",
"ssh_wait_timeout": "60m",
"shutdown_command": "esxcli system maintenanceMode set -e true -t 0 ; esxcli system shutdown poweroff -d 10 -r 'Packer Shutdown' ; esxcli system maintenanceMode set -e false -t 0",
"http_directory": "scripts",
"boot_wait": "5s",
"version": 11,
"vmx_data": {
"scsi0.virtualdev": "pvscsi",
"vhv.enable": "TRUE"
},
"boot_command": [
"<enter><wait>O<wait> ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/esxi-kickstart.cfg<enter>"
]
}
],
"provisioners": [
{
"type": "file",
"source": "scripts/vagrant.pub",
"destination": "/etc/ssh/keys-root/authorized_keys"
},
{
"type": "shell",
"scripts": [
"scripts/esxi-settings.sh",
"scripts/esxi-dvfilter_install.sh"
]
},
{
"type": "file",
"source": "scripts/esxi-vnic-fix.sh",
"destination": "/etc/rc.local.d/local.sh"
},
{
"type": "shell",
"script": "scripts/esxi-cloning_configuration.sh"
}
],
"post-processors": [
[
{
"type": "vagrant",
"compression_level": 9,
"vagrantfile_template": "scripts/esxi-vagrantfile_template.rb"
}
]
]
}