No response on "Run Command" option on Azure VM and Invoke-AzVMRunCommand (When I run the command, script with these mathods)

Sonu Kumar 11 Reputation points
2022-01-25T23:22:11.847+00:00

Hello Guys,

We have multiple Azure VMs in environment but getting below issue on some of them.

Issue -

  1. When we run any command Or Script via "Run Command" option inside "Operations" of a Azure VM via Portal. And run any command like "Get-Service". The command always shows that "Executing" in output section. A complete black output windows and "Run" option grayed out which looks command executing but it never give result.
  2. On the same azure VM when we try to run any PowerShell script via command "Invoke-AzVMRunCommand" the same things happens.

Troubleshooting I tried :

No errors in VM agent logs on affected VM.
Extensions seems to be fine when I compared with non faulty VM

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

2 answers

Sort by: Most helpful
  1. shiva patpi 13,256 Reputation points Microsoft Employee
    2022-01-26T00:14:47.45+00:00

    Hello @Sonu Kumar ,
    Can you try the same commands using CLI (instead of using the Azure Portal)?

    https://learn.microsoft.com/en-us/cli/azure/vm/run-command?view=azure-cli-latest#az-vm-run-command-invoke

    There are couple of examples mentioned in the above document. Check if you get responses using those commands.

    Regards,
    Shiva.

    0 comments No comments

  2. Sonu Kumar 11 Reputation points
    2022-02-15T13:51:23.39+00:00

    Hi Shiva,

    Unfortunately same problem with Azure CLI . When we run same Power CLI command "az vm run-command invoke" on working VM it succeeded2. On Faulty server , command keep running


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.