Commit 7b636e9d authored by dylanmei's avatar dylanmei

Replace Cygwin with OpenSSH 6.2 wip

parent 8f98d8ef
......@@ -116,115 +116,134 @@
<Order>2</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c a:\install-cygwin-sshd.bat</CommandLine>
<Description>Install Cygwin SSH</Description>
<Order>3</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c winrm quickconfig -q</CommandLine>
<Description>winrm quickconfig -q</Description>
<Order>4</Order>
<Order>3</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>5</Order>
<Order>4</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>6</Order>
<Order>5</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>7</Order>
<Order>6</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>8</Order>
<Order>7</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>9</Order>
<Order>8</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 client auth Basic</Description>
<Order>10</Order>
<Order>9</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>11</Order>
<Order>10</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>12</Order>
<Order>11</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>13</Order>
<Order>12</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c net stop winrm </CommandLine>
<Description>Stop Win RM Service </Description>
<Order>14</Order>
<Order>13</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c sc config winrm start= auto</CommandLine>
<CommandLine>cmd.exe /c sc config winrm start=auto</CommandLine>
<Description>Win RM Autostart</Description>
<Order>15</Order>
<Order>14</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c net start winrm</CommandLine>
<Description>Start Win RM Service</Description>
<Order>16</Order>
<Order>15</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\install-win-updates.ps1</CommandLine>
<Description>Install Windows Updates</Description>
<Order>17</Order>
<RequiresUserInput>true</RequiresUserInput>
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine>
<Order>16</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f</CommandLine>
<Order>18</Order>
<Order>17</Order>
<Description>Enable QuickEdit mode</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine>
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f</CommandLine>
<Order>18</Order>
<Description>Show Run command in Start Menu</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f</CommandLine>
<Order>19</Order>
<Description>Show file extensions in Explorer</Description>
<Description>Show Administrative Tools in Start Menu</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f</CommandLine>
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine>
<Order>20</Order>
<Description>Show Run command in Start Menu</Description>
<Description>Zero Hibernation File</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f</CommandLine>
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine>
<Order>21</Order>
<Description>Show Administrative Tools in Start Menu</Description>
<Description>Disable Hibernation Mode</Description>
</SynchronousCommand>
<!--
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\win-updates.ps1</CommandLine>
<Description>Install Windows Updates</Description>
<Order>22</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\hotfix-KB2842230.ps1</CommandLine>
<Description>Install Windows Updates</Description>
<Order>23</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
-->
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c a:\openssh-6.2.bat</CommandLine>
<Description>Install OpenSSH</Description>
<Order>99</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
</FirstLogonCommands>
<ShowWindowsLive>false</ShowWindowsLive>
......
*.exe
*.msi
*.msu
\ No newline at end of file
if not exist "C:\Windows\Temp\chef.msi" (
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://www.opscode.com/chef/install.msi', 'C:\Windows\Temp\chef.msi')"
)
msiexec /qb /i C:\Windows\Temp\chef.msi
powershell -Command "Start-Sleep 1"
powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
cmd /c setx /m PATH "%path%;C:\\Chocolatey\bin"
set > echo.txt
$winver = [System.Environment]::OSVersion.Version
# Windows 8 / Windows 2012 require KB2842230 hotfix
# The Windows Remote Management (WinRM) service does not use the customized value of the MaxMemoryPerShellMB quota.
# Instead, the WinRM service uses the default value, which is 150 MB.
if ($winver.Major -eq 6 -and ($winver.Minor -eq 2 -or $winver.Minor -eq 3)) {
#$HotfixUrl = "http://hotfixv4.microsoft.com/Windows%208%20RTM/nosp/Fix452763/9200/free/463941_intl_x64_zip.exe"
$HotfixMsu = "A:\Windows8-RT-KB2842230-x64.msu"
if (Test-Path $HotfixMsu) {
Write-Host "Executing KB2842230 hotfix"
start-process -NoNewWindow -FilePath "wusa.exe" -ArgumentList "$HotfixMsu /quiet /norestart"
# Damn thing exists immediately.
Start-Sleep -s 60
Write-Host "A reboot will be required before Chocolatey can be used via Puppet"
}
}
#!/bin/sh
set -x
wget http://www.opscode.com/chef/install.msi -O chef-client-latest.msi
msiexec /qb /i chef-client-latest.msi
rm chef-client-latest.msi
sleep 1
REM http://webcache.googleusercontent.com/search?q=cache:SjoPPpuQxuoJ:www.tcm.phy.cam.ac.uk/~mr349/cygwin_install.html+install+cygwin+ssh+commandline&cd=2&hl=nl&ct=clnk&gl=be&source=www.google.be
REM create the cygwin directory
cmd /c mkdir %SystemDrive%\cygwin
cmd /c bitsadmin /transfer CygwinSetupExe /download /priority normal http://www.cygwin.com/setup-x86_64.exe %SystemDrive%\cygwin\cygwin-setup.exe
REM goto a temp directory
cd %SystemDrive%\windows\temp
REM run the installation
cmd /c %SystemDrive%\cygwin\cygwin-setup.exe -q -R %SystemDrive%\cygwin -P openssh,openssl,curl,cygrunsrv,wget,rebase,vim -s http://cygwin.mirrors.pair.com
%SystemDrive%\cygwin\bin\bash -c 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin cygrunsrv -R sshd'
REM /bin/ash is the right shell for this command
cmd /c %SystemDrive%\cygwin\bin\ash -c /bin/rebaseall
cmd /c %SystemDrive%\cygwin\bin\bash -c 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin mkgroup -l'>%SystemDrive%\cygwin\etc\group
cmd /c %SystemDrive%\cygwin\bin\bash -c 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin mkpasswd -l'>%SystemDrive%\cygwin\etc\passwd
%SystemDrive%\cygwin\bin\sleep 1
%SystemDrive%\cygwin\bin\bash -c 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin /bin/ssh-host-config -y -c "ntsecbinmode tty" -w "abc&&123!!" '
%SystemDrive%\cygwin\bin\sleep 2
cmd /c if exist %Systemroot%\system32\netsh.exe netsh advfirewall firewall add rule name="SSHD" dir=in action=allow program="c:\cygwin\usr\sbin\sshd.exe" SSHD enable=yes
cmd /c if exist %Systemroot%\system32\netsh.exe netsh advfirewall firewall add rule name="ssh" dir=in action=allow protocol=TCP localport=22
%SystemDrive%\cygwin\bin\sleep 2
# net start sshd
# Fix corrupt recycle bin
# http://www.winhelponline.com/blog/fix-corrupted-recycle-bin-windows-7-vista/
cmd /c rd /s /q c:\$Recycle.bin
copy a:\sudo %SystemDrive%\cygwin\usr\local\bin
cmd /c %SystemDrive%\cygwin\bin\chmod 755 %SystemDrive%\cygwin\usr\local\bin\sudo
\ No newline at end of file
#!/bin/sh
set -x
wget --no-check-certificate http://pm.puppetlabs.com/puppet-enterprise/3.0.1/puppet-enterprise-3.0.1.msi -O puppet.msi
msiexec /qn /i puppet.msi
rm -rf puppet.msi
cmd.exe /c setx /m PATH "%path%;C:\\Program Files (x86)\\Puppet Labs\\Puppet Enterprise\\bin"
sleep 1
#!/bin/sh
set -x
if [ "$PACKER_BUILDER_TYPE" != "virtualbox" ]; then
echo "not building virtualbox, skipping"
exit
fi
# 7zip will allow us to extract a file from an ISO
wget http://downloads.sourceforge.net/sevenzip/7z920-x64.msi
msiexec /qb /i 7z920-x64.msi
# There needs to be Oracle CA (Certificate Authority) certificates installed in order
# to prevent user intervention popups which will undermine a silent installation.
cmd /c certutil -addstore -f "TrustedPublisher" A:\\oracle-cert.cer
mkdir /home/vagrant/virtualbox
chown -R vagrant /home/vagrant/virtualbox
# Extract and install
/cygdrive/c/Program\ Files/7-Zip/7z.exe x -y C:\\cygwin\\VBoxGuestAdditions*.iso -ovirtualbox
cmd.exe /c .\\virtualbox\\VBoxWindowsAdditions.exe /S
rm -rf /home/vagrant/VBoxGuestAdditions.iso
rm -rf /home/vagrant/virtualbox
msiexec /qb /x 7z920-x64.msi
rm -rf 7z920-x64.msi
#cmd /c shutdown.exe /r /t 0 /d p:4:1 /c "Vagrant reboot for VBoxWindowsAdditions"
sleep 1
@rem setup openssh
if exist a:\openssh-6.2.exe (
copy a:\openssh-6.2.exe C:\windows\Temp
) else (
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://www.mls-software.com/files/setupssh-6.2p2-1-v1(x64).exe', 'C:\Windows\Temp\openssh-6.2.exe')"
)
cmd /c C:\Windows\temp\openssh-6.2.exe /S /port=22 /privsep=1 /password=D@rj33l1ng
@rem ensure vagrant can log in
mkdir "C:\Users\vagrant"
cmd /c C:\Windows\System32\icacls.exe "C:\Users\vagrant" /grant vagrant:(OI)(CI)F
cmd /c C:\Windows\System32\icacls.exe "C:\Program Files\OpenSSH\bin" /grant vagrant:(OI)RX
cmd /c C:\Windows\System32\icacls.exe "C:\Program Files\OpenSSH\usr\sbin" /grant vagrant:(OI)RX
powershell -Command "(Get-Content 'C:\Program Files\OpenSSH\etc\passwd') | Foreach-Object { $_ -replace '/home/(\w+)', '/cygdrive/c/Users/$1' } | Set-Content 'C:\Program Files\OpenSSH\etc\passwd'"
@rem use Windows\Temp as /tmp location
rd /S /Q "C:\Program Files\OpenSSH\tmp"
cmd /c ""C:\Program Files\OpenSSH\bin\junction.exe" /accepteula "C:\Program Files\OpenSSH\tmp" C:\Windows\Temp"
cmd /c C:\Windows\System32\icacls.exe "C:\Windows\Temp" /grant vagrant:(OI)(CI)F
@rem vagrant public key useful later
mkdir "C:\Users\vagrant\.ssh"
if exist a:\vagrant.pub (
copy a:\vagrant.pub C:\Users\vagrant\.ssh\authorized_keys
) else (
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub', 'C:\Users\vagrant\.ssh\authorized_keys')"
)
@rem configure firewall
netsh advfirewall firewall add rule name="SSHD" dir=in action=allow service=OpenSSHd enable=yes
netsh advfirewall firewall add rule name="SSHD" dir=in action=allow program="C:\Program Files\OpenSSH\usr\sbin\sshd.exe" enable=yes
netsh advfirewall firewall add rule name="ssh" dir=in action=allow protocol=TCP localport=22
#!/bin/sh
set -x
# Create the home directory
mkdir -p /home/vagrant
chown vagrant /home/vagrant
cd /home/vagrant
# Install ssh certificates
mkdir /home/vagrant/.ssh
chmod 700 /home/vagrant/.ssh
cd /home/vagrant/.ssh
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
chown -R vagrant /home/vagrant/.ssh
cd ..
# Install rpm,apt-get like code for cygwin
# http://superuser.com/questions/40545/upgrading-and-installing-packages-through-the-cygwin-command-line
wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
chmod +x apt-cyg
mv apt-cyg /usr/local/bin/
cat <<'EOF' > /bin/sudo
#!/usr/bin/bash
exec "$@"
EOF
chmod 755 /bin/sudo
sleep 1
if not exist "C:\Windows\Temp\puppet.msi" (
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://pm.puppetlabs.com/puppet-enterprise/3.0.1/puppet-enterprise-3.0.1.msi', 'C:\Windows\Temp\puppet.msi')"
)
msiexec /qn /i C:\Windows\Temp\puppet.msi
cmd /c setx /m PATH "%path%;C:\\Program Files (x86)\\Puppet Labs\\Puppet Enterprise\\bin"
powershell -Command "Start-Sleep 1"
\ No newline at end of file
if not exist "C:\Windows\Temp\puppet.msi" (
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://downloads.puppetlabs.com/windows/puppet-3.3.0.msi', 'C:\Windows\Temp\puppet.msi')"
)
msiexec /qn /i C:\Windows\Temp\puppet.msi
cmd /c setx /m PATH "%path%;C:\\Program Files (x86)\\Puppet Labs\\Puppet\\bin"
powershell -Command "Start-Sleep 1"
@rem There needs to be Oracle CA (Certificate Authority) certificates installed in order
@rem to prevent user intervention popups which will undermine a silent installation.
cmd /c certutil -addstore -f "TrustedPublisher" A:\oracle-cert.cer
cmd /c E:\VBoxWindowsAdditions.exe /S
......@@ -15,14 +15,11 @@ function Check-ContinueRestartOrEnd() {
Write-Host "No Restart Required"
Check-WindowsUpdates
if (($global:MoreUpdates -eq 1) -and ($script:Cycles -le $global:MaxCycles)) {
Stop-Service $script:ServiceName -Force
Set-Service -Name $script:ServiceName -StartupType Disabled -Status Stopped
Install-WindowsUpdates
} elseif ($script:Cycles -gt $global:MaxCycles) {
Write-Host "Exceeded Cycle Count - Stopping"
} else {
Write-Host "Done Installing Windows Updates"
Set-Service -Name $script:ServiceName -StartupType Automatic -Status Running
}
}
1 {
......@@ -158,13 +155,11 @@ $script:UpdateSearcher = $script:UpdateSession.CreateUpdateSearcher()
$script:SearchResult = New-Object -ComObject 'Microsoft.Update.UpdateColl'
$script:Cycles = 0
$script:ServiceName = "sshd"
Stop-Service $script:ServiceName -Force
Set-Service -Name $script:ServiceName -StartupType Disabled -Status Stopped
Check-WindowsUpdates
if ($global:MoreUpdates -eq 1) {
Install-WindowsUpdates
} else {
Check-ContinueRestartOrEnd
}
\ No newline at end of file
}
......@@ -4,7 +4,8 @@
Vagrant.configure("2") do |config|
config.vm.define "vagrant-windows-2008-r2"
config.vm.box = "windows_2008_r2"
config.vm.base_mac = "{{ .BaseMacAddress }}"
# You should be using the vagrant-windows Vagrant Plugin!
# Admin user name and password
config.winrm.username = "vagrant"
......
......@@ -3,8 +3,9 @@
Vagrant.configure("2") do |config|
config.vm.define "vagrant-windows-2012"
config.vm.box = "vagrant_windows_2012"
config.vm.box = "windows_2012"
config.vm.base_mac = "{{ .BaseMacAddress }}"
# You should be using the vagrant-windows Vagrant Plugin!
# Admin user name and password
config.winrm.username = "vagrant"
......
......@@ -9,12 +9,17 @@
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "2h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Vagrant Shutdown\"",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Vagrant Shutdown\"",
"guest_os_type": "windows8srv-64",
"disk_size": 61440,
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"floppy_files": ["./answer_files/2012/Autounattend.xml", "./scripts/install-cygwin-sshd.bat", "./scripts/install-win-updates.ps1"],
"floppy_files": [
"./answer_files/2012/Autounattend.xml",
"./scripts/win-updates.ps1",
"./scripts/openssh-6.2.exe",
"./scripts/openssh-6.2.bat"
],
"vmx_data": {
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900",
......@@ -26,19 +31,23 @@
"iso_url": "./iso/en_windows_server_2012_x64_dvd_915478.iso",
"iso_checksum_type": "md5",
"iso_checksum": "da91135483e24689bfdaf05d40301506",
"headless": true,
"headless": false,
"boot_wait": "5m",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "2h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Vagrant Shutdown\"",
"ssh_wait_timeout": "8h",
"shutdown_command": "shutdown /s /t 2400 /f /d p:4:1 /c \"Vagrant Shutdown\"",
"shutdown_timeout": "8h",
"guest_os_type": "Windows2012_64",
"disk_size": 61440,
"guest_additions_attach": "true",
"floppy_files": [
"./answer_files/2012/Autounattend.xml",
"./scripts/oracle-cert.cer",
"./scripts/install-cygwin-sshd.bat",
"./scripts/install-win-updates.ps1"
"./scripts/win-updates.ps1",
"./scripts/hotfix-KB2842230.ps1",
"./scripts/Windows8-RT-KB2842230-x64.msu",
"./scripts/openssh-6.2.bat",
"./scripts/oracle-cert.cer"
],
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "2048"],
......@@ -47,11 +56,18 @@
}],
"provisioners": [{
"type": "shell",
"scripts": ["./scripts/postinstall.sh", "./scripts/install-vmware-tools.sh", "./scripts/install-virtualbox-tools.sh", "./scripts/install-chef.sh"]
"remote_path": "/tmp/script.bat",
"execute_command": "cmd /c C:/Windows/Temp/script.bat",
"scripts": [
"./scripts/echo.bat",
"./scripts/virtualbox-tools.bat",
"./scripts/puppet.bat",
"./scripts/chef.bat",
"./scripts/chocolatey.bat"
]
}],
"post-processors": [{
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_2012_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2012.template"
}]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment