forked from rgl/windows-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
windows-2019-vsphere.json
105 lines (105 loc) · 3.13 KB
/
windows-2019-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
{
"variables": {
"vsphere_disk_size": "61440",
"vsphere_iso_url": "[{{env `GOVC_DATASTORE`}}] iso/windows-2019-17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.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-2019-amd64-vsphere",
"vm_name": "windows-2019-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": 4096,
"CPUs": 4,
"iso_paths": [
"{{user `vsphere_iso_url`}}",
"{{user `vsphere_tools_iso_url`}}"
],
"floppy_files": [
"windows-2019/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"
},
{
"type": "powershell",
"script": "virtualbox-prevent-vboxsrv-resolution-delay.ps1"
},
{
"type": "windows-restart"
},
{
"type": "powershell",
"script": "provision.ps1"
},
{
"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"
}
]
}