Edit

Share via


Manage resources for Azure Local VMs enabled by Azure Arc

Applies to: Azure Local 2311.2 and later

After you deploy Azure Local virtual machines (VMs) enabled by Azure Arc, you need to add or delete resources like data disks and network interfaces. This article describes how to manage these VM resources for an Azure Local VM running on your Azure Local instance.

Add or delete resources using the Azure portal. To add a data disk, use the Azure CLI.

Prerequisites

Add a data disk

After you create a VM, you might want to add a data disk to it.

To add a data disk, you first create a disk and then attach it to the VM. Run the following commands in the Azure CLI on the computer that you're using to connect to Azure Local.

  1. Create a data disk (dynamic) on a specified storage path:

    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
    
  2. Attach the disk to the VM:

    az stack-hci-vm disk attach --resource-group $resource_group --vm-name $vmName --disks $diskName --yes
    

Expand a data disk

You can expand an existing data disk to your desired size using Azure CLI.

Note

  • This feature is available only in Azure Local version 2504 and later.
  • The size you're changing the data disk to can't be the same or less than the original size of the data disk.
  • The maximum size the disk can expand to depends on the storage capacity of the cluster. Hyper-V also imposes a VHD max of 2TB and VHDx max of 64TB.

To expand the size of your data disk using Azure CLI, run the following command:

az stack-hci-vm disk update --name $name --resource-group $resource_group --size-gb $size_in_gb

Here's a sample output that indicates successful resizing of the data disk:

{
 "endTime": "2025-03-17T17:55:49.3271204Z",
 "error": {},
 "extendedLocation": null,
 "id": "/providers/Microsoft.AzureStackHCI/locations/EASTUS2EUAP/operationStatuses/00000000-0000-0000-0000-000000000000*0000000000000000000000000000000000000000000000000000000000000000",
 "___location": null,
 "name": "00000000-0000-0000-0000-000000000000*0000000000000000000000000000000000000000000000000000000000000000",
 "properties": null,
 "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.AzureStackHCI/virtualHardDisks/dataDiskName",
 "startTime": "2025-03-17T17:55:25.8868586Z",
 "status": "Succeeded",
 "systemData": null,
 "tags": null,
 "type": null
}

Delete a data disk

Follow these steps in the Azure portal for your Azure Local instance:

  1. Go to Azure Local resource, and then go to Virtual machines.

  2. In the list of VMs, select and go to the VM whose data disk you want to delete.

  3. Go to Disks and select the data disk that you want to delete. On the command bar, select Delete.

    Screenshot of a selected data disk and the Delete button on the Disks pane.

  4. In the confirmation dialog, select Yes to continue.

    Screenshot of the confirmation dialog for deleting a data disk.

  5. Select Save to save the changes.

    Screenshot of the Save command in an empty list of data disks.

  6. You get a notification that the job for disk deletion started. After the disk is deleted, the list refreshes to display the remaining data disks.

Add a network interface

Note

After you add the network interface, sign in to the virtual machine and configure the desired static IP address.

Follow these steps in the Azure portal for your Azure Local instance:

  1. Go to your Azure Local resource, and then go to Virtual machines.

  2. In the list of VMs, select and go to the VM to which you want to add a network interface.

  3. Go to Networking. On the command bar, select + Add network interface.

    Screenshot of the command for adding a network interface on the Networking pane for a virtual machine.

  4. On the Add network interface pane, enter the following parameters, and then select Add:

    1. For Name, specify a friendly name for the network interface.
    2. In the Network dropdown list, select a logical network to associate with this network interface.
    3. For IPv4 type, select DHCP or Static.

    Screenshot of the pane for adding a network interface for a VM.

  5. Select Apply to apply the changes.

    Screenshot of the Apply button on the Networking pane for a virtual machine.

  6. You get a notification that the job for network interface creation started. After the network interface is created, it's attached to the Azure Local VM.

    Screenshot of the Notifications pane for network interface creation beside the Networking pane for a virtual machine.

  7. The list of network interfaces is updated with the newly added network interface.

    Screenshot of an updated network interface list on the Networking pane for a virtual machine.

Delete a network interface

Follow these steps in the Azure portal for your Azure Local instance.

  1. Go to your Azure Local resource, and then go to Virtual machines.

  2. In the list of VMs, select and go to the VM whose network interface you want to delete.

  3. Go to Networking and select the network interface that you want to delete. On the command bar, select Delete.

    Screenshot of a selected network interface and the Delete button on the Networking pane.

  4. In the confirmation dialog, select Yes to continue.

    Screenshot of the confirmation dialog for deleting a network interface.

  5. Select Apply to apply the changes. The network interface is dissociated from the Azure Local VM.

    Screenshot of the Apply button on the Networking pane for a VM.

  6. The list of network interfaces is updated with the deleted network interface.

    Screenshot of an updated network interface list on the Networking pane for a VM.

Manage DNS server configuration for logical networks (preview)

Key considerations

Before you update the DNS server configuration for a logical network, be aware of the following caveats:

  • This feature is in preview and shouldn't be used on production logical networks.
  • The updated DNS server configuration only applies to new Azure Local VMs created on the logical network after the update. For all the existing Azure Local VMs, manually update the DNS server entries within the VM.
  • You can't update the DNS server of a logical network that has an AKS cluster deployed.
  • The infrastructure logical network (enveloping the 6 management IP address range provided during deployment) and Arc resource bridge DNS server updates are not supported.

Update DNS server configuration

Important

Make sure to enter all the relevant DNS server IP entries in your update command and not just the entry you want to change. Running a DNS server update command replaces the existing configuration.

Follow these steps to manage DNS server configuration for logical networks.

Set parameters

$logicalNetwork = "your-logical-network"
$resourceGroup = "your-resource-group"
$dnsServers = "IP-address1", "IP-address2"

Update DNS server configuration

az stack-hci-vm network lnet update --name $logicalNetwork --resource-group $resourceGroup --dns-servers $dnsServers