Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Small changes in order to work with build 1809 #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ bin/*.vshost.exe
scripts/vmgen.json.lock
scripts/vmgen.json
scripts/floppy/build.cfg
scripts/vmgen.log
scripts/*.log
scripts/vmgen.cfg
scripts/parallels-command.txt
*.user
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Some of these steps will not make sense for you so feel free to hack around and

There are some known issues with the scripts so make sure to check the issues section.

Currently this process only works on Windows 8.1 machines.

## Software Requirements
* Windows 10 - version 1709
* [Packer 1.1.2 For Windows and Mac](https://packer.io/downloads.html)
Expand Down Expand Up @@ -48,7 +46,7 @@ The Hyper-V ISO builder in Packer 1.1.2 works well on Windows 10 version 1709.

#### VirtualBox support

We automatically install the Guest Extensions, but to do that silently the installation needs to add the Oracle certificate to the list of trusted certs in the guest OS. Right now we suggest that you follow the process described in [this guide](http://www.catonrug.net/2013/03/virtualbox-silent-install-store-oracle-certificate.html). You will have to place that `.cer` file in `scripts\floppy\guesttools\oracle-cert.cer`. In the near future we plan to update the process to follow the guidance of the [official manual](https://www.virtualbox.org/manual/ch04.html#additions-windows) in the section **4.2.1.3. Unattended Installation**.
We automatically install the Guest Extensions, but to do that silently the installation needs to add the Oracle certificate to the list of trusted certs in the guest OS. Right now we suggest that you follow the process described in [this guide](https://web.archive.org/web/20170226085950/http://www.catonrug.net/2013/03/virtualbox-silent-install-store-oracle-certificate.html). You will have to place that `.cer` file in `scripts\floppy\guesttools\oracle-cert.cer`. In the near future we plan to update the process to follow the guidance of the [official manual](https://www.virtualbox.org/manual/ch04.html#additions-windows) in the section **4.2.1.3. Unattended Installation**.

### Set PowerShell Execution Policy
Set the execution policy by typing this into your powershell window:
Expand Down
4 changes: 2 additions & 2 deletions scripts/answer_files/10/autounattend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
<InstallToAvailablePartition>false</InstallToAvailablePartition>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<Value>Windows 10 Enterprise Evaluation</Value>
<Key>/IMAGE/INDEX</Key>
<Value>1</Value>
</MetaData>
</InstallFrom>
</OSImage>
Expand Down
2 changes: 1 addition & 1 deletion scripts/floppy/openssh/openssh.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function DownloadSSH () {
}

function OpenSSH () {
#Start-Service "OpenSSHd"
Start-Service "OpenSSHd"

# If ($software -eq "HyperV" -or $software -eq "VPC") {
# Stop-Computer -Force
Expand Down
33 changes: 33 additions & 0 deletions scripts/floppy/openssh/win10/openssh.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# --------------------------------------------------------------
#
# dev.microsoftedge.com -VMs
# Copyright(c) Microsoft Corporation. All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files(the ""Software""),
# to deal in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies
# of the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions :
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# --------------------------------------------------------------

param (
[switch]$AutoStart = $false,
[switch]$Finish = $false
)

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
4 changes: 2 additions & 2 deletions scripts/floppy/updates/win-updates.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ function Install-WindowsUpdates() {
Title = $UpdatesToInstall.Item($i).Title
Result = $InstallationResult.GetUpdateResult($i).ResultCode
}
LogWrite "Item: " $UpdatesToInstall.Item($i).Title
LogWrite "Result: " $InstallationResult.GetUpdateResult($i).ResultCode;
LogWrite "Item: " + $UpdatesToInstall.Item($i).Title
LogWrite "Result: " + $InstallationResult.GetUpdateResult($i).ResultCode
}

Check-ContinueRestartOrEnd
Expand Down
8 changes: 4 additions & 4 deletions scripts/template-parts/floppy_files_common.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"floppy_files": [
"floppy/common/setautologon.ps1",
"floppy/build.cfg",
"floppy/openssh/openssh.ps1",
"floppy/updates/win-updates.ps1",
"floppy/common/post-win-updates.ps1",
"floppy/common/finish-actions.ps1",
"floppy/updates/microsoft-updates.bat",
"floppy/common/preprovisioner.ps1",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/Bginfo.exe",
"floppy/bginfo/install.vbs",
"floppy/bginfo/background.jpg",
Expand All @@ -24,12 +24,12 @@
"floppy_files": [
"floppy/common/setautologon.ps1",
"floppy/build.cfg",
"floppy/openssh/openssh.ps1",
"floppy/updates/win-updates.ps1",
"floppy/common/post-win-updates.ps1",
"floppy/common/finish-actions.ps1",
"floppy/updates/microsoft-updates.bat",
"floppy/common/preprovisioner.ps1",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/Bginfo.exe",
"floppy/bginfo/install.vbs",
"floppy/bginfo/background.jpg",
Expand All @@ -43,12 +43,12 @@
"floppy_files": [
"floppy/common/setautologon.ps1",
"floppy/build.cfg",
"floppy/openssh/openssh.ps1",
"floppy/updates/win-updates.ps1",
"floppy/common/post-win-updates.ps1",
"floppy/common/finish-actions.ps1",
"floppy/updates/microsoft-updates.bat",
"floppy/common/preprovisioner.ps1",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/Bginfo.exe",
"floppy/bginfo/install.vbs",
"floppy/bginfo/background.jpg",
Expand All @@ -62,12 +62,12 @@
"floppy_files": [
"floppy/common/setautologon.ps1",
"floppy/build.cfg",
"floppy/openssh/openssh.ps1",
"floppy/updates/win-updates.ps1",
"floppy/common/post-win-updates.ps1",
"floppy/common/finish-actions.ps1",
"floppy/updates/microsoft-updates.bat",
"floppy/common/preprovisioner.ps1",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/Bginfo.exe",
"floppy/bginfo/install.vbs",
"floppy/bginfo/background.jpg",
Expand Down
36 changes: 16 additions & 20 deletions scripts/template-parts/floppy_files_win10.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,37 @@
{
"type": "hyperv-iso",
"floppy_files": [
"floppy/common/setautologon.ps1",
"answer_files/10/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/win10/bgconfig.bgi",
"floppy/eula/win10/eula.txt"
"./answer_files/10/autounattend.xml",
"./floppy/eula/win10/eula.txt",
"./floppy/bginfo/win10/bgconfig.bgi",
"./floppy/openssh/win10/openssh.ps1"
]
},
{
"type": "virtualbox-iso",
"floppy_files": [
"floppy/common/setautologon.ps1",
"answer_files/10/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/win10/bgconfig.bgi",
"floppy/eula/win10/eula.txt"
"./answer_files/10/autounattend.xml",
"./floppy/eula/win10/eula.txt",
"./floppy/bginfo/win10/bgconfig.bgi",
"./floppy/openssh/win10/openssh.ps1"
]
},
{
"type": "vmware-iso",
"floppy_files": [
"floppy/common/setautologon.ps1",
"answer_files/10/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/win10/bgconfig.bgi",
"floppy/eula/win10/eula.txt"
"./answer_files/10/autounattend.xml",
"./floppy/eula/win10/eula.txt",
"./floppy/bginfo/win10/bgconfig.bgi",
"./floppy/openssh/win10/openssh.ps1"
]
},
{
"type": "parallels-iso",
"floppy_files": [
"floppy/common/setautologon.ps1",
"answer_files/10/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/win10/bgconfig.bgi",
"floppy/eula/win10/eula.txt"
"./answer_files/10/autounattend.xml",
"./floppy/eula/win10/eula.txt",
"./floppy/bginfo/win10/bgconfig.bgi",
"./floppy/openssh/win10/openssh.ps1"
]
}
]
Expand Down
4 changes: 4 additions & 0 deletions scripts/template-parts/floppy_files_win7.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"answer_files/7/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/bgconfig.bgi",
"floppy/openssh/openssh.ps1",
"floppy/eula/win7/eula.txt"
]
},
Expand All @@ -15,6 +16,7 @@
"answer_files/7/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/bgconfig.bgi",
"floppy/openssh/openssh.ps1",
"floppy/eula/win7/eula.txt"
]
},
Expand All @@ -24,6 +26,7 @@
"answer_files/7/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/bgconfig.bgi",
"floppy/openssh/openssh.ps1",
"floppy/eula/win7/eula.txt"
]
},
Expand All @@ -33,6 +36,7 @@
"answer_files/7/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/bgconfig.bgi",
"floppy/openssh/openssh.ps1",
"floppy/eula/win7/eula.txt"
]
}
Expand Down
4 changes: 4 additions & 0 deletions scripts/template-parts/floppy_files_win81.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"answer_files/81/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/bgconfig.bgi",
"floppy/openssh/openssh.ps1",
"floppy/eula/win81/eula.txt"
]
},
Expand All @@ -15,6 +16,7 @@
"answer_files/81/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/bgconfig.bgi",
"floppy/openssh/openssh.ps1",
"floppy/eula/win81/eula.txt"
]
},
Expand All @@ -24,6 +26,7 @@
"answer_files/81/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/bgconfig.bgi",
"floppy/openssh/openssh.ps1",
"floppy/eula/win81/eula.txt"
]
},
Expand All @@ -33,6 +36,7 @@
"answer_files/81/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/bgconfig.bgi",
"floppy/openssh/openssh.ps1",
"floppy/eula/win81/eula.txt"
]
}
Expand Down
4 changes: 1 addition & 3 deletions scripts/template-parts/provisioner_common.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"provisioners": [
{
"type": "shell",
"remote_path": "/tmp/script.bat",
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat",
"type": "windows-shell",
"scripts": [
"./provisioners/vm-guest-tools.bat",
"./provisioners/compact.bat",
Expand Down
6 changes: 3 additions & 3 deletions scripts/template-parts/urls_win10x64.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"variables": {
"iso_url": "iso/15063.0.170317-1834.RS2_RELEASE_CLIENTENTERPRISEEVAL_OEMRET_X64FRE_EN-US.iso",
"iso_checksum": "cf812813211add8fe7c53b07b7caff8c",
"iso_checksum_type": "md5"
"iso_url": "iso/17763.107.101029-1455.rs5_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso",
"iso_checksum": "164f022a22d2305e6fbd82f6e35d530b6bbadca8",
"iso_checksum_type": "sha1"
}
}
2 changes: 1 addition & 1 deletion scripts/template-parts/win10x64.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"ssh_timeout": "16h",
"ram_size": 2048,
"disk_size": 40960,
"switch_name": "",
"switch_name": "Default Switch",
"shutdown_command": "{{ user `shutdown_command`}}",
"output_directory" : "..\\vms\\output\\MSEdge-Win10-HyperV"
},
Expand Down