/vagrant-windows-server-2019

Packer template for Windows Server 2019 Vagrant box

Primary LanguagePowerShellThe UnlicenseUnlicense

Packer template for Windows Server 2019 Vagrant box

Minimalist packer template for running Windows Server 2019 standard in a vagrant box with VirtualBox provider.

Based on excellent work by Dr. Gusztáv Varga - refactored for minimalism and being able to run in a Linux environment without chef.

Features

  • User/pass: vagrant/vagrant
  • Auto login for user vagrant
  • WinRM set up for insecure (HTTP) unattended access (do not use in production)
  • OpenSSH instlled and set up for unattended access
  • Chocolatey installed
  • Remote desktop enabled
  • VirtualBox guest additions installed
  • OS configuration steps for better VM compliance:
    • Windows updates disabled
    • Windows Defender disabled
    • Maintenance disabled
    • UAC disabled
    • StorageSense disabled
    • Network discovery wizard disabled
    • Restore engine disabled

Note: Autogenerated from vanilla Windows Server image. License is not provided (of course), system is running in 180 day evaluation mode

Usage

Vagrant cloud

Available at: https://app.vagrantup.com/mcree/boxes/win2019

Build instructions

  1. Install dependencies:
  • packer - v1.4.5 and earlier seem to work correctly, v1.5.0+ reports json errors for reasons yet unknown to me
  • VirtualBox - v5.0 or later
  • Vagrant (optional, tested with v2.2.7)
  1. git clone https://github.com/mcree/vagrant-windows-server-2019.git
  2. cd vagrant-windows-server-2019
  3. packer build .
  4. vagrant box add --name win2019 win2019-*.box (optional)

Vagrantfile for simple usage

Vagrant.configure("2") do |config|
  config.vm.provider "virtualbox" do |vb|
     config.vm.box = "win2019"
     vb.gui = true
     vb.memory = 4096
     vb.cpus = 1
  end
end