This collection of documents moves forward in three steps
- Create Autounattend.xml file(s)
- Create base box with veewee
- Create box with vagrant
Read the documents in that order, i.e.
- WindowsAIK.md
- Veewee.md
- Vagrant.md
These are the steps needed to create a working vagrant environment (windows and ubuntu).
This plugin
allows finer control of the /etc/hosts file in linux and is useful for servers with multiple network interfaces.
This document is intended to guide you in the creation of an Autounattend.xml file suitable for creation of base box images.
Create a Windows 7 virtual machine
I named my host w7-aik-61
. Run all the windows updates (2 or three restarts).
Duration: 1+ hour (predominately windows updates).
Virtual Clone Drive is an application that provides the capability to mount an ISO file in Windows.
Download and install the program.
Duration: 15 minutes.
Use a search engine for
The URL at the time of authoring is
The file is called KB3AIK_EN.iso and is 1.7GB in size.
Mount the ISO with Virtual Clone Drive and run StartCD.exe
if auto-run does not do so.
In the UI select Windows AIK Setup
to install the AIK.
Go to MSDN Subscriber Downloads, currently
and download
Generate and store the product keys in text files with the same name (but different extension) as the related ISO (for future ease of access).
The AIK needs a file from each of the ISOs.
AIK
Windows 7 Ultimate AMD64
D:\sources\install.wim
into the AIK\Windows 7 Ultimate AMD64
Repeat for the Windows Server 2012 image with a subfolder name of Windows Server 2012 AMD64
.
The general outline comes from this article on MSDN
Here are the general steps
Configuration pass | Component | Value |
---|---|---|
1 WindowsPE | Microsoft-Windows-International-Core-WinPE |
|
1 WindowsPE | Microsoft-Windows-International-Core-WinPE\SetupUILanguage |
|
1 WindowsPE | Microsoft-Windows-Setup\DiskConfiguration |
|
1 WindowsPE | Microsoft-Windows-Setup\DiskConfiguration\Disk |
|
1 WindowsPE | Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition |
|
1 WindowsPE | Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition |
|
1 WindowsPE | Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition |
|
1 WindowsPE | Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition |
|
1 WindowsPE | Microsoft-Windows-Setup\ImageInstall\OSImage |
|
1 WindowsPE | Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo |
|
1 WindowsPE | Microsoft-Windows-Setup\UserData |
|
1 WindowsPE | Microsoft-Windows-Setup\UserData\ProductKey |
|
4 Specialize | Optional: Microsoft-Windows-IE-InternetExplorer |
|
7 oobeSystem | Microsoft-Windows-Deployment\Reseal |
|
7 oobeSystem | Microsoft-Windows-Shell-Setup\OOBE |
|
I personally find it easier to create/modify the partitions one at a time (completing the information as I go) as changing the order property moves elements in the UI in a somewhat confusing (to myself at least) manner.
The settings needed for an unattended installation are documented here
Additional settings
Configuration Pass | Component | Value |
---|---|---|
7 oobeSystem | Microsoft-Windows-Shell-Setup/UserAccounts/AdministratorPassword | Value = vagrant |
7 oobeSystem | Microsoft-Windows-Shell-Setup/UserAccounts/LocalAccount |
Description = Vagrant System AccountDisplayName = VagrantGroup = administratorsName = vagrant
|
7 oobeSystem | Microsoft-Windows-Shell-Setup/UserAccounts/LocalAccount[name="vagrant"] |
Value = vagrant
|
7 oobeSystem | Microsoft-Windows-Shell-Setup/OOBE |
HideWirelessSetupInOOBE = trueNetworkLocation = work
|
7 oobeSystem | Microsoft-Windows-Shell-Setup/AutoLogon |
Enabled = trueUsername = vagrant
|
7 oobeSystem | Microsoft-Windows-Shell-Setup/AutoLogon/Password |
Value = vagrant
|
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = cmd.exe /c winrm quickconfig -qDescription = winrm quickconfig -qOrder = 1RequiresUserInput = true |
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = cmd.exe /c winrm quickconfig -transport:httpDescription = winrm quickconfig -transport:httpOrder = 2RequiresUserInput = true |
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = cmd.exe /c winrm set winrm/config @{MaxTimeoutms="1800000"}Description = Win RM MaxTimoutmsOrder = 3RequiresUserInput = true |
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = cmd.exe /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="300"}Description = Win RM MaxMemoryPerShellMBOrder = 4RequiresUserInput = true |
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = cmd.exe /c winrm set winrm/config/service @{AllowUnencrypted="true"}Description = Win RM AllowUnencryptedOrder = 5RequiresUserInput = true |
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = cmd.exe /c winrm set winrm/config/service/auth @{Basic="true"}Description = Win RM auth BasicOrder = 6RequiresUserInput = true |
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = cmd.exe /c winrm set winrm/config/client/auth @{Basic="true"}Description = Win RM auth BasicOrder = 7RequiresUserInput = true |
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = cmd.exe /c winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"}Description = Win RM listener Address/PortOrder = 8RequiresUserInput = true |
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = cmd.exe /c netsh advfirewall firewall set rule group="remote administration" new enable=yesDescription = Win RM adv firewall enableOrder = 9RequiresUserInput = true |
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = cmd.exe /c netsh firewall add portopening TCP 5985 "Port 5985" Description = Win RM port openOrder = 10RequiresUserInput = true |
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = cmd.exe /c net stop winrm Description = Stop Win RM Service Order = 11RequiresUserInput = true |
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = cmd.exe /c sc config winrm start= autoDescription = Win RM AutostartOrder = 12RequiresUserInput = true |
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = cmd.exe /c net start winrm Description = Start Win RM ServiceOrder = 13RequiresUserInput = true |
7 oobeSystem | Microsoft-Windows-Shell-Setup/FirstLogonCommands/SynchronousCommand |
CommandLine = powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"Description = Start Win RM ServiceOrder = 14RequiresUserInput = true |
4 specialize | Microsoft-Windows-Shell-Setup |
ComputerName = win-7-ult-amd64RegisteredOwner = VagrantTimeZone = Central Standard Time
|
4 specialize | Microsoft-Windows-Shell-Setup/OEMInformation |
HelpCustomized = false
|
4 specialize | Microsoft-Windows-Security-UX |
SkipAutoActivation = true
|
4 specialize | Security-Malware-Windows-Defender |
DisableAntiSpyware = true
|
3 generalize | Microsoft-Windows-Security-SPP |
SkipRearm = 1
|
2 offlineServicing | Microsoft-Windows-LUA-Settings |
EnableLUA = false
|
Location of sysprep is
C:\windows\system32\sysprep\sysprep.exe.