Open oott123 opened 4 years ago
can confirm the same issue when buildong on a German Win11. Your change resolves it.
If it needs to keep the integration service check, it can be done like the following I think
--- a/WinImageBuilder.psm1
+++ b/WinImageBuilder.psm1
@@ -1195,7 +1197,7 @@ function Wait-ForVMShutdown {
$isOff = $vmState -eq "Off"
try {
if ($vmState -ne "Running" -or `
- !(Get-VMIntegrationService $Name -Name "Key-Value Pair Exchange").Enabled) {
+ !(Get-VMIntegrationService $Name | Where-Object Id -Match "2A34B1C2-FD73-4043-8A5B-DD2159BC743F").Enabled) {
continue
}
$currentVMMessages = Get-KVPData -VMName $Name
The ID value is described at MicrosoftDocs/azure-docs#52634
The code here is using
Get-VMIntegrationService $Name -Name "Key-Value Pair Exchange").Enabled
to check if KV pair exchange service is enabled.However, when you are using a non-English locale of Windows, you will get other names like
键值对交换
(in chinese):And it throws a error when getting by name:
which will cause "Could not retrieve VM runtime logs"
So I think we should remove the integration service enabled check in order to retrive the log correctly: