forked from rgl/windows-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
windows-2016.json
158 lines (158 loc) · 4.83 KB
/
windows-2016.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
{
"variables": {
"disk_size": "61440",
"iso_url": "https://software-download.microsoft.com/download/pr/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO",
"iso_checksum": "1ce702a578a3cb1ac3d14873980838590f06d5b7101c5daaccbac9d73f1fb50f",
"iso_checksum_type": "sha256"
},
"builders": [
{
"name": "windows-2016-amd64-libvirt",
"type": "qemu",
"accelerator": "kvm",
"cpus": 2,
"memory": 6144,
"qemuargs": [
["-cpu", "host"],
["-soundhw", "hda"],
["-usbdevice", "tablet"],
["-device", "virtio-net,netdev=user.0"],
["-vga", "qxl"],
["-device", "virtio-serial-pci"],
["-chardev", "socket,path=/tmp/{{.Name}}-qga.sock,server,nowait,id=qga0"],
["-device", "virtserialport,chardev=qga0,name=org.qemu.guest_agent.0"],
["-chardev", "spicevmc,id=spicechannel0,name=vdagent"],
["-device", "virtserialport,chardev=spicechannel0,name=com.redhat.spice.0"],
["-spice", "unix,addr=/tmp/{{.Name}}-spice.socket,disable-ticketing"]
],
"headless": true,
"format": "qcow2",
"disk_size": "{{user `disk_size`}}",
"disk_interface": "virtio",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"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\"",
"http_directory": ".",
"floppy_files": [
"windows-2016/autounattend.xml",
"winrm.ps1",
"drivers/vioserial/2k16/amd64/*.cat",
"drivers/vioserial/2k16/amd64/*.inf",
"drivers/vioserial/2k16/amd64/*.sys",
"drivers/viostor/2k16/amd64/*.cat",
"drivers/viostor/2k16/amd64/*.inf",
"drivers/viostor/2k16/amd64/*.sys",
"drivers/NetKVM/2k16/amd64/*.cat",
"drivers/NetKVM/2k16/amd64/*.inf",
"drivers/NetKVM/2k16/amd64/*.sys",
"drivers/qxldod/2k16/amd64/*.cat",
"drivers/qxldod/2k16/amd64/*.inf",
"drivers/qxldod/2k16/amd64/*.sys"
]
},
{
"name": "windows-2016-amd64-virtualbox",
"type": "virtualbox-iso",
"guest_os_type": "Windows2016_64",
"guest_additions_mode": "attach",
"headless": true,
"cpus": 2,
"memory": 6144,
"vboxmanage": [
["modifyvm", "{{.Name}}", "--vram", "64"],
["modifyvm", "{{.Name}}", "--audio", "none"],
["modifyvm", "{{.Name}}", "--nictype1", "82540EM"],
["modifyvm", "{{.Name}}", "--nictype2", "82540EM"],
["modifyvm", "{{.Name}}", "--nictype3", "82540EM"],
["modifyvm", "{{.Name}}", "--nictype4", "82540EM"]
],
"disk_size": "{{user `disk_size`}}",
"hard_drive_interface": "sata",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"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\"",
"floppy_files": [
"windows-2016/autounattend.xml",
"winrm.ps1"
]
}
],
"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": "libvirt-fix-cpu-driver.ps1"
},
{
"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"
}
],
"post-processors": [
{
"type": "vagrant",
"output": "{{.BuildName}}.box",
"vagrantfile_template": "Vagrantfile.template"
}
]
}