Commit a83e27bc authored by Bob Tanner's avatar Bob Tanner

Merge branch 'my' of https://github.com/StefanScherer/packer-windows into packer-builder-vsphere

parents ae239f88 3ba8e81a
......@@ -147,30 +147,31 @@ only have Hyper-V installed on my laptop, so I run:
packer build --only hyperv-iso -var 'hyperv_switchname=Ethernet' -var 'iso_url=./server2016.iso' .\windows_2016_docker.json
```
You then can use this box with Vagrant to spin up a Hyper-V VM.
You then can use this box with Vagrant to spin up a Hyper-V VM.
#### Generation 2 VMs
Some of these images use Hyper-V "Generation 2" VMs to enable the latest features and faster booting. However, an extra manual step is needed to put the needed files into ISOs because Gen2 VMs don't support virtual floppy disks.
- `windows_server_insider.json`
- `windows_server_insider_docker.json`
- `windows_10_insider.json`
* `windows_server_insider.json`
* `windows_server_insider_docker.json`
* `windows_10_insider.json`
Before running `packer build`, be sure to run `./make_unattend_iso.ps1` first. Otherwise the build will fail on a missing ISO file
```none
TODO: error example here
```
hyperv-iso output will be in this color.
1 error(s) occurred:
* Secondary Dvd image does not exist: CreateFile ./iso/windows_server_insider_unattend.iso: The system cannot find the file specified.
```
### Using .box Files With Vagrant
The generated box files include a Vagrantfile template that is suitable for use
with Vagrant 1.7.4+, but the latest ersion is always recommended.
Example Steps for Hyper-V:
```
......
......@@ -4,5 +4,5 @@
PACKER_LOG=debug packer build \
--only=vmware-iso \
--var vhv_enable=true \
--var iso_url=~/packer_cache/insider/Windows_InsiderPreview_Server_17079.iso \
--var iso_url=~/packer_cache/insider/Windows_InsiderPreview_Server_17093.iso \
windows_server_insider_docker.json
......@@ -11,14 +11,14 @@
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
"generation": 2,
"secondary_iso_images": [
"./iso/windows_server_insider_unattend.iso"
],
"guest_additions_mode": "disable",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"secondary_iso_images": [
"./iso/windows_server_insider_unattend.iso"
],
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......@@ -135,12 +135,13 @@
"disk_size": "61440",
"disk_type_id": "1",
"headless": "false",
"iso_checksum": "4ac2db4bfc90e8bc569646200592b76915aa6dadd5c0b829b0e997db5ad691b8",
"iso_checksum": "7d9782673b5429dbc2bc05ce82f3ce2dabde2505d10a5e2b006d064928266041",
"iso_checksum_type": "sha256",
"iso_url": "https://software-download.microsoft.com/sg/Windows_InsiderPreview_Server_17079.iso",
"iso_url": "https://software-download.microsoft.com/sg/Windows_InsiderPreview_Server_17093.iso",
"manually_download_iso_from": "https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver",
"restart_timeout": "5m",
"vhv_enable": "false",
"winrm_timeout": "2h"
}
}
\ No newline at end of file
}
......@@ -11,14 +11,14 @@
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
"generation": 2,
"secondary_iso_images": [
"./iso/windows_server_insider_unattend.iso"
],
"guest_additions_mode": "disable",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"secondary_iso_images": [
"./iso/windows_server_insider_unattend.iso"
],
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......@@ -151,9 +151,9 @@
"docker_provider": "DockerProvider",
"docker_version": "17.10.0-ee-preview-3",
"headless": "false",
"iso_checksum": "4ac2db4bfc90e8bc569646200592b76915aa6dadd5c0b829b0e997db5ad691b8",
"iso_checksum": "7d9782673b5429dbc2bc05ce82f3ce2dabde2505d10a5e2b006d064928266041",
"iso_checksum_type": "sha256",
"iso_url": "https://software-download.microsoft.com/pr/Windows_InsiderPreview_Server_17079.iso",
"iso_url": "https://software-download.microsoft.com/pr/Windows_InsiderPreview_Server_17093.iso",
"manually_download_iso_from": "https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver",
"restart_timeout": "5m",
"vhv_enable": "false",
......
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