From f9aebe1c9c2970ef1cf1e61193d06ceee93be735 Mon Sep 17 00:00:00 2001 From: Etienne Deneuve Date: Fri, 11 Oct 2019 14:52:59 +0200 Subject: [PATCH] Change: Update doc, windows vm need ``/mode:vm`` to be syspreped correctly --- examples/azure/windows.json | 2 +- examples/azure/windows_custom_image.json | 2 +- examples/azure/windows_quickstart.json | 2 +- website/source/docs/builders/azure.html.md.erb | 2 +- website/source/docs/builders/ncloud.html.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/azure/windows.json b/examples/azure/windows.json index 86445d73f..c1ee94d3d 100644 --- a/examples/azure/windows.json +++ b/examples/azure/windows.json @@ -37,7 +37,7 @@ " while ((Get-Service WindowsAzureGuestAgent).Status -ne 'Running') { Start-Sleep -s 5 }", "if( Test-Path $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml ){ rm $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml -Force}", - "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit", + "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit /mode:vm", "while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State | Select ImageState; Write-Output $imageState.ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Start-Sleep -s 10 } else { break } }" ] }] diff --git a/examples/azure/windows_custom_image.json b/examples/azure/windows_custom_image.json index 5a15a6946..a6e3d0057 100644 --- a/examples/azure/windows_custom_image.json +++ b/examples/azure/windows_custom_image.json @@ -42,7 +42,7 @@ " while ((Get-Service WindowsAzureGuestAgent).Status -ne 'Running') { Start-Sleep -s 5 }", "if( Test-Path $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml ){ rm $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml -Force}", - "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit", + "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit /mode:vm", "while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 10 } else { break } }" ] }] diff --git a/examples/azure/windows_quickstart.json b/examples/azure/windows_quickstart.json index 7cb6c9e8e..6d4fffb57 100644 --- a/examples/azure/windows_quickstart.json +++ b/examples/azure/windows_quickstart.json @@ -33,7 +33,7 @@ " while ((Get-Service WindowsAzureGuestAgent).Status -ne 'Running') { Start-Sleep -s 5 }", "if( Test-Path $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml ){ rm $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml -Force}", - "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit", + "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit /mode:vm", "while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 10 } else { break } }" ] }] diff --git a/website/source/docs/builders/azure.html.md.erb b/website/source/docs/builders/azure.html.md.erb index b09ff58fd..e2c83f80b 100644 --- a/website/source/docs/builders/azure.html.md.erb +++ b/website/source/docs/builders/azure.html.md.erb @@ -226,7 +226,7 @@ here](https://technet.microsoft.com/en-us/library/hh824815.aspx) " while ((Get-Service WindowsAzureTelemetryService).Status -ne 'Running') { Start-Sleep -s 5 }", " while ((Get-Service WindowsAzureGuestAgent).Status -ne 'Running') { Start-Sleep -s 5 }", - "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit", + "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit /mode:vm", "while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 10 } else { break } }" ] } diff --git a/website/source/docs/builders/ncloud.html.md b/website/source/docs/builders/ncloud.html.md index 154fc1c8d..8c7d1c705 100644 --- a/website/source/docs/builders/ncloud.html.md +++ b/website/source/docs/builders/ncloud.html.md @@ -136,7 +136,7 @@ provision when creating a Windows server. { "type": "powershell", "inline": [ - "$Env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /shutdown /quiet \"/unattend:C:\\Program Files (x86)\\NBP\\nserver64.xml\" " + "$Env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /shutdown /quiet /mode:vm \"/unattend:C:\\Program Files (x86)\\NBP\\nserver64.xml\" " ] } ]