Deploy Azure Stack Development Kit on an Azure VM

With the recent release of V3 VMs on Azure, you’ve now the possibility to do Nested Hyper-V, running a VM in an Azure VM.

Azure Stack Development Kit just released, it was the opportunity for me to deploy the last version in Azure, because I don’t have the necessary hardware at home to run it.

Be careful, the following article is not supported by Microsoft and can be used only for test.

Daniel Neumann, TSP Azure at Microsoft provided a version for his installation, on L2 nested virtualization:

I will use some parts of his blog for my installation. The difference is that he is deploying Azure Stack in a VM, on the Azure VM. In my case, we will deploy Azure Stack directly on the Azure VM.

Before starting, create an Azure AD account who is Global Admin. This account will be used to connect your Azure Stack to your Azure AD.

To start, deploy a VM on Azure, with the image Windows Server 2016 and with the minimum size E16s v3 (16 cores, 128 GB memory). It’s prerequisites to be able to run Azure Stack:

When the VM is deployed, do not apply any updates, just ignore them. We will rename the local administrator to Administrator, so we don’t have to modify scripts:

Stop the VM through the Azure Portal, and go to Disks. Expand the OS disk to 256GB and add 4 disks for the Storage Spaces Direct part, with 256GB each:

Start the VM and initialize disks. Modify the timezone with your time zone and deactivate the IE Enhanced Security Configuration parameter. You can connect and install prerequisites to gain time for the next part:

Restart the server:

You can now download Azure Stack Development Kit:

When extracted, mount the disk CloudBuilder.vhdx and copy folders CloudDeployment, fwupdate and tools in the root of your C drive. You can eject the disk CloudBuilder. Open a PowerShell console and do:

For IP addresses, use IP addresses that are not used in your Azure VNet and in your Azure Stack environment. You’ll have a first error who will be that your server is not physical. Don’t worry, you need to modify the file C:\CloudDeployment\Roles\PhysicalMachines\Tests\BareMetal.Tests.ps1 and to find $isVirtualizedDeployment. This variable is present 3 times in the file.

Remove the -not before each variable. Launch the installation again with the following command:


If you’ve an error with CredSSP when the script is modifying the number of maximum joined computer, follow this procedure. On the DC server, execute the following command:

On the Hyper-V server, execute the following command:

Open the gpedit.msc console and navigate to Local Computer Policy > Computer Configuration > Administrative Templates > System > Credential Delegation.

Activate Allow Delegating Fresh Credentials with NTLM-only Server Authentication and add the value WSMAN/*. Launch the script again:


When the BGPNAT VM is deployed, execute the following script on the Azure VM to create a new virtual switch that will give Internet access to your VM, by adapting IP addresses with IP that you used when you launched the installation:

Go in the parameter of the BGPNAT VM and change the virtual switch for the network card NAT from PublicSwitch to NATSwitch:

You can now ping external IP addresses:

The deployment of the infrastructure continues:

After few hours, the deployment is finished and you can connect to the admin and user interfaces:

Spread the word. Share this post!

Florent Appointaire

About the author

Florent is a Freelance Cloud Consultant. He is MVP Cloud and Datacenter Management, certified in Azure and Private Cloud technologies. He likes Microsoft technologies in general, with a preference for System Center/Hyper-V, Azure Stack/WAP and Azure.

  • Perfect content. I knew MS azure does not support this and certainly this article is worth try.

  • Stack user

    I have changed NIC of BGPNAT VMfrom PublicSwitch to NATSwitch.
    What should I do to continue the deployment of the infrastructure?

    • Hello,
      As explained in the article, the deployment will fail. Just relaunched it

  • Yusuf Anis

    Any clues for how this can be corrected?
    Expanding Microsoft.AzureStack.Solution.Deploy.CloudDeployment. Copying content to C:CloudDeployment.
    Find-Package : No match was found for the specified search criteria and package name ‘Microsoft.AzureStack.Solution.Deploy.CloudDeployment’. Try Get-PackageSource to see all available registered package sources.
    At C:CloudDeploymentSetupExpand-NuGetContent.psm1:62 char:25
    + … etPackage = Find-Package -Source $NugetStorePath -Name $NuGetName -Pr …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Microsoft.Power…ets.FindPackage:FindPackage) [Find-Package], Exception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.FindPackage

    • Hello,
      It’s strange, did you installed the nuget package?

      Install-PackageProvider nuget –Verbose

  • Sundesh Pawar

    It did go through smoothly after changing “network card NAT from PublicSwitch to NATSwitch:” and i was able to see all the Vm’s getting populated in the Hyper-V manager. However later the script ended with attached Error and i just shutdown the machine. When i turned on the VM after the weekend , i could see just 2 Vm’s (DC and ERCS01) and all others were gone. When i attempted to rerun the installationpoc script, it gave message saying :”In order to run deployment you must be logged in as the Domain Admin account’.” Though i had logged in as Domain admin and also attempted to run the PS as Admin.

    • Hello,
      You’re logged with azurestackazurestackadmin account?

      • Sundesh Pawar

        Yes. I did login with that account.

  • Philippe PAÏOLA

    On Azure VM host and on guest AzS-DC01, you must set the same timezone, date and hour (tzutil /s “pacific standard time”). Then on Hypervisor, check Time synchronization on Integration services

    • Thanks for this type. It depends where the VM is deployed for sure.

  • Philippe PAÏOLA

    An other error : use this command “Invoke-EceAction -RolePath Cloud -ActionType Deployment -Start 60.160 –Verbose” when installation failed after step “Natswitch”.