-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
85 lines (68 loc) · 3.79 KB
/
Makefile
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
help:
@echo type make build-libvirt or make build-virtualbox
build-windows-server-core-1709-libvirt: windows-server-core-1709-libvirt.box
build-windows-server-core-1709-virtualbox: windows-server-core-1709-virtualbox.box
build-windows-server-2016-libvirt: windows-server-2016-libvirt.box
build-windows-server-2016-virtualbox: windows-server-2016-virtualbox.box
build-server-insider-preview-libvirt: windows-server-insider-preview-libvirt.box
build-server-insider-preview-virtualbox: windows-server-insider-preview-virtualbox.box
windows-server-core-1709-libvirt.box: windows-server-core-1709.json windows-server-core-1709/autounattend.xml Vagrantfile.template *.ps1 drivers
rm -f $@
packer build -only=windows-server-core-1709-libvirt -on-error=abort windows-server-core-1709.json
@echo BOX successfully built!
@echo to add to local vagrant install do:
@echo vagrant box add -f windows-server-core-1709 $@
windows-server-core-1709-virtualbox.box: windows-server-core-1709.json windows-server-core-1709/autounattend.xml Vagrantfile.template *.ps1
rm -f $@
packer build -only=windows-server-core-1709-virtualbox -on-error=abort windows-server-core-1709.json
@echo BOX successfully built!
@echo to add to local vagrant install do:
@echo vagrant box add -f windows-server-core-1709 $@
windows-server-2016-libvirt.box: windows-server-2016.json windows-server-2016/autounattend.xml Vagrantfile.template *.ps1 drivers
rm -f $@
packer build -only=windows-server-2016-libvirt -on-error=abort windows-server-2016.json
@echo BOX successfully built!
@echo to add to local vagrant install do:
@echo vagrant box add -f windows-server-2016 $@
windows-server-2016-virtualbox.box: windows-server-2016.json windows-server-2016/autounattend.xml Vagrantfile.template *.ps1
rm -f $@
packer build -only=windows-server-2016-virtualbox -on-error=abort windows-server-2016.json
@echo BOX successfully built!
@echo to add to local vagrant install do:
@echo vagrant box add -f windows-server-2016 $@
windows-server-insider-preview-libvirt.box: windows-server-insider-preview.json windows-server-insider-preview/autounattend.xml Vagrantfile.template *.ps1 drivers
rm -f $@
packer build -only=windows-server-insider-preview-libvirt -on-error=abort windows-server-insider-preview.json
@echo BOX successfully built!
@echo to add to local vagrant install do:
@echo vagrant box add -f windows-server-insider-preview $@
windows-server-insider-preview-virtualbox.box: windows-server-insider-preview.json windows-server-insider-preview/autounattend.xml Vagrantfile.template *.ps1 drivers
rm -f $@
packer build -only=windows-server-insider-preview-virtualbox -on-error=abort windows-server-insider-preview.json
@echo BOX successfully built!
@echo to add to local vagrant install do:
@echo vagrant box add -f windows-server-insider-preview $@
drivers:
rm -rf drivers.tmp
mkdir -p drivers.tmp
@# see https://fedoraproject.org/wiki/Windows_Virtio_Drivers
wget -P drivers.tmp https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.141-1/virtio-win-0.1.141.iso
7z x -odrivers.tmp drivers.tmp/virtio-win-*.iso
mv drivers.tmp drivers
.PHONY: clean
clean:
rm -fr output-*
rm -f *.box
rm -f *.qcow2
windows-server-core-1709.qcow2: windows-server-core-1709-libvirt.box
@set -e; \
mv output-windows-server-core-1709-libvirt/* $@; \
rm -r output-windows-server-core-1709-libvirt
windows-server-2016.qcow2: windows-server-2016-libvirt.box
@set -e; \
mv output-windows-server-2016-libvirt/* $@; \
rm -r output-windows-server-2016-libvirt
windows-server-insider-preview.qcow2: windows-server-insider-preview-libvirt.box
@set -e; \
mv output-windows-server-insider-preview-libvirt/* $@; \
rm -r output-windows-server-insider-preview-libvirt