forked from jedi4ever/veewee
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cygwin sshd autoinstallation more or less works now
- Loading branch information
Showing
7 changed files
with
229 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ boxes/* | |
pkg/* | ||
*.box | ||
.vagrant | ||
virtualfloppy.vfd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
templates/windows-2008R2-amd64-experimental/Autounattend.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
<?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>10000</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> | ||
<ProductKey> | ||
<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>dgBhAGcAcgBhAG4AdABBAGQAbQBpAG4AaQBzAHQAcgBhAHQAbwByAFAAYQBzAHMAdwBvAHIAZAA=</Value> | ||
<PlainText>false</PlainText> | ||
</AdministratorPassword> | ||
<LocalAccounts> | ||
<LocalAccount wcm:action="add"> | ||
<Password> | ||
<Value>dgBhAGcAcgBhAG4AdABQAGEAcwBzAHcAbwByAGQA</Value> | ||
<PlainText>false</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>dgBhAGcAcgBhAG4AdABQAGEAcwBzAHcAbwByAGQA</Value> | ||
<PlainText>false</PlainText> | ||
</Password> | ||
<Username>administrator</Username> | ||
<Enabled>true</Enabled> | ||
</AutoLogon> | ||
<FirstLogonCommands> | ||
<SynchronousCommand wcm:action="add"> | ||
<CommandLine>cmd.exe /c a:cygwin-sshd.bat</CommandLine> | ||
<Description>Instal Cygwin SSH</Description> | ||
<Order>1</Order> | ||
<RequiresUserInput>true</RequiresUserInput> | ||
</SynchronousCommand> | ||
</FirstLogonCommands> | ||
<ShowWindowsLive>false</ShowWindowsLive> | ||
</component> | ||
</settings> | ||
<settings pass="specialize"> | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Windows AutoUnattend.xml | ||
|
||
|
||
Curl | ||
|
||
http://curl.haxx.se/download.html | ||
|
||
Fails -> http://curl.haxx.se/download/curl-7.21.0-win64-nossl.zip | ||
Works -> http://www.paehl.com/open_source/?CURL_7.21.6 | ||
|
||
curl.exe http://cygwin.com/setup.exe -o setup.exe | ||
|
||
|
||
http://cygwin.com/faq/faq.setup.html#faq.setup.cli | ||
|
||
|
||
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 |
47 changes: 47 additions & 0 deletions
47
templates/windows-2008R2-amd64-experimental/cygwin-sshd.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
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 | ||
copy a:setup.exe %SystemDrive%\cygwin | ||
|
||
REM goto a temp directory | ||
cd %SystemDrive%\windows\temp | ||
|
||
REM run the installation | ||
cmd /c a:/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\usr\bin\sleep 1 | ||
|
||
%SystemDrive%\cygwin\bin\bash -c 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin /usr/bin/ssh-host-config -y -c "ntsecbinmode tty" -w "abc&&123!!" ' | ||
|
||
%SystemDrive%\cygwin\usr\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\usr\bin\sleep 2 | ||
|
||
net start sshd | ||
|
||
# http://myratnest.blogspot.com/2010/11/fun-cygwin-and-windows-2008-r2.html | ||
# editrights -u sshd_server -a SeCreateTokenPrivilege | ||
|
||
# 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/ | ||
|
||
# wget http://download.virtualbox.org/virtualbox/4.0.8/VirtualBox-4.0.8-71778-Win.exe | ||
# chmod +x VirtualBox-4.0.8-71778-Win.exe | ||
# ./VirtualBox-4.0.8-71778-Win.exe -extract | ||
# ./VirtualBox-4.0.8-71778-Win.exe /extract /path . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Veewee::Session.declare({ | ||
:cpu_count => '1', :memory_size=> '384', | ||
:disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off', | ||
:os_type_id => 'Windows2008_64', | ||
:iso_file => "7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", | ||
:iso_src => "", | ||
:iso_md5 => "", | ||
:floppy_files => ["Autounattend.xml","setup.exe","cygwin-sshd.bat"], | ||
:iso_download_timeout => "1000", | ||
:boot_wait => "10", :boot_cmd_sequence => [ | ||
], | ||
:kickstart_port => "7122", :kickstart_timeout => "10000", :kickstart_file => "preseed.cfg", | ||
:ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "", | ||
:ssh_host_port => "7222", :ssh_guest_port => "22", | ||
:sudo_cmd => "echo '%p'|sudo -S sh '%f'", | ||
:shutdown_cmd => "shutdown -P now", | ||
:postinstall_files => [], :postinstall_timeout => "10000" | ||
}) |
Binary file not shown.