Virtual machine agent installation powershell issue

Handinata Tanudjaja 190 Reputation points
2025-04-08T01:42:38.9433333+00:00

Hi everyone,

I captured a specialized image from an existing VM that runs normally.
By design, the existing VM only has private IP and it's RDP accessible due to VPN gateway.

So when I created the new VM with the specialized image, it also has private IP only and it should only be accessible via RDP.

However, I am not able to RDP to it because I have this error message in the new VM: "virtual machine agent status is not ready."

I think I read somewhere that VM that created from specialized image doesn't have virtual machine agent installed by default.

I have tried the powershell command from documentation but it doesn't work:
$vm = Get-AzVM -Name <VM Name> -ResourceGroupName <Resource Group Name> $vm.OSProfile.AllowExtensionOperations = $true
$vm | Update-AzVM

I even tried redeploy, reapply, restart, stop and start as well after the powershell command has finished executing.

Anyone knows what I did wrong?

Thank you

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,686 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.