вторник, 29 июня 2021 г.

Создание образа для Azure Virtual Desktop

 Сегодня сталкнулся с проблемами при создании образа Windows 10 для Azure Virtual Desktop

Create or Update Virtual Machine Extension

{\"code\":\"ResourceDeploymentFailure\",\"message\":\"The resource operation completed with terminal provisioning state 'Failed'.\",\"details\":[{\"code\":\"VMExtensionProvisioningError\",\"message\":\"VM has reported a failure when processing extension 'MicrosoftMonitoringAgent'. Error message: \\\"The Microsoft Monitoring Agent failed to install on this machine. Please try to uninstall and reinstall the extension. If the issue persists, please contact support. (MMAEXTENSION_ERROR_AGENTNOTINSTALLED)\\\"\\r\\n\\r\\nMore information on troubleshooting is available at https://aka.ms/VMExtensionMMAWindowsTroubleshoot \"}]}}",

Проблемы скрываются в самом образе виртуальной машины и решаеются в несколько шагов:

1. Должен быть чистый образ без сохранных профелей пользователей: 
проверьте профили пользователей запустив: SystemPropertiesAdvanced (не относится к ошибке выше)
2. Удалите из образа Microsoft Monitoring agent
3. Удалите из образа Dependency agent
4. Запустите c:\WindowsAzure\GuestAgent_%Version%\RemoveOldGuestAgentInstallation.exe
5.1 Удалите HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Azure\HandlerState\Microsoft.Azure.Monitoring.DependencyAgent.DependencyAgentWindows_%Version%
5.2 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Azure\HandlerState\Microsoft.EnterpriseCloud.Monitoring.MicrosoftMonitoringAgent_%Version%
5.3 Удалите extension MicrosoftMonitoringAgent, DependencyAgentWindows
5.4 Активируйте Insights на виртуальной машине снова
6. Установите параметры TimeZone (не относится к ошибке выше): 
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fEnableTimeZoneRedirection /t REG_DWORD /d 1 /f
tzutil /s "FLE Standard Time" 




Создание образа для Azure Virtual Desktop

 Сегодня сталкнулся с проблемами при создании образа Windows 10 для Azure Virtual Desktop Create or Update Virtual Machine Extension {\"...