|
1 | 1 | ---
|
2 |
| -title: Enable virtual hardware and VM CRUD capabilities in a machine with Arc agent installed |
3 |
| -description: Enable virtual hardware and VM CRUD capabilities in a machine with Arc agent installed |
| 2 | +title: Enable additional capabilities on Arc-enabled Server machines by linking to vCenter |
| 3 | +description: Enable additional capabilities on Arc-enabled Server machines by linking to vCenter. |
4 | 4 | ms.topic: how-to
|
5 |
| -ms.date: 01/03/2024 |
| 5 | +ms.date: 03/13/2024 |
6 | 6 | ms.service: azure-arc
|
7 | 7 | ms.subservice: azure-arc-vmware-vsphere
|
8 | 8 | author: Farha-Bano
|
9 | 9 | ms.author: v-farhabano
|
10 | 10 | manager: jsuri
|
11 | 11 | ---
|
12 | 12 |
|
13 |
| -# Enable virtual hardware and VM CRUD capabilities in a machine with Arc agent installed |
| 13 | +# Enable additional capabilities on Arc-enabled Server machines by linking to vCenter |
14 | 14 |
|
15 |
| -In this article, you learn how to enable virtual hardware management and VM CRUD operational ability on a VMware VM that has Arc agents installed via the Arc-enabled Servers route. |
| 15 | +If you have VMware machines connected to Azure via Arc-enabled Servers route, you can seamlessly get additional capabilities by deploying resource bridge and connecting vCenter to Azure. The additional capabilities include the ability to perform virtual machine lifecycle operations, such as create, resize, and power cycle operations such as start, stop, and so on. You can get additional capabilities without any disruption, retaining the VM extensions configured on the Arc-enabled Server machines. |
| 16 | + |
| 17 | +Follow these steps [here](./quick-start-connect-vcenter-to-arc-using-script.md) to deploy the Arc Resource Bridge and connect vCenter to Azure. |
16 | 18 |
|
17 | 19 | >[!IMPORTANT]
|
18 |
| -> This article is applicable only if you've installed Arc agents directly in VMware machines before onboarding to Azure Arc-enabled VMware vSphere by deploying Arc resource bridge. |
| 20 | +> This article applies only if you've directly installed Arc agents on the VMware machines, and those machines are onboarded as *Microsoft.HybridCompute/machines* ARM resources before connecting vCenter to Azure by deploying Resource Bridge. |
19 | 21 |
|
20 | 22 | ## Prerequisites
|
21 | 23 |
|
22 | 24 | - An Azure subscription and resource group where you have *Azure Arc VMware Administrator role*.
|
23 | 25 | - Your vCenter instance must be [onboarded](quick-start-connect-vcenter-to-arc-using-script.md) to Azure Arc.
|
| 26 | +- Arc-enabled Servers machines and vCenter resource must be in the same Azure region. |
24 | 27 |
|
25 |
| -## Enable virtual hardware management and self-service access to vCenter VMs with Arc agent installed |
| 28 | +## Link Arc-enabled Servers machines to vCenter from Azure portal |
26 | 29 |
|
27 |
| -1. From your browser, go to [Azure portal](https://portal.azure.com/). |
| 30 | +1. Navigate to the Virtual machines inventory page of your vCenter in the Azure portal. |
28 | 31 |
|
29 |
| -1. Navigate to the Virtual machines inventory page of your vCenter. The virtual machines that have Arc agent installed via the Arc-enabled Servers route will have **Link to vCenter** status under virtual hardware management. |
| 32 | +2. The Virtual machines that have Arc agent installed via Arc-enabled Servers route have **Link to vCenter** status under virtual hardware management. |
30 | 33 |
|
31 |
| -1. Select **Link to vCenter** to view the pane with the list of all the machines under vCenter with Arc agent installed but not linked to the vCenter in Azure Arc. |
| 34 | +3. Select **Link to vCenter** to open a pane that lists all the machines under vCenter with Arc agent installed but not linked to vCenter in Azure Arc. |
32 | 35 |
|
33 |
| -1. Choose all the machines that need to be enabled in Azure, and select **Link** to link the machines to vCenter. |
| 36 | +4. Choose all the machines and select the option to link machines to vCenter. |
34 | 37 |
|
35 |
| -1. After you link to vCenter, the virtual hardware status will reflect as **Enabled** for all the VMs, and you can perform [virtual hardware operations](perform-vm-ops-through-azure.md). |
| 38 | + :::image type="content" source="media/enable-virtual-hardware/link-machine-to-vcenter.png" alt-text="Screenshot that shows the Link to vCenter page." lightbox="media/enable-virtual-hardware/link-machine-to-vcenter.png"::: |
36 | 39 |
|
37 |
| -### Known issue |
38 |
| - |
39 |
| -During the first scan of the vCenter inventory after onboarding to Azure Arc-enabled VMware vSphere, Arc-enabled Servers machines will be discovered under vCenter inventory. If the Arc-enabled Server machines aren't discovered and you try to perform the **Enable in Azure** operation, you'll encounter the following error:<br> |
| 40 | +5. After linking to vCenter, the virtual hardware status reflects as **Enabled** for all the VMs, and you can perform [virtual hardware operations](./perform-vm-ops-through-azure.md). |
40 | 41 |
|
41 |
| -*A machine '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXXX/resourceGroups/rg-contoso/providers/Microsoft.HybridCompute/machines/testVM1' already exists with the specified virtual machine MoRefId: 'vm-4441'. The existing machine resource can be extended with private cloud capabilities by creating the VirtualMachineInstance resource under it.* |
| 42 | + :::image type="content" source="media/enable-virtual-hardware/perform-virtual-hardware-operations.png" alt-text="Screenshot that shows the page for performing virtual hardware operations." lightbox="media/enable-virtual-hardware/perform-virtual-hardware-operations.png"::: |
| 43 | + |
| 44 | + After linking to vCenter, virtual lifecycle operations and power cycle operations are enabled on the machines, and the kind property of Hybrid Compute Machine is updated as VMware. |
42 | 45 |
|
43 |
| -When you encounter this error message, try performing the **Link to vCenter** operation again after a few minutes (5-10 minutes). Alternatively, you can use the following Azure CLI command to link an existing Arc-enabled Server machine to vCenter:<br> |
| 46 | +## Link Arc-enabled Server machines to vCenter using Azure CLI |
44 | 47 |
|
| 48 | +Use the following az commands to link Arc-enabled Server machines to vCenter at scale. |
| 49 | + |
| 50 | +**Create VMware resources from the specified Arc for Server machines in the vCenter** |
45 | 51 |
|
46 | 52 | ```azurecli-interactive
|
47 |
| -az connectedvmware vm create --subscription <subscription-id> --location <Azure region of the machine> --resource-group <resource-group-name> --custom-location /providers/microsoft.extendedlocation/customlocations/<custom-location-name> --name <machine-name> --inventory-item /subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.ConnectedVMwarevSphere/VCenters/<vcenter-name>/InventoryItems/<machine-name> |
| 53 | +az connectedvmware vm create-from-machines --resource-group contoso-rg --name contoso-vm --vcenter-id /subscriptions/fedcba98-7654-3210-0123-456789abcdef/resourceGroups/contoso-rg-2/providers/Microsoft.HybridCompute/vcenters/contoso-vcenter |
48 | 54 | ```
|
49 | 55 |
|
| 56 | +**Create VMware resources from all Arc for Server machines in the specified resource group belonging to that vCenter** |
| 57 | + |
| 58 | +```azurecli-interactive |
| 59 | +az connectedvmware vm create-from-machines --resource-group contoso-rg --vcenter-id /subscriptions/fedcba98-7654-3210-0123-456789abcdef/resourceGroups/contoso-rg-2/providers/Microsoft.HybridCompute/vcenters/contoso-vcenter |
| 60 | +``` |
| 61 | + |
| 62 | +**Create VMware resources from all Arc for Server machines in the specified subscription belonging to that vCenter** |
| 63 | + |
| 64 | +```azurecli-interactive |
| 65 | +az connectedvmware vm create-from-machines --subscription contoso-sub --vcenter-id /subscriptions/fedcba98-7654-3210-0123-456789abcdef/resourceGroups/contoso-rg-2/providers/Microsoft.HybridCompute/vcenters/contoso-vcenter |
| 66 | +``` |
| 67 | + |
| 68 | +### Required Parameters |
| 69 | + |
| 70 | +**--vcenter-id -v** |
| 71 | + |
| 72 | +ARM ID of the vCenter to which the machines will be linked. |
| 73 | + |
| 74 | +### Optional Parameters |
| 75 | + |
| 76 | +**--ids** |
| 77 | + |
| 78 | +One or more resource IDs (space-delimited). It must be a complete resource ID containing all the information of *Resource Id* arguments. You must provide either *--ids* or other *Resource Id* arguments. |
| 79 | + |
| 80 | +**--name -n** |
| 81 | + |
| 82 | +Name of the Microsoft.HybridCompute Machine resource. Provide this parameter if you want to convert a single machine to a VMware VM. |
| 83 | + |
| 84 | +**--resource-group -g** |
| 85 | + |
| 86 | +Name of the resource group that will be scanned for HCRP machines. |
| 87 | + |
| 88 | +>[!NOTE] |
| 89 | +>The default group configured using `az configure --defaults group=` is not used, and it must be specified explicitly. |
| 90 | +
|
| 91 | +**--subscription** |
| 92 | + |
| 93 | +Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`. |
| 94 | + |
| 95 | +#### Known issue |
| 96 | + |
| 97 | +During the first scan of the vCenter inventory after onboarding to Azure Arc-enabled VMware vSphere, Arc-enabled Servers machines will be discovered under vCenter inventory. If the Arc-enabled Server machines aren't discovered and you try to perform the **Enable in Azure** operation, you'll encounter the following error:<br> |
| 98 | + |
| 99 | +*A machine '/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXXX/resourceGroups/rg-contoso/providers/Microsoft.HybridCompute/machines/testVM1' already exists with the specified virtual machine MoRefId: 'vm-4441'. The existing machine resource can be extended with private cloud capabilities by creating the VirtualMachineInstance resource under it.* |
| 100 | + |
| 101 | +When you encounter this error message, you'll be able to perform the **Link to vCenter** operation in 10 minutes. Alternatively, you can use any of the Azure CLI commands listed above to link an existing Arc-enabled Server machine to vCenter. |
| 102 | + |
50 | 103 | ## Next steps
|
51 | 104 |
|
52 | 105 | [Set up and manage self-service access to VMware resources through Azure RBAC](setup-and-manage-self-service-access.md).
|
|
0 commit comments