diff --git a/build_windows_10.sh b/build_windows_10.sh index 56541553..20f25bc9 100755 --- a/build_windows_10.sh +++ b/build_windows_10.sh @@ -1,6 +1,3 @@ #!/bin/bash -mkdir -p ./tmp/10/ -echo "Inserting license ..." -sed -e "s/\/\\$(pass windows_7_prof_license)\<\/Key\>/" ./answer_files/10/Autounattend.xml > ./tmp/10/Autounattend.xml -diff ./answer_files/10/Autounattend.xml ./tmp/10/Autounattend.xml -packer build --only=vmware-iso --var autounattend=./tmp/10/Autounattend.xml windows_10.json +#packer build --only=vmware-iso --var iso_url=~/packer_cache/Win10_1511_English_x64.iso --var iso_checksum=875ec108288b9f581e5d8099cf0edb79f0f3e483 --var autounattend=./tmp/10/Autounattend.xml --var product_key=$(pass windows_7_prof_license) windows_10.json +packer build --only=vmware-iso --var iso_url=~/packer_cache/Win10_1511_English_x64.iso --var iso_checksum=875ec108288b9f581e5d8099cf0edb79f0f3e483 --var autounattend=./tmp/10/Autounattend.xml windows_10.json diff --git a/windows_10.json b/windows_10.json index e762758e..8d42e9ac 100644 --- a/windows_10.json +++ b/windows_10.json @@ -7,7 +7,8 @@ "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "headless": false, - "boot_wait": "2m", + "boot_wait": "6m", + "boot_command": "{{user `product_key`}}", "winrm_username": "vagrant", "winrm_password": "vagrant", "winrm_timeout": "2h", @@ -39,7 +40,8 @@ "iso_checksum_type": "{{user `iso_checksum_type`}}", "iso_checksum": "{{user `iso_checksum`}}", "headless": false, - "boot_wait": "2m", + "boot_wait": "6m", + "boot_command": "{{user `product_key`}}", "winrm_username": "vagrant", "winrm_password": "vagrant", "winrm_timeout": "2h", @@ -100,6 +102,7 @@ "iso_url": "http://iso.esd.microsoft.com/W10IP/BF15E0F8F8F6B6BFCD0F62892BFBA60756371D21/Windows10_InsiderPreview_x64_EN-US_10565.iso", "iso_checksum_type": "sha1", "iso_checksum": "EA37A740FD0744CAE856D1B12FB4167F6EE88B54", - "autounattend": "./answer_files/10/Autounattend.xml" + "autounattend": "./answer_files/10/Autounattend.xml", + "product_key": "" } }