DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Power of Azure B Series Virtual Machines
  • Azure Virtual Machines
  • Keep Your Application Secrets Secret
  • What Is Azure Site Recovery Service?

Trending

  • LLM-Powered Deep Parsing for Industrial Inventory Search
  • Contract-First Integration: Building Scalable Systems With Flyway, OpenAPI, and Kafka
  • Chaos Engineering Has a Blind Spot. Agentic AI Lives in It.
  • MuleSoft IDP: Enhancing Efficiency and Accuracy in Data Extraction
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Hands-On with Azure Local via the Azure Portal

Hands-On with Azure Local via the Azure Portal

This guide explains how to deploy LocalBox with Azure Bicep and create Azure VMs, covering setup, networking, images, and deployment without physical hardware.

By 
Sanjeev Kumar user avatar
Sanjeev Kumar
·
Mar. 02, 26 · Tutorial
Likes (0)
Comment
Save
Tweet
Share
1.3K Views

Join the DZone community and get the full member experience.

Join For Free

Steps to Create a Virtual Machine on Azure Local Using the Azure Portal

1. Definition of Keywords

LocalBox

LocalBox is an Azure Local lab environment created by Microsoft’s Azure Jumpstart team. You do not need to buy hardware such as Dell AX nodes or other vendors' nodes for practice.

Where does LocalBox run?

1.1 On a user's Azure subscription:
This creates a large VM (32 vCPU or 16 vCPU depending on the template). LocalBox runs inside the created VM.

1.2 On a user's laptop/desktop using Hyper-V

If the user’s laptop has:

  • Windows 11
  • 32–64 GB RAM
  • SSD

Then LocalBox can be deployed locally.

Azure Bicep

Azure Bicep is used to deploy LocalBox into your Azure subscription.

2. Deploy LocalBox Infrastructure with Azure Bicep

Log in to https://portal.azure.com. For this demo, I am using my personal account. Create an account if you do not already have one.

Register the required Azure resource providers. Make sure your Azure subscription is registered for the required resource providers. To register them, you must be an Owner or Contributor on your subscription.

Click on Cloud Shell.

Image 1


Register the following providers using Azure CLI:

Plain Text
 
az provider register --namespace Microsoft.HybridCompute

az provider register --namespace Microsoft.GuestConfiguration

az provider register --namespace Microsoft.HybridConnectivity

az provider register --namespace Microsoft.AzureStackHCI

az provider register --namespace Microsoft.Kubernetes

az provider register --namespace Microsoft.KubernetesConfiguration

az provider register --namespace Microsoft.ExtendedLocation

az provider register --namespace Microsoft.ResourceConnector

az provider register --namespace Microsoft.HybridContainerService

az provider register --namespace Microsoft.Attestation

az provider register --namespace Microsoft.Storage

az provider register --namespace Microsoft.Insights

az provider register --namespace Microsoft.Keyvault


Image 2


Clone the Arc Jumpstart GitHub repository

Plain Text
 
git clone https://github.com/microsoft/azure_arc.git


Image 3


Install or update Azure CLI

Install or update Azure CLI to version 2.65.0 or later. Use the following command to check your installed version:

Plain Text
 
az --version


Image 4

Log in to Azure CLI

Plain Text
 
az login


Image 5

Ensure that you have selected the correct subscription where you want to deploy LocalBox by using:

Plain Text
 
az account list --query "[?isDefault]" 


Image 6


You can deploy LocalBox in any Azure region that has sufficient compute capacity (vCPU quota) for the selected VM SKU (Standard E32s v5 or v6). By default, a LocalBox deployment requires 32 ESv6-series vCPUs.

Ensure that your Azure subscription has sufficient vCPU quota available in the target region before deploying LocalBox. You can use the following command to check your vCPU utilization:

Plain Text
 
az vm list-usage --location centralindia --output table


Image 7.1

Image 7.2Image 7.3


Deploy the Bicep Template

Upgrade to the latest Bicep version:

Plain Text
 
az bicep upgrade


Image 8


Retrieve the object ID of your directory's Azure Local resource provider

Plain Text
 
Retrieve the object ID of your directory's Azure Local resource provider


Image 9

Update main.bicepparam

Plain Text
 
cd azure_arc/azure_jumpstart_localbox/bicep


Image 10

Open main.bicepparam using vi and provide the following values according to your environment:

Plain Text
 
param tenantId = '9980ce5f-e181-4db5-afe0-7c35244539cd'

param spnProviderId = 'ddb0edb4-b415-4d21-a15f-30d8189e90ea'

param windowsAdminUsername = 'arcdemo'

param windowsAdminPassword = '@Arcdemo123456'

param location = 'centralindia'

param azureLocalInstanceLocation = 'centralindia'


Image 11


Note: To find the value of spnProviderId, go to https://portal.azure.com, search for Microsoft.AzureStackHCI Resource Provider, and copy the Object ID.

Image 12


Create a new resource group

Plain Text
 
az group create --name "localbox-rg"   --location "centralindia"


Image 13


Deploy the Bicep file

Plain Text
 
az deployment group create -g "localbox-rg" -f "main.bicep" -p "main.bicepparam"


Image 14


Once deployment is complete, open the Azure portal to see the initial LocalBox resources inside your resource group.

Image 15


Connecting to the LocalBox Client Virtual Machine

Note: RDP (port 3389) and SSH (port 22) are not open by default in LocalBox deployments. The user needs to create a Network Security Group (NSG) rule to allow access to port 3389.

Enable RDP (3389) on the Client Virtual Machine

Log in to https://portal.azure.com if you are not already logged in. Search for Virtual Machines and click on it.


Image 16


Click on LocalBox-Client.

Image 17


Click on Network settings.

Image 18


Click on Inbound port rules.

Image 19

Select:

  • Service: RDP
  • Action: Allow
  • Priority: 100
  • Name: RDP-Access

Click Add.

Image 20


The security rule is now created to access the virtual machine on port 3389.

Image 21


Click on Overview, then click Connect → Connect.

Image 22


Click Download RDP file.

Image 23


Open the downloaded file and log in to the virtual machine using the password provided in the main.bicepparam file during VM creation.

Image 24


You should now be able to log in.

Image 25


How to Create a Virtual Machine on the Created LocalBox

Azure Local allows you to create and manage virtual machines and other services directly from the Azure portal. The LocalBox instance comes preconfigured with the components required for VM management through the Azure portal.

Create Virtual Machine Images from Azure Marketplace

Before creating virtual machines on your Azure Local instance from the Azure portal, you need to create VM images that can be used as a base. These images can be imported from Azure Marketplace or provided directly by the user. In this use case, we will create an image from Azure Marketplace.

Click on localbox-rg in the Azure portal.

Image 26


Click on localboxcluster.

Image 27


Click on VM Images in the menu. Then click the Add VM image dropdown and select From Azure Marketplace.

Image 28


Provide:

  • VM image name
  • Default custom location (from dropdown)
  • Leave storage path set to Choose automatically

Click Review + Create.

Image 29.1

Image 29.2


Click Create.

Image 30


The image will now be deployed.

Image 31


Create a Logical Network on Your Azure Local Instance

As shown in the table below, this LocalBox networking includes a 192.168.200.0/24 subnet tagged to VLAN 200. This network is designed for use with Arc-enabled VMs on LocalBox.

To use this preconfigured network, you need to create a logical network resource that maps to this subnet.

Network detail Value

Subnet

192.168.200.0/24

Gateway

192.168.200.1

VLAN id

200

DNS Server

192.168.1.254


Log in to LocalBox-Client (LocalBox-Client VM) and get the IP address from the Azure portal.

Image 32


Open File Explorer and navigate to C:\LocalBox.

Right-click on Configure-VMLogicalNetwork.ps1 and choose Run with PowerShell.

Image 33


Alternatively:

  • Right-click the file
  • Select Open with Visual Studio Code
  • Click the Run button

Image 34


Once the script completes, check your resource group in the Azure portal to verify that the logical network resource has been created.

Image 35


Create a Virtual Machine

Click on localboxcluster.

Image 36


Click on the Virtual machines blade, then click Create VM.


Image 37


Select:

  • Resource Group: localbox-rg
  • VM Name: WinVm1
  • Security type: Standard
  • VM image: WinVmImage1
  • Processor count: 2
  • Memory: 8192 MB
  • Username and Password

Click Next, then Next again to go to the Network tab.

Image 38

Image 39.1

Image 39.2


Click Add network interface.

Provide:

  • Interface name
  • Select the previously created network from the dropdown
  • Allocation method: Automatic

Add the network card.

Image 40


Click Next.

Image 41.1

Image 41.2


Review the virtual machine details and click Review + Create, then click Create.

Image 42.1

Image 42.2


The VM is now created.

Image 43


Summary

First, we deploy LocalBox using Azure Bicep.
Next, we clone the Arc Jumpstart GitHub repository through Azure Cloud Shell.
Then, we create virtual machine images from Azure Marketplace.
Finally, we create a virtual machine using the generated image.

Remote Desktop Protocol azure Virtual Machine

Opinions expressed by DZone contributors are their own.

Related

  • Power of Azure B Series Virtual Machines
  • Azure Virtual Machines
  • Keep Your Application Secrets Secret
  • What Is Azure Site Recovery Service?

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook