Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ There are several versions of Windows Server. This is where you
decide which Vagrant VM should be started.

* `2019-box` - Windows Server 2019 (10.0.17763) LTS Channel, ___***prebuilt from Vagrant Cloud***___
* `2019-box-resized` - The above, with a 80G->150G resized disk.
* `2019` - Windows Server 2019 (10.0.17763) LTS Channel
* `1903` - Windows Server, version 1903 (10.0.18362) Semi-Annual Channel
* `1809` - Windows Server, version 1809 (10.0.17763) Semi-Annual Channel
Expand Down
7 changes: 7 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ Vagrant.configure("2") do |config|
cfg.vm.provision "shell", path: "scripts/create-machine.ps1", args: "-machineHome #{home} -machineName 2019-box"
end

config.vm.define "2019-box-resized", autostart: false do |cfg|
cfg.vm.box = "StefanScherer/windows_2019_docker"
cfg.vm.provision "shell", path: "scripts/create-machine.ps1", args: "-machineHome #{home} -machineName 2019-box-resized"
config.vagrant.plugins = "vagrant-disksize"
config.disksize.size = "150GB"
end

config.vm.define "insider", autostart: false do |cfg|
cfg.vm.box = "windows_server_insider_docker"
cfg.vm.provision "shell", path: "scripts/create-machine.ps1", args: "-machineHome #{home} -machineName insider"
Expand Down
6 changes: 6 additions & 0 deletions scripts/create-machine.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ param ([String] $machineHome, [String] $machineName, [String] $machineIp, [Switc

$ErrorActionPreference = 'Stop';

# Extend volume 1 to the full size of the resized disk
Set-Content -Value "select volume 1" -Path C:\diskpart.txt
Add-Content -Value "extend" -Path C:\diskpart.txt
diskpart /s C:\diskpart.txt
del C:\diskpart.txt

if (!(Test-Path $env:USERPROFILE\.docker)) {
mkdir $env:USERPROFILE\.docker
}
Expand Down