---
title: "Deploying the vNIOS Instance on a Managed Disk for Azure Stack Hub"
canonical: "https://docs.infoblox.com/space/vniosazure/37519494/Deploying%20the%20vNIOS%20Instance%20on%20a%20Managed%20Disk%20for%20Azure%20Stack%20Hub"
format: markdown
---
After uploading the vNIOS image, you are ready to create a VM instance and deploy it from the Azure CLI.

To deploy a vNIOS image, complete the following steps in the Azure CLI:

1. To create a managed disk, run the following command in the Azure CLI by specifying the mentioned parameters:
  `az disk create --name <managed_disk_name> --resource-group <resource_group_name> --size 250 --sku Premium_LRS --source "https://<resource_group_name>.blob.core.windows.net/<storage_container_blob_name>/<vhd_image_name>" --source-storage-account-id "/subscriptions/<subscription_name>/resourceGroups/<resource_group_name>/providers/Microsoft.Storage/storageAccounts/<storage_account_name>" --os-type Linux`
  Note: For better performance, specify `Premium_LRS`as the`sku`.
  Example:  
`az disk create --name nios-managed-disk --resource-group rg-east-01 --size 250 --sku Premium_LRS --source "https://rgeastcloudautomation.blob.core.windows.net/images/nios-image.vhd" --source-storage-account-id "/subscriptions/1abcd012-2abc-123a-4abc-12a345678ab1/resourceGroups/rg-east-01/providers/Microsoft.Storage/storageAccounts/rgeastcloudautomation" --os-type Linux`

2. <span style="color: #000000">Create MGMT and LAN1 network interfaces by specifying the resource group, subnet, and virtual network names corresponding to the interfaces:</span>  
<span style="color: #000000">Note: When you need to add or delete a network interface to an existing vNIOS for Azure instance, you must power off the instance, add or delete the interface, and then start the instance. Adding or deleting an interface when the instance is powered on, can result in unexpected behavior.</span>  
`az network nic create --name <NIC-1_name> --resource-group <resource_group_name> --subnet <subnet_name> --vnet-name <virtual_network_name>`  
`az network nic create --name <NIC-2_name> --resource-group <resource_group_name> --subnet <subnet_name> --vnet-name <virtual_network_name>`
3. <span style="color: #000000">Create a NIOS instance by attaching the network interfaces and the managed disk to it. Provide the following details:</span>  
`az vm create --resource-group <resource_group_name> --name <instance_name> --nics <NIC-1_name> <NIC-2_name> --attach-os-disk "/subscriptions/<Subscription_ID>/resourcegroups/<resource_group_name>/providers/`  
`Microsoft.Compute/disks/<managed_disk_name>" --size <VM_size> --location <location_name> --os-type Linux`  
  
Example:  
`az vm create --resource-group rg-east-01 --name nios-vm-with-managed-disk --nics nic1 nic2 --attach-os-disk "/subscriptions/1abcd012-2abc-123a-4abc-12a345678ab1/resourcegroups/rg-east-01/providers/Microsoft.Compute/disks/nios-managed-disk" --size Standard_DS14_v2 --location eastus --os-type Linux`

> ⚠️ ### Note
> ⚠️ 
> ⚠️ <span style="color: #000000">When the Azure CLI is used to deploy a vNIOS instance on a managed Azure disk, cloud-init functionalities do not work as expected. If you need to use them, do one of the following:</span>
> ⚠️ 
> ⚠️ - <span style="color: #000000">*[Deploy the vNIOS instance on an unmanaged disk](https://infoblox-docs.atlassian.net/wiki/spaces/vniosazure/pages/37454044)*</span>
> ⚠️ - <span style="color: #000000">*[Deploy the vNIOS instance from the Microsoft Azure Stack Hub portal](https://infoblox-docs.atlassian.net/wiki/spaces/vniosazure/pages/37650661)*</span>