Azure / Azure/WindowsVMAgent

Windows VM Agent can't seem to handle computer rename operations

Open
#17 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
21
Forks
21
PR merge metrics
No merged PRs in 30d

Description

I have to create a bunch of Windows VM's from a disk snapshot, but when I do, the extensions like Guest Host Extension don't work properly, and the AzurePolicyForWindows can't fix it. In my case the original golden machine is named "sr-games-07" and I snapshot this disk, create a new disk and a new VM to attach to the new disk named "sr-games-01".

# Logging

https://dst-azts.azurewebsites.net/ says my machine has errors in "Guest Configuration extension must be deployed to the VM using Azure Policy assignment" saying `Validated control status through MDC assessment. Security Assessment Status Code : Unhealthy.`, and MDC says `Guest Configuration extension should be installed on machines (Unhealthy)` and Policy remediation fails on all but the golden machine:

![Image](https://github.com/user-attachments/assets/2c617553-f6ed-41c0-96ca-e4a72814ebac)

I have a full 80mb zip file from CollectGuestLogs.exe if you need it.

# Debugging

After renaming the COMPUTERNAME to sr-games-01 then look inside WindowsAzure I see still a lot of references to sr-games-07 in files like these:
- Config\ExtensionConfig2024.12.20-03.08.28.624.json
- Config\ff561eb4-2485-4fb2-b1ec-1cb2243e11c8.ff561eb4-2485-4fb2-b1ec-1cb2243e11c8._sr-games-07.1.xml
- Resources\AMADataStore.sr-games-07\mcs\configchunks\3907533648951548941.json
- Resources\AMADataStore.sr-games-07\mcs\mcsconfig.lkg.json

Can you fix the agent and extensions so they can gracefully handle a computer renames?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.