-
Notifications
You must be signed in to change notification settings - Fork 93
/
vsphere-remote-ubuntu-16.04.json
118 lines (118 loc) · 4.43 KB
/
vsphere-remote-ubuntu-16.04.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{
"variables": {
"vm_name": "ubuntu-xenial",
"cpu": "2",
"ram_size": "2048",
"disk_size": "21440",
"iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.3-server-amd64.iso",
"iso_checksum_type": "sha1",
"iso_checksum": "F3532991E031CAE75BCF5E695AFB844DD278FFF9",
"vsphere_host": "{{env `vsphere_host`}}",
"vsphere_datacenter": "{{env `vsphere_datacenter`}}",
"vsphere_cluster": "{{env `vsphere_cluster`}}",
"vsphere_resource_pool": "{{env `vsphere_resource_pool`}}",
"vsphere_datastore": "{{env `vsphere_datastore`}}",
"vsphere_cache_datastore": "{{env `vsphere_datastore`}}",
"vsphere_cache_directory": "iso_cache",
"vsphere_vm_network": "{{env `vsphere_vm_network`}}",
"vsphere_username": "{{env `vsphere_username`}}",
"vsphere_password": "{{env `vsphere_password`}}",
"vsphere_ethernet0_dvs_switch_id":"50 21 6c c7 55 a8 c0 ef-e3 64 b4 cd bc 81 c4 a3",
"vsphere_ethernet0_dvs_portgroup_id" : "dvportgroup-152",
"username" : "vagrant",
"password" : "vagrant"
},
"builders": [
{
"vm_name":"{{user `vm_name`}}",
"output_directory": "output-{{user `vm_name`}}",
"remote_type":"esx5",
"remote_host":"{{user `vsphere_cluster`}}",
"remote_datastore":"{{user `vsphere_datastore`}}",
"remote_cache_datastore":"{{user `vsphere_cache_datastore`}}",
"remote_cache_directory":"{{user `vsphere_cache_directory`}}",
"remote_username":"{{user `vsphere_username`}}",
"remote_password": "{{user `vsphere_password`}}",
"type": "vmware-iso",
"boot_wait": "5s",
"disk_size": "{{user `disk_size`}}",
"disk_type_id": "thin",
"floppy_files": [
"./linux/ubuntu/http/preseed.cfg"
],
"guest_os_type": "ubuntu-64",
"headless": true,
"iso_url": "{{user `iso_url`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"communicator":"ssh",
"ssh_username": "{{user `username`}}",
"ssh_password": "{{user `password`}}",
"ssh_timeout": "4h",
"boot_command": [
"<esc><wait10><esc><esc><enter><wait>",
"set gfxpayload=1024x768<enter>",
"linux /install/vmlinuz ",
"preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/preseed.cfg ",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
"hostname={{.Name}} ",
"fb=false debconf/frontend=noninteractive ",
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
"keyboard-configuration/variant=USA console-setup/ask_detect=false <enter>",
"initrd /install/initrd.gz<enter>",
"boot<enter>"
],
"shutdown_command": "echo 'vagrant' | sudo -S -E shutdown -P now",
"skip_compaction": false,
"vmx_data": {
"gui.fitguestusingnativedisplayresolution": "FALSE",
"memsize": "{{user `ram_size`}}",
"numvcpus": "{{user `cpu`}}",
"virtualHW.version": "10",
"scsi0.virtualDev": "lsisas1068",
"ethernet0.virtualDev": "vmxnet3",
"ethernet0.present": "TRUE",
"ethernet0.connectionType":"bridged",
"ethernet0.startConnected" : "TRUE",
"ethernet0.dvs.switchId":"{{user `vsphere_ethernet0_dvs_switch_id`}}",
"ethernet0.dvs.portgroupId" : "{{user `vsphere_ethernet0_dvs_portgroup_id`}}"
},
"vmx_data_post": {
"ide0:0.startConnected": "FALSE",
"ide0:1.startConnected": "FALSE",
"ide1:0.startConnected": "FALSE",
"ide1:1.startConnected": "FALSE",
"ide0:0.deviceType": "cdrom-raw",
"ide0:1.deviceType": "cdrom-raw",
"ide1:0.deviceType": "cdrom-raw",
"ide1:1.deviceType": "cdrom-raw",
"ide0:0.clientDevice": "TRUE",
"ide0:1.clientDevice": "TRUE",
"ide1:0.clientDevice": "TRUE",
"ide1:1.clientDevice": "TRUE",
"ide0:0.present": "FALSE",
"ide0:1.present": "FALSE",
"ide1:0.present": "TRUE",
"ide1:1.present": "FALSE",
"ide0:0.fileName": "emptyBackingString",
"ide0:1.fileName": "emptyBackingString",
"ide1:0.fileName": "emptyBackingString",
"ide1:1.fileName": "emptyBackingString"
}
}],
"provisioners": [{
"type": "shell",
"execute_command": "echo 'vagrant' | sudo -S -E sh {{.Path}}",
"scripts": [
"./linux/ubuntu/update.sh",
"./linux/ubuntu/network.sh",
"./linux/common/vmware.sh",
"./linux/common/vagrant.sh",
"./linux/common/chef.sh",
"./linux/common/motd.sh",
"./linux/ubuntu/cleanup.sh"
]
}],
"post-processors": [
]
}