Arc Enabled VMWare VSphere

SujinaSJ-1789 271 Reputation points
2023-11-16T04:11:40.75+00:00

As per MS docs, Azure Arc-enabled VMware vSphere is available in public preview only. So planning to install the arc agent on individual VMs.Is there any automation script or similar method for installing the agent on multiple VM simultaneously without logging into individual VMs as we have around 2000 VMs. TYIA

Azure VMware Solution
Azure VMware Solution
An Azure service that runs native VMware workloads on Azure.
359 questions
Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
435 questions
{count} votes

Accepted answer
  1. tbgangav-MSFT 10,416 Reputation points
    2023-11-16T13:51:37.82+00:00

    Hi @SujinaSJ-1789 ,

    I have reached out to internal product team and below is the update and insights gathered.

    You can use AZ CLI to install and enable arc agents. Additional automation options like PowerShell & Terraform will be also available soon, we are actively working to publish them in next 1-2 weeks. Az connected vm sub command can be used to enable VMs and install guest agents using AZ CLI.

    Additional information about the AZ CLI commands:

    To install the guest agents, first you will need to ensure the machine is enabled in Azure. If it's not then you can use the following command to do it. 

    https://learn.microsoft.com/en-us/cli/azure/connectedvmware/vm?view=azure-cli-latest#az-connectedvmware-vm-create 

    az connectedvmware vm create --custom-location "custom location name" --location "location name" --inventory-item "name or id of the inventory item" --name "virtual machine name" --resource-group "resource group name" --vcenter "name or id of the vcenter"
    

     Then you can install the arc agent using the following command 

    https://learn.microsoft.com/en-us/cli/azure/connectedvmware/vm/guest-agent?view=azure-cli-latest#az-connectedvmware-vm-guest-agent-enable

    az connectedvmware vm guest-agent enable --username "vm user name" --password "vm password" --resource-group "resource group name" --subscription "Name or ID of subscription" --vm-name "vm name"
    

    You would have to loop these above steps for each VM to convert it as an automation script. I am trying to gather sample reference scripts to try helping further, I will share it here once I have some decent sample reference scripts.

     

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.