A central hub of Azure cloud migration services and tools to discover, assess, and migrate workloads to the cloud.
Hi Chad Miller
To repair the Windows VM, we followed the Microsoft guidance using the Azure Virtual Machine Repair extension. First, we configured the subscription and installed the VM repair extension using the following Azure CLI commands: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/repair-windows-vm-using-azure-virtual-machine-repair-commands
az account set --subscription "SubID"
az extension add -n vm-repair
az extension update -n vm-repair
Next, we created a repair VM and attached the OS disk of the affected VM using the following command:
az vm repair create -n magixbox-test-win -g Rescue-vm --enable-nested --verbose
After the repair VM was created, we executed the repair operation:
az vm repair run -g Rescue-vm -n magixbox-test-win --run-on-repair --run-id win-hello-world --verbose
follow the steps provided in the Microsoft documentation for installing the Azure VM Agent in offline mode. https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/install-vm-agent-offline#step-2-modify-the-os-disk-to-install-the-azure-vm-agent
During this process, the system hive from the faulty disk was loaded in Registry Editor, and the required services were verified and updated.
The following registry paths were checked and updated for the Azure VM Agent services: HKEY_LOCAL_MACHINE\BROKENSYSTEM\ControlSet001\Services\WindowsAzureGuestAgent HKEY_LOCAL_MACHINE\BROKENSYSTEM\ControlSet001\Services\RdAgent
These changes ensure that the WindowsAzureGuestAgent and RdAgent services start correctly when the VM boots.