Manage resources for Arc VMs on Azure Local
Applies to: Azure Local, version 23H2
This article describes how to manage VM resources such as disks and networks interfaces for an Azure Arc virtual machine (VM) running on your Azure Local instance. You can add or delete data disks and add or delete network interfaces using the Azure portal.
Manage Arc VM resources
Once the Arc VMs are deployed, you may need to manage the VMs. This would require adding or deleting data disks, and adding or deleting network interfaces.
Prerequisites
Before you begin, make sure to complete the following prerequisites:
- You have access to an Azure Local instance that is deployed and registered. You should have one or more Arc VMs running on this system. For more information, see Create Arc VMs on your Azure Local.
Add a data disk
After you have created a VM, you may want to add a data disk to it. You can add a data disk via the Azure CLI or the Azure portal.
To add a data disk, you need to first create a disk and then attach the disk to the VM. Follow these steps in Azure CLI of the computer that you are using to connect to your Azure Local.
To create a data disk (dynamic) on a specified storage path, run the following command:
az stack-hci-vm disk create --resource-group $resource_group --name $diskName --custom-location $customLocationID --location $location --size-gb 1 --dynamic true --storage-path-id $storagePathid
You can then attach the disk to the VM using the following command:
az stack-hci-vm disk attach --resource-group $resource_group --vm-name $vmName --disks $diskName --yes
Delete a data disk
Follow these steps in Azure portal of your Azure Local.
Go to Azure Local resource and then go to Virtual machines.
From the list of VMs in the right pane, select and go to the VM whose data disk you want to delete.
In the confirmation dialog, select Yes to continue.
Save the changes to delete the specified data disk.
You'll see a notification that the disk deletion job has started. Once the disk is deleted, the list refreshes to display the remaining data disks.
Add a network interface
Note
After you add a network interface to a provisioned VM on a static logical network, you can configure the desired static IP within the VM to ensure accurate static IP settings.
Follow these steps in Azure portal of your Azure Local.
Go to your Azure Local resource and then go to Virtual machines.
From the list of VMs in the right pane, select and go to the VM to which you want to add a network interface.
Go to Networking. From the top command bar in the right pane, select + Add network interface.
In the Add network interface blade, input the following parameters:
- Specify a friendly Name for the network interface.
- From the dropdown list, select a logical Network to associate with this network interface.
- Choose the IPv4 type as DHCP or Static.
Apply the changes to add the specified network interface.
You'll see a notification that the network interface creation job has started. Once the network interface is created, it is then attached to the Arc VM.
The list of network interfaces is updated with the newly added network interface.
Delete a network interface
Follow these steps in Azure portal of your Azure Local.
Go to your Azure Local resource and then go to Virtual machines.
From the list of VMs in the right pane, select and go to the VM whose network interface you want to delete.
In the confirmation dialog, select Yes to continue.
Apply the changes to delete the specified network interface. The network interface is dissociated from the Arc VM.
The list of network interfaces is updated with the deleted network interface.