Created
August 18, 2021 14:56
-
-
Save sannae/07cd210478336f6f8aa571636f33b06b to your computer and use it in GitHub Desktop.
Very simple vagrantfile to spin up a WinServ2019 VM with Chocolatey and VS Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
# Box | |
config.vm.box = "StefanScherer/windows_2019" | |
# Additional parameters to communicate with Windows | |
config.vm.boot_timeout = 60 | |
config.vm.communicator = "winrm" | |
config.winrm.port = 55985 | |
# Customization | |
config.vm.provider "virtualbox" do |v| | |
v.name = "my_vms" | |
v.gui = true | |
v.memory = 1024 | |
v.customize ["modifyvm", :id, "--draganddrop", "hosttoguest"] # Enables drag-and-drop between host and guest | |
end | |
config.vm.network :forwarded_port, guest: 80, host: 8080, id: "http" | |
# Provisioning | |
config.vm.provision "shell", path: "scripts/InstallChocolatey.ps1" | |
config.vm.provision "shell", inline: "choco install vscode --yes" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment