-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathVagrantfile
59 lines (49 loc) · 1.77 KB
/
Vagrantfile
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
Write-Host "Enabling Hyper-V and Containers feature."
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All -NoRestart
. sc.exe config winrm start= delayed-auto
SCRIPT
$script2 = <<SCRIPT2
. sc.exe config winrm start= auto
iwr -useb https://chocolatey.org/install.ps1 | iex
choco install -y docker-desktop -pre -version 2.0.3.0-edge
SCRIPT2
Vagrant.configure("2") do |config|
config.vm.box = "StefanScherer/windows_10"
config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true
config.vm.communicator = "winrm"
config.winrm.username = "vagrant"
config.winrm.password = "vagrant"
config.vm.guest = :windows
config.windows.halt_timeout = 15
config.vm.provision "shell", inline: $script, privileged: false
config.vm.provision "reload"
config.vm.provision "shell", inline: $script2, privileged: true, powershell_elevated_interactive: true
config.vm.provision "reload"
["vmware_fusion", "vmware_workstation"].each do |provider|
config.vm.provider provider do |v, override|
v.gui = true
v.memory = "5120"
v.cpus = "2"
v.vmx["vhv.enable"] = "TRUE"
end
end
config.vm.provider "vmware_fusion" do |v|
v.vmx["gui.fitguestusingnativedisplayresolution"] = "TRUE"
v.vmx["mks.enable3d"] = "TRUE"
v.vmx["mks.forceDiscreteGPU"] = "TRUE"
v.vmx["gui.fullscreenatpoweron"] = "TRUE"
v.vmx["gui.viewmodeatpoweron"] = "fullscreen"
v.vmx["gui.lastPoweredViewMode"] = "fullscreen"
v.enable_vmrun_ip_lookup = false
end
config.vm.provider "virtualbox" do |v|
v.gui = true
v.memory = "5120"
v.cpus = "2"
v.linked_clone = true
end
end