Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- Access to a deployed and registered Azure Local instance with one or more running Azure Local VMs. For more information, see Create an Azure Local VM enabled by Azure Arc.
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.
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
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:
Go to Azure Local resource, and then go to Virtual machines.
In the list of VMs, select and go to the VM whose data disk you want to delete.
Go to Disks and select the data disk that you want to delete. On the command bar, select Delete.
In the confirmation dialog, select Yes to continue.
Select Save to save the changes.
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:
Go to your Azure Local resource, and then go to Virtual machines.
In the list of VMs, select and go to the VM to which you want to add a network interface.
Go to Networking. On the command bar, select + Add network interface.
On the Add network interface pane, enter the following parameters, and then select Add:
- For Name, specify a friendly name for the network interface.
- In the Network dropdown list, select a logical network to associate with this network interface.
- For IPv4 type, select DHCP or Static.
Select Apply to apply the changes.
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.
The list of network interfaces is updated with the newly added network interface.
Delete a network interface
Follow these steps in the Azure portal for your Azure Local instance.
Go to your Azure Local resource, and then go to Virtual machines.
In the list of VMs, select and go to the VM whose network interface you want to delete.
Go to Networking and select the network interface that you want to delete. On the command bar, select Delete.
In the confirmation dialog, select Yes to continue.
Select Apply to apply the changes. The network interface is dissociated from the Azure Local VM.
The list of network interfaces is updated with the deleted network interface.
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