Skip to content

Instantly share code, notes, and snippets.

@sannae
Created August 18, 2021 14:56
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sannae/07cd210478336f6f8aa571636f33b06b to your computer and use it in GitHub Desktop.
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
# -*- 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