parent
89c5fb17e4
commit
20c827d92f
@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||
<servicing/>
|
||||
<settings pass="windowsPE">
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<DiskConfiguration>
|
||||
<Disk wcm:action="add">
|
||||
<CreatePartitions>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Type>Primary</Type>
|
||||
<Extend>true</Extend>
|
||||
</CreatePartition>
|
||||
</CreatePartitions>
|
||||
<ModifyPartitions>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Extend>false</Extend>
|
||||
<Format>NTFS</Format>
|
||||
<Letter>C</Letter>
|
||||
<Order>1</Order>
|
||||
<PartitionID>1</PartitionID>
|
||||
<Label>SystemDrive</Label>
|
||||
</ModifyPartition>
|
||||
</ModifyPartitions>
|
||||
<DiskID>0</DiskID>
|
||||
<WillWipeDisk>true</WillWipeDisk>
|
||||
</Disk>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
</DiskConfiguration>
|
||||
<UserData>
|
||||
<AcceptEula>true</AcceptEula>
|
||||
<!--
|
||||
NOTE: If you are re-configuring this for use of a retail key
|
||||
and using a retail ISO, you need to adjust the <ProductKey> block
|
||||
below to look like this:
|
||||
|
||||
<ProductKey>
|
||||
<Key>33PXH-7Y6KF-2VJC9-XBBR8-HVTHH</Key>
|
||||
<WillShowUI>Never</WillShowUI>
|
||||
</ProductKey>
|
||||
|
||||
Notice the addition of the `<Key>` element.
|
||||
-->
|
||||
|
||||
<!-- Product Key from http://technet.microsoft.com/en-us/library/jj612867.aspx -->
|
||||
<ProductKey>
|
||||
NPPR9-FWDCX-D2C8J-H872K-2YT43
|
||||
<WillShowUI>Never</WillShowUI>
|
||||
</ProductKey>
|
||||
</UserData>
|
||||
<ImageInstall>
|
||||
<OSImage>
|
||||
<InstallTo>
|
||||
<DiskID>0</DiskID>
|
||||
<PartitionID>1</PartitionID>
|
||||
</InstallTo>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
<InstallToAvailablePartition>false</InstallToAvailablePartition>
|
||||
<InstallFrom>
|
||||
<MetaData wcm:action="add">
|
||||
<Key>/IMAGE/NAME</Key>
|
||||
<Value>Windows 10 Enterprise Evaluation</Value>
|
||||
</MetaData>
|
||||
</InstallFrom>
|
||||
</OSImage>
|
||||
</ImageInstall>
|
||||
</component>
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<SetupUILanguage>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
</SetupUILanguage>
|
||||
<InputLocale>en-US</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
</settings>
|
||||
<!--
|
||||
<settings pass="offlineServicing">
|
||||
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<EnableLUA>false</EnableLUA>
|
||||
</component>
|
||||
</settings>
|
||||
-->
|
||||
<settings pass="oobeSystem">
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<UserAccounts>
|
||||
<AdministratorPassword>
|
||||
<Value>V@grant123</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</AdministratorPassword>
|
||||
<LocalAccounts>
|
||||
<LocalAccount wcm:action="add">
|
||||
<Password>
|
||||
<Value>V@grant123</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Description>Vagrant User</Description>
|
||||
<DisplayName>vagrant</DisplayName>
|
||||
<Group>administrators</Group>
|
||||
<Name>vagrant</Name>
|
||||
</LocalAccount>
|
||||
</LocalAccounts>
|
||||
</UserAccounts>
|
||||
<OOBE>
|
||||
<HideEULAPage>true</HideEULAPage>
|
||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||
<NetworkLocation>Home</NetworkLocation>
|
||||
<ProtectYourPC>1</ProtectYourPC>
|
||||
</OOBE>
|
||||
<AutoLogon>
|
||||
<Password>
|
||||
<Value>V@grant123</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Username>vagrant</Username>
|
||||
<Enabled>true</Enabled>
|
||||
</AutoLogon>
|
||||
<FirstLogonCommands>
|
||||
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c powershell -ExecutionPolicy Unrestricted -Command "Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force"</CommandLine>
|
||||
<Description>Set Execution Policy</Description>
|
||||
<Order>1</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<!-- This task MUST include enabling winrm for Packer to be able to continue -->
|
||||
<CommandLine>powershell.exe -File A:\autounattend-postinstall.ps1</CommandLine>
|
||||
<Description>Run Postinstall Script</Description>
|
||||
<Order>99</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
|
||||
</FirstLogonCommands>
|
||||
<ShowWindowsLive>false</ShowWindowsLive>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="specialize">
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<OEMInformation>
|
||||
<HelpCustomized>false</HelpCustomized>
|
||||
</OEMInformation>
|
||||
<!-- Rename computer here. -->
|
||||
<ComputerName>vagrant-10-amd64</ComputerName>
|
||||
<TimeZone>Central Standard Time</TimeZone>
|
||||
<RegisteredOwner/>
|
||||
</component>
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<SkipAutoActivation>true</SkipAutoActivation>
|
||||
</component>
|
||||
</settings>
|
||||
<cpi:offlineImage xmlns:cpi="urn:schemas-microsoft-com:cpi" cpi:source="catalog:d:/sources/install_windows 7 ENTERPRISE.clg"/>
|
||||
</unattend>
|
@ -0,0 +1,31 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.require_version ">= 1.6.2"
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.define "vagrant-windows-10"
|
||||
config.vm.box = "windows_10_x64_virtualbox.box"
|
||||
config.vm.communicator = "winrm"
|
||||
|
||||
# Admin user name and password
|
||||
config.winrm.username = "vagrant"
|
||||
config.winrm.password = "V@grant123"
|
||||
|
||||
config.vm.guest = :windows
|
||||
config.windows.halt_timeout = 15
|
||||
|
||||
config.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true
|
||||
|
||||
config.vm.provider :virtualbox do |v, override|
|
||||
#v.gui = true
|
||||
v.customize ["modifyvm", :id, "--memory", 2048]
|
||||
v.customize ["modifyvm", :id, "--cpus", 1]
|
||||
v.customize ["setextradata", "global", "GUI/SuppressMessages", "all" ]
|
||||
v.customize ["modifyvm", :id, "--accelerate2dvideo", "on"]
|
||||
v.customize ["modifyvm", :id, "--vram", 128]
|
||||
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
|
||||
v.customize ["modifyvm", :id, "--draganddrop", "bidirectional"]
|
||||
end
|
||||
|
||||
end
|
@ -0,0 +1,56 @@
|
||||
{
|
||||
"variables": {
|
||||
"output_directory": "packer-output"
|
||||
},
|
||||
"builders": [
|
||||
{
|
||||
"type": "virtualbox-iso",
|
||||
"iso_url": "http://care.dlservice.microsoft.com/dl/download/C/3/9/C399EEA8-135D-4207-92C9-6AAB3259F6EF/10240.16384.150709-1700.TH1_CLIENTENTERPRISEEVAL_OEMRET_X64FRE_EN-US.ISO",
|
||||
"iso_checksum_type": "sha1",
|
||||
"iso_checksum": "56ab095075be28a90bc0b510835280975c6bb2ce",
|
||||
"headless": true,
|
||||
"boot_wait": "2m",
|
||||
"communicator": "winrm",
|
||||
"winrm_username": "vagrant",
|
||||
"winrm_password": "V@grant123",
|
||||
"winrm_timeout": "24h",
|
||||
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
|
||||
"guest_os_type": "Windows10_64",
|
||||
"disk_size": 61440,
|
||||
"guest_additions_mode": "attach",
|
||||
"floppy_files": [
|
||||
"./Autounattend.xml",
|
||||
"../../scripts/win-updates.ps1",
|
||||
"../../scripts/enable-winrm.ps1",
|
||||
"../../scripts/wintriallab-postinstall.psm1",
|
||||
"../../scripts/autounattend-postinstall.ps1",
|
||||
"../../scripts/provisioner-postinstall.ps1"
|
||||
],
|
||||
"vboxmanage": [
|
||||
["setextradata", "global", "GUI/SuppressMessages", "all" ],
|
||||
["modifyvm", "{{.Name}}", "--memory", "2048" ],
|
||||
["modifyvm", "{{.Name}}", "--cpus", "2" ],
|
||||
["modifyvm", "{{.Name}}", "--clipboard", "bidirectional"],
|
||||
["modifyvm", "{{.Name}}", "--draganddrop", "bidirectional"],
|
||||
["modifyvm", "{{.Name}}", "--accelerate2dvideo", "on"],
|
||||
["modifyvm", "{{.Name}}", "--vram", 128]
|
||||
]
|
||||
}
|
||||
],
|
||||
"provisioners": [
|
||||
|
||||
{
|
||||
"type": "powershell",
|
||||
"inline": ["A:\\provisioner-postinstall.ps1 -Verbose"]
|
||||
}
|
||||
|
||||
],
|
||||
"post-processors": [
|
||||
{
|
||||
"type": "vagrant",
|
||||
"keep_input_artifact": false,
|
||||
"output": "{{user `output_directory`}}/windows_10_x64_{{.Provider}}.box",
|
||||
"vagrantfile_template": "vagrantfile-windows_10_x64.template"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in new issue