forked from rgl/windows-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
windows-2016-vsphere.json
115 lines (115 loc) · 3.37 KB
/
windows-2016-vsphere.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
{
"variables": {
"vsphere_disk_size": "61440",
"vsphere_iso_url": "[{{env `GOVC_DATASTORE`}}] iso/windows-2016-Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO",
"vsphere_tools_iso_url": "[{{env `GOVC_DATASTORE`}}] iso/VMware-tools-windows-11.0.1-14773994.iso",
"vsphere_host": "{{env `GOVC_HOST`}}",
"vsphere_username": "{{env `GOVC_USERNAME`}}",
"vsphere_password": "{{env `GOVC_PASSWORD`}}",
"vsphere_esxi_host": "{{env `VSPHERE_ESXI_HOST`}}",
"vsphere_datacenter": "{{env `GOVC_DATACENTER`}}",
"vsphere_cluster": "{{env `GOVC_CLUSTER`}}",
"vsphere_datastore": "{{env `GOVC_DATASTORE`}}",
"vsphere_folder": "{{env `VSPHERE_TEMPLATE_FOLDER`}}",
"vsphere_network": "{{env `VSPHERE_VLAN`}}"
},
"sensitive-variables": [
"vsphere_password"
],
"builders": [
{
"name": "windows-2016-amd64-vsphere",
"vm_name": "windows-2016-amd64-vsphere",
"type": "vsphere-iso",
"guest_os_type": "windows9Server64Guest",
"disk_size": "{{user `vsphere_disk_size`}}",
"disk_thin_provisioned": true,
"disk_controller_type": "pvscsi",
"vcenter_server": "{{user `vsphere_host`}}",
"username": "{{user `vsphere_username`}}",
"password": "{{user `vsphere_password`}}",
"insecure_connection": "true",
"datacenter": "{{user `vsphere_datacenter`}}",
"cluster": "{{user `vsphere_cluster`}}",
"host": "{{user `vsphere_esxi_host`}}",
"folder": "{{user `vsphere_folder`}}",
"datastore": "{{user `vsphere_datastore`}}",
"network_card": "vmxnet3",
"network": "{{user `vsphere_network`}}",
"convert_to_template": false,
"RAM": 6144,
"CPUs": 4,
"iso_paths": [
"{{user `vsphere_iso_url`}}",
"{{user `vsphere_tools_iso_url`}}"
],
"floppy_files": [
"windows-2016/autounattend.xml",
"vmtools.ps1",
"winrm.ps1"
],
"communicator": "winrm",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout": "4h",
"shutdown_command": "shutdown /s /t 0 /f /d p:4:1 /c \"Packer Shutdown\""
}
],
"provisioners": [
{
"type": "powershell",
"script": "disable-windows-updates.ps1"
},
{
"type": "powershell",
"inline": "Uninstall-WindowsFeature Windows-Defender-Features"
},
{
"type": "powershell",
"inline": "Uninstall-WindowsFeature FS-SMB1"
},
{
"type": "powershell",
"script": "virtualbox-prevent-vboxsrv-resolution-delay.ps1"
},
{
"type": "windows-restart"
},
{
"type": "powershell",
"script": "provision.ps1"
},
{
"type": "windows-update",
"filters": [
"include:$_.Title -like '*Servicing Stack Update for Windows*'"
]
},
{
"type": "windows-update"
},
{
"type": "powershell",
"script": "enable-remote-desktop.ps1"
},
{
"type": "powershell",
"script": "provision-openssh.ps1"
},
{
"type": "windows-restart"
},
{
"type": "powershell",
"script": "provision-cloudbase-init.ps1"
},
{
"type": "powershell",
"script": "eject-media.ps1"
},
{
"type": "powershell",
"script": "optimize.ps1"
}
]
}