Hello @Bijoy Chakraborty (IN)
After a VM is brought into Azure Local, the Azure portal does not immediately show the “Enable Guest Management” option under VM -> Configuration. This behavior is expected.
Reason:-
Guest Management depends on the Azure Local Guest Agent being installed inside the VM. For both migrated and manually created VMs, this agent is not installed automatically. Until the agent is installed and registered, the Azure portal cannot display the Guest Management toggle.
How to enable guest management then?
Pre-requisites :
- Azure Local (Azure Stack HCI) must be version 2405 or later.
- Arc Resource Bridge must be deployed.
- A Custom Location must be configured.
- The VM must be running a supported 64-bit Windows or Linux operating system.
- The VM must have outbound connectivity to Microsoft endpoints, either through the public internet or a proxy.
Required permissions:
- At least the Contributor role on the resource group
- Access to the Azure Local host to run Azure CLI commands
- Able to sign in to the VM using RDP or SSH to run installation scripts.
Note: If the VM was migrated using Azure Migrate, there is one additional requirement.
The migration must have been performed using Azure Migrate Server Migration to Azure Local. If any other migration method was used, the non-Azure-Migrate steps must be followed.
Steps to enable guest management:
Use these steps only if Azure Migrate was used
Step 1. Power off the VM if it is Generation 1. Generation 2 VMs can remain running unless the ISO attachment fails.
az stack-hci-vm stop --name <vmName> --resource-group <rgName>
Step 2. Attach the Guest Agent provisioning ISO.
az stack-hci-vm update --name <vmName> --resource-group <rgName> --enable-vm-config-agent true
Step 3. Start the VM and sign in.
az stack-hci-vm start --name <vmName> --resource-group <rgName>
Step 4. Install the guest agent inside the VM.
For Windows:
$d=Get-Volume -FileSystemLabel mocguestagentprov; $p=Join-Path ($d.DriveLetter+':') 'install.ps1'; & $p
For Linux:
sudo -- sh -c 'mkdir /mociso; mount -L mocguestagentprov /mociso; bash /mociso/install.sh; umount /mociso; rm -df /mociso; eject LABEL=mocguestagentprov'
Step 5. Enable Guest Management.
az stack-hci-vm update --name <vmName> --resource-group <rgName> --enable-agent true
Step 6. Verify in the Azure portal.
Go to VM -> Properties -> Configuration and confirm that Guest Management shows as Enabled.
If the VM was not migrated using Azure Migrate, use below steps:
This applies to VMs created manually, imported from VHDs, or migrated using HCX or third-party tools.
Step 1. In the Azure portal, go to Azure Local, then Virtual Machines, select the VM, and open the Guest Management settings.
Step 2. Select “Enable Guest Management”.
The portal will guide you through attaching the agent ISO, installing the agent inside the VM, and registering the VM with Azure Arc.
Step 3. If prompted, install the guest agent inside the VM.
For Windows, run the same PowerShell command:
$d=Get-Volume -FileSystemLabel mocguestagentprov; $p=Join-Path ($d.DriveLetter+':') 'install.ps1'; & $p
For Linux, run the same install command:
sudo -- sh -c 'mkdir /mociso; mount -L mocguestagentprov /mociso; bash /mociso/install.sh; umount /mociso; rm -df /mociso; eject LABEL=mocguestagentprov'
Step 4. Validate the status.
The Azure portal should now show Guest Management as Enabled and Connected.
References:
- https://learn.microsoft.com/en-us/azure/azure-local/migrate/migrate-enable-guest-management?view=azloc-2601
- https://learn.microsoft.com/en-us/azure/azure-local/manage/manage-arc-virtual-machines?view=azloc-2601&tabs=azureportal#enable-guest-management
If you have any additional questions, please leave a "comment" and we'll be happy to assist you further.
If this helped to clarify your query, please don't forget to click on the "Accept Answer" button.
The "Accept Answer" button will appear as shown below: