Skip to content

Commit

Permalink
Merge pull request #29 from hh/windows+2012+8
Browse files Browse the repository at this point in the history
Windows+2012+8
  • Loading branch information
Hippie Hacker committed Mar 18, 2013
2 parents b09e811 + c756eb1 commit 8fdee08
Show file tree
Hide file tree
Showing 20 changed files with 694 additions and 7 deletions.
8 changes: 6 additions & 2 deletions definitions/.windows/install-chef.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
cmd /C cscript %TEMP%\wget.vbs /url:http://www.opscode.com/chef/install.msi /path:%TEMP%\chef-client.msi
cmd /C msiexec /qn /i %TEMP%\chef-client.msi
timeout 10
REM sleeping to give outbound networking a chance to come up
cmd /C cscript wget.vbs /url:http://www.opscode.com/chef/install.msi /path:chef-client.msi
cmd /C msiexec /qn /i chef-client.msi


2 changes: 1 addition & 1 deletion definitions/.windows/install-vbox.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ REM with this, we can open the iso, and extract the VBoxWindowsAdditions.exe!
REM http://downloads.sourceforge.net/sevenzip/7z920.exe
cmd /c certutil -addstore -f "TrustedPublisher" a:oracle-cert.cer
cmd /c e:\VBoxWindowsAdditions-amd64.exe /S
cmd /c shutdown.exe /r /t 0 /d p:2:4 /c "Vagrant reboot for VBoxWindowsAdditions"
cmd /c shutdown.exe /r /t 5 /d p:2:4 /c "Vagrant reboot for VBoxWindowsAdditions"

2 changes: 1 addition & 1 deletion definitions/.windows/mount-validation.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REM This is so we can pass the validation test
REM This is so we can pass the validation test... I don't know that it's necessary
cmd /c net use z: \\vboxsrv\veewee-validation

2 changes: 1 addition & 1 deletion definitions/.windows/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:postinstall_files => [
"install-chef.bat",
"install-vbox.bat", # would be interesting to only include this on vbox
"mount-validation.bat" # maybe test if we are within a vbox vm?
# "mount-validation.bat" # maybe test if we are within a vbox vm?
# because this will eventually run on kvm, openstack, etc etc
],
:video_memory_size => '48',
Expand Down
4 changes: 3 additions & 1 deletion definitions/windows-2008r2-standard/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
:iso_download_instructions => "Download and install full featured software for 180-day trial at http://technet.microsoft.com/en-us/evalcenter/dd459137.aspx",
:iso_src => iso_src,
:iso_file => File.basename(iso_src),
:iso_md5 => "4263be2cf3c59177c45085c0a7bc6ca5"
:iso_md5 => "4263be2cf3c59177c45085c0a7bc6ca5",
:kickstart_port => "7150"

})

Veewee::Session.declare session
Expand Down
230 changes: 230 additions & 0 deletions definitions/windows-2012-standard/Autounattend.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<servicing></servicing>

<settings pass="windowsPE">

<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<DiskConfiguration>
<Disk wcm:action="add">

<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Size>20000</Size>
</CreatePartition>
</CreatePartitions>

<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Extend>false</Extend>
<Format>NTFS</Format>
<Letter>C</Letter>
<Order>1</Order>
<PartitionID>1</PartitionID>
<Label>Windows 2008R2</Label>
</ModifyPartition>
</ModifyPartitions>

<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>

</Disk>
<WillShowUI>OnError</WillShowUI>
</DiskConfiguration>

<UserData>
<!-- Product Key from http://technet.microsoft.com/en-us/library/ff793406.aspx -->
<ProductKey>YC6KT-GKW9T-YTKYR-T4X34-R7VHC
<WillShowUI>Never</WillShowUI>
</ProductKey>

<AcceptEula>true</AcceptEula>
<FullName>Vagrant Fullname</FullName>
<Organization>Vagrant Inc</Organization>
</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 Server 2008 R2 SERVERSTANDARD</Value>
</MetaData>
</InstallFrom>
</OSImage>
</ImageInstall>

</component>

<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<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="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserAccounts>
<AdministratorPassword>
<Value>vagrant</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value>vagrant</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>
</OOBE>
<AutoLogon>
<Password>
<Value>vagrant</Value>
<PlainText>true</PlainText>
</Password>
<Username>administrator</Username>
<Enabled>true</Enabled>
</AutoLogon>
<FirstLogonCommands>
<!-- <SynchronousCommand wcm:action="add"> -->
<!-- <CommandLine>cmd.exe /c a:install-cygwin-sshd.bat</CommandLine> -->
<!-- <Description>Install Cygwin SSH</Description> -->
<!-- <Order>1</Order> -->
<!-- <RequiresUserInput>true</RequiresUserInput> -->
<!-- </SynchronousCommand> -->
<!-- <SynchronousCommand wcm:action="add"> -->
<!-- <CommandLine>cmd.exe /c a:install-winrm.bat</CommandLine> -->
<!-- <Description>Install Win RM</Description> -->
<!-- <Order>2</Order> -->
<!-- <RequiresUserInput>true</RequiresUserInput> -->
<!-- </SynchronousCommand> -->
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c winrm quickconfig -q</CommandLine>
<Description>winrm quickconfig -q</Description>
<Order>1</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c winrm quickconfig -transport:http</CommandLine>
<Description>winrm quickconfig -transport:http</Description>
<Order>2</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c winrm set winrm/config @{MaxTimeoutms="1800000"}</CommandLine>
<Description>Win RM MaxTimoutms</Description>
<Order>3</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="300"}</CommandLine>
<Description>Win RM MaxMemoryPerShellMB</Description>
<Order>4</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c winrm set winrm/config/service @{AllowUnencrypted="true"}</CommandLine>
<Description>Win RM AllowUnencrypted</Description>
<Order>5</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c winrm set winrm/config/service/auth @{Basic="true"}</CommandLine>
<Description>Win RM auth Basic</Description>
<Order>6</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c winrm set winrm/config/client/auth @{Basic="true"}</CommandLine>
<Description>Win RM auth Basic</Description>
<Order>7</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"} </CommandLine>
<Description>Win RM listener Address/Port</Description>
<Order>8</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c netsh advfirewall firewall set rule group="remote administration" new enable=yes </CommandLine>
<Description>Win RM adv firewall enable</Description>
<Order>9</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c netsh firewall add portopening TCP 5985 "Port 5985" </CommandLine>
<Description>Win RM port open</Description>
<Order>10</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c net stop winrm </CommandLine>
<Description>Stop Win RM Service </Description>
<Order>11</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c sc config winrm start= auto</CommandLine>
<Description>Win RM Autostart</Description>
<Order>12</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c net start winrm </CommandLine>
<Description>Start Win RM Service</Description>
<Order>13</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
<Description>Start Win RM Service</Description>
<Order>14</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-2008R2</ComputerName>
<TimeZone>Pacific Standard Time</TimeZone>
<RegisteredOwner></RegisteredOwner>
</component>
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
</settings>
<cpi:offlineImage cpi:source="catalog:d:/sources/install_windows server 2008 r2 serverdatacenter.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
87 changes: 87 additions & 0 deletions definitions/windows-2012-standard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
You can download a free trial of Windows Server 2008 R2 with Service Pack 1 from two different locations manually:

* url: http://technet.microsoft.com/en-us/evalcenter/dd459137.aspx
* url: http://msdn.microsoft.com/en-us/evalcenter/ee175713.aspx

But they seem to always generate the same url of http://care.dlservice.microsoft.com//dl/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso

* 64bit
* filename: 7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso
* md5sum: 4263be2cf3c59177c45085c0a7bc6ca5


The installation uses the Standard Windows Unattended installation. The XML file was created using the Windows AIK kit, but the file can also be edited by hand.

To edit the Autounattend.xml and validate it you can download The Windows® Automated Installation Kit (AIK) for Windows® 7:

* url: http://www.microsoft.com/download/en/details.aspx?id=5753
* file: KB3AIK_EN.iso
* md5sum: 1e73b24a89eceab9d50585b92db5482f

AIK also includes dism, which will allow you to choose a specific version:

If you want to install a different version, edit Autoattended.xml and replace the /IMAGE/NAME value with
one of the names listed in the 2008r2 install.wim on the install DVD .iso


```xml
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<Value>Windows Server 2008 R2 SERVERSTANDARD</Value>
</MetaData>
</InstallFrom>
```


```
PS C:\Users\Administrator> Dism /Get-WIMInfo /WimFile:d:\sources\install.wim
Deployment Image Servicing and Management tool
Version: 6.1.7600.16385
Details for image : d:\sources\install.wim
Index : 1
Name : Windows Server 2008 R2 SERVERSTANDARD
Description : Windows Server 2008 R2 SERVERSTANDARD
Size : 10,510,643,622 bytes
Index : 2
Name : Windows Server 2008 R2 SERVERSTANDARDCORE
Description : Windows Server 2008 R2 SERVERSTANDARDCORE
Size : 3,564,132,307 bytes
Index : 3
Name : Windows Server 2008 R2 SERVERENTERPRISE
Description : Windows Server 2008 R2 SERVERENTERPRISE
Size : 10,511,024,733 bytes
Index : 4
Name : Windows Server 2008 R2 SERVERENTERPRISECORE
Description : Windows Server 2008 R2 SERVERENTERPRISECORE
Size : 3,564,106,331 bytes
Index : 5
Name : Windows Server 2008 R2 SERVERDATACENTER
Description : Windows Server 2008 R2 SERVERDATACENTER
Size : 10,511,131,897 bytes
Index : 6
Name : Windows Server 2008 R2 SERVERDATACENTERCORE
Description : Windows Server 2008 R2 SERVERDATACENTERCORE
Size : 3,564,144,547 bytes
Index : 7
Name : Windows Server 2008 R2 SERVERWEB
Description : Windows Server 2008 R2 SERVERWEB
Size : 10,520,222,743 bytes
Index : 8
Name : Windows Server 2008 R2 SERVERWEBCORE
Description : Windows Server 2008 R2 SERVERWEBCORE
Size : 3,562,750,400 bytes
The operation completed successfully.
```

17 changes: 17 additions & 0 deletions definitions/windows-2012-standard/definition.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
require File.dirname(__FILE__) + "/../.windows/session.rb"

iso_src = "http://care.dlservice.microsoft.com//dl/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso"

session = WINDOWS_SESSION.merge({
:os_type_id => 'Windows2008_64',
:iso_download_instructions => "Download and install full featured software for 180-day trial at http://technet.microsoft.com/en-us/evalcenter/dd459137.aspx",
:iso_src => iso_src,
:iso_file => File.basename(iso_src),
:iso_md5 => "4263be2cf3c59177c45085c0a7bc6ca5",
:kickstart_port => "7140"
})

Veewee::Session.declare session


1 change: 1 addition & 0 deletions definitions/windows-2012-standard/install-chef.bat
1 change: 1 addition & 0 deletions definitions/windows-2012-standard/install-vbox.bat
1 change: 1 addition & 0 deletions definitions/windows-2012-standard/mount-validation.bat
1 change: 1 addition & 0 deletions definitions/windows-2012-standard/oracle-cert.cer
Loading

0 comments on commit 8fdee08

Please sign in to comment.