Muokkaa

Jaa


Manage resources for Azure Arc VMs on Azure Local

Applies to: Azure Local 2311.2 and later

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

You can add or delete the resources by using the Azure portal. For the task of adding a data disk, you can also 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
    

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 Arc 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 Arc 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.