Hi @Goel, Akanksha ,
Thank you for your post! I can see that you are currently running the runbook from an Azure Sandbox which is the default cloud worker rather than a Hybrid Runbook worker.
Azure sandboxes are like random internet systems because they are used by all Azure customers by default. We do not create individual sandboxes on your local network so it will never be able to connect directly to your VM on a private network. You can however run your Automation runbooks on a Hybrid runbook worker directly on an Azure or non-Azure machine per the following document here.
As an alternative, you could also issue a command from an Azure Cloud Runbook that runs a script on your Azure VM using Invoke-AzVMRunCommand since the runbook at that point would not be connecting directly to the Azure VM. I have a attached a couple of sample scripts you can use for testing this method as well.
Please let me know if you have any further questions or concerns.
Thanks!
Carlos V.