question

Nima-7774 avatar image
1 Vote"
Nima-7774 asked tbgangav-MSFT answered

Central VM which can control many other VMs

Hi there,

I need to deploy many VMs in Azure but want to have a central VM which can manage other VMs. I need to run some GA (Genetics Algorithm) on this VM which requires generating input files, sending them to other VMs, making them run some jobs, and finally receive output from them. Is this possible on Azure?
I

Thanks

azure-automation
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

tbgangav-MSFT avatar image
0 Votes"
tbgangav-MSFT answered

Hi @Nima-7774,

Short answer: Yes AFAIK it should be possible on Azure.

Long answer: Just FYI, in general VMs in the same Virtual Network would be able communicate with each other (with any port and any protocol) in the Network Security Group unless you have added some inbound or outbound port rules with high priority. Also some rules in windows firewall blocks on the VMs so such rules needs to be removed. The idea is to check and make sure that any such dependencies are removed and then make sure VMs can communicate with each other.

And then I would recommend to leverage Run command feature in Azure VMs and Azure Automation runbooks. If you need inputs on how to achieve it then below are few of the references for the same:

  1. To run a PS command on the VM - Invoke-AzVMRunCommand

  2. Check approach number 2 in this answer to directly save the script in storage account and then have an Azure Automation PowerShell runbook to run the script in a VM using Invoke-AzVMRunCommand. (or)

  3. Check approach number 3 in this answer to directly save the script in a VM and then have an Azure Automation PowerShell runbook to run the script in that VM using Invoke-AzVMRunCommand.

For your use case or scenario, you may have to up level the parent runbook to run the parent script in central VM and then automatically to call the child runbooks to run the child scripts or jobs in other VMs. Refer this document to understand more about child runbooks.

Related references:
- Enable-PSRemoting
- Windows Run command
- Linux Run command

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.