Azure Arc vmware 'Resource Bridge' - any powershell for the 'enable in azure' step?

Eccup Reservoir 66 Reputation points
2023-11-15T10:23:55.6+00:00

Azure Arc 'Resource Bridge'

When enabling VMs in Azure using the 'Resource Bridge' appliance, is there a way to script the ‘Enable in Azure’ process? I found anything in the documentation for this.

User's image

Azure VMware Solution
Azure VMware Solution
An Azure service that runs native VMware workloads on Azure.
329 questions
Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
358 questions
Windows Server 2012
Windows Server 2012
A Microsoft server operating system that supports enterprise-level management, data storage, applications, and communications.
1,556 questions
{count} votes

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 25,146 Reputation points Microsoft Employee
    2023-11-16T17:35:20.3366667+00:00

    Hello, @Eccup Reservoir !

    When enabling VMs in Azure using the 'Resource Bridge' appliance, is there a way to script the ‘Enable in Azure’ process?

    I reached out to the Arc enabled VMware vSphere team and while the PowerShell cmdlets are still being published (which is why we couldn't find them), there are Azure CLI commands that you can use.

    First, ensure that the machine is enabled in Azure:

    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:

    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"
    

    I hope this has been helpful! Your feedback is important so please take a moment to accept answers.

    If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    User's image