Install Azure Stack POC into a VM

1 Feb

Last week Microsoft released a first preview of the Microsoft Azure Stack. The software stack which allows you to run Azure in your own datacenter.

Official a physical server with quite a lot of CPU cores and memory is required to deploy the Azure Stack Technical Preview. Because I do not have any spare servers in my home lab to use exclusively for the Azure Stack Technical Preview I looked for an alternative and I tried to deploy it in a VM. And here is a short walkthrough how you do it and yes it actually works. Smile

First of all you need the following:

  • A Hyper-V Host installed with Windows Server 2016 TP4
    (TP4 is needed for nested virtualization feature)
  • The “Microsoft Azure Stack Technical” file which you can get from here:
  • At least 32GB of RAM and 150GB of free Disk space available

Frist extract the Microsoft Azure Stack Technical on to the local hard drive of the Hyper-V Host. This will lead you to a folder with an .exe and 6 .bin files.


Run the Microsoft Azure Stack POC.exe to extract the actually data to deploy the Azure Stack Preview. This created the “Microsoft Azure Stack POC” folder.

Then copy the “WindowsServer2016Datacenter.vhdx” outside of the “Microsoft Azure Stack POC” folder and rename it to e.g. MicrosoftAzureStackPOCBoot.vhdx.


Mount (double click) the copied VHDX and copy the whole “Microsoft Azure Stack POC” folder into it.

Then dismount the VHDX through Explorer or by PowerShell (Dismount-VHD)image

Now it’s time to create a “litte” Winking smile VM with 32GB of RAM at minimum and as much vCPU as your hardware can suffer.
Note: Dynamic Memory must be disabled on this VM!

Use the copied VHDX form above as the first disk (boot disk) of this VM and add 4 more empty data disks. (min. 140GB each)


Enable MAC address spoofing on the Network Adapter.
This is need for network connectivity of the nested VMs which the Azure Stack Setup will create.SNAGHTML696a02f

Lastly the nested visualization feature (new in TP4) must be enabled on the vCPU of the VM. Do this with the following PowerShell command:

Azure Stack Deployment:
Now start the VM and answer the question of the Windows Setup and the login with local Administrator account.

If you have less than 96GB RAM assigned to the VM you have to tweak the deployment script before you start the setup. Daniel Neumann has written an excellent blog post about the necessary modifications:

Now, finally, you can run the PowerShell deployment script (Deploy Azure Stack.ps1) as it is described in the original documentation from Microsoft. The script will take several hours to finish. So better get you a cup of coffee or have a “little” break and hope everything goes well. Smile If it does, you will get a functional Azure Stack installation in a VM.

Update 09.03.2016:
Although the setup just works fine in the VM and you can even provisioning Subscriptions and Tenant VMs there are some serious issues with networking when using this nested setup. As soon as you connect to a fabric VM (with RDP or VM Console) the VM with the virtual Hyper-V Host will crash.
Many thanks to Alain Vetier for pointing this out and sharing his finding here!
See also his comments below.

  • Johan

    I am just getting a Blinking promt on a black screen when starting the VM. Any idea whats wrong? And I have been at it more then one time, and always the same issue.

    • Jonas Feller

      This sounds like the VM can not find the a disk to boot form.
      Are you using the Windows Server 2016 VHDX from the Azure Stack POC Setup or did you made your own VHDX?
      Is the boot order of the VM correct? (HDD on the first place). It must also be a Gen2 VM the VHDX from the Azure Stack POC Setup does not boot in a Gen1 VM.

  • paul

    Is this a Gen1 or Gen2 VM?

  • paul

    Looks like the answer is Gen2.

    My install got down to task 17 and then failed trying at CreateFailoverCluster.

    Not sure where to go next…

  • Godfrey

    I keep getting a failure to connect to AAD, in the prereq steps, just after mac address verification. I looked into it further and watched the network traffic, but it never hits the nic. So Im struggling to identify the issue, at first I thought it was proxy, but as i said, no traffic is even hitting the nic at that step.

    Im working to id the issue, but any thoughts are welcome. Thanks for the great post.

    • Jonas Feller

      Don’t know what exactly went wrong in your setup. But did you verified that you have internet access and you can reach inside the VM?

  • Hello Jonas,
    i have the same setup and having a good hardware 🙂 But now my nested host just freeze when Mac spoofing is enabled. it was working good last month i suspect the updates from end of february. Are you facing any issues right now with mac spoofing enabled and does your VXLANs work ?

    • Jonas Feller

      Hello Alain,
      I had a similar issue. It was working for a while and then suddenly the VM, acting as the virtual Hyper-V Host, was stop responding and shortly after that it crashed with a blue screen. I then read somewhere that the bits for the AzureStack setup were updated. So I downloaded it again and did a new deployment. Since then it works fine again including vNets.
      However the Switch Embedded Teaming (SET) in Server 2016 TP4 seems to have some problems if a VM has MAC spoofing enabled. I had configured a SET with multiple NICs on my physical host and as soon as I enabled MAC spoofing for the VM, networking was not working anymore inside of the VM. (9 of 10 pings were lost) Are you perhaps also using SET on the physical host?

  • hello jonas,
    thank you for your reply 🙂 well indeed i’m experiencing the same behaviors with new bits. i’m from microsoft so i could have some informations about the changes from the new bits. There has been no changes into MAS bits, actually mostly system were updated with last Windows updates and the 2012 R2 images include now dotnet 3.5 so i suspect a Windows update from february releases. The issue i’m facing is exactly the one you describe (blue screen with health monitor message). With the new bits the issue start to appear if only for some reason i connect to one of the fabrik VM. Once it did happens at least one time it will keep crashing as long as mac spoofing is enabled 🙁 i’m trying to find a workaround by checking the updates content and also playing with promiscious port mode). On the physical host i’m not using set at all , actually using an external switch on one nic with management os enabled and an internal switch. I’m using a vyos router Appliance to handle traffic between internal networks and external.

    • Jonas Feller

      Hi Alain, Ah, thanks for the clarification about the new bits. 🙂 It was indeed no official information that I read. But I had noticed that some thing was happened with the bits because the files of the second download were newer and a little bit bigger. But updates in the images naturally explains that.
      So we experience exactly the same problem. You are right. Now while you saying that a connection to a fabric VM will make the Host VM to crash, I suddenly remembered, that it happens the first time after I connected to the NATVM. And that’s it. I can now also reproduce it. As soon as I login into the NATVM (no matter if over RDP or VM Console) the host VM stops responding and crashes. 🙁 Maybe it has something to do that the NATVM has also one interface (external interface) in the same network like the Host VM (basically in the physical network).

      • well it will happens on whatever VM you connect from the fabric but a client VM. i’m still digging into it and what i can see is that thre is a logon script on each fabrik VM so i’m checking if it is not related to these. But for now as a test i’m just going to reploy right now first MAS release without any update and see if i can reproduce to check out if it is really related to one of the updates or not. I’ve seen yesterday when looking at the content for the february cumulative updates for TP4 that many network DLL were updated. So i keep focus on this test first :). maybe the two of us could look for different leads and try to finally find a solution :). It’s really boring because it was really working great and as it is i cannot trust the Platform enough now to use it for demo 🙁

        • test done, same behaviors with previous bits 🙁 so everything works just like a charm as long as you don’t connect to any fabrik VM 🙁

  • well the story is over :p i took some network traces, hyper-v switch freaks out as soon as a frame from VXLAN1001 comes to the host, at this point it needs to go through the card which has nested enabled and VXLAN tagging is using the macaddress header into the frame so it fails badly… without promiscious mode it’s not going to happen …. So i just tried with VMware Workstation which has a way different architecture in switching (does not secure communication by port with the macadress of the virtual nic attached to it and support promiscious mode at switch level) and without a surprise everything worked like a charm… the same goes to ESX 6.0 … We will see if the changes coming with TP5 will solve that … let me know if you find a workaround but i have even tried to play with promiscious mode at port level on the hyper-v switch and was still not enough 🙁

    • Jonas Feller

      Hey Alain, Wow so you done some really deep troubleshooting. 😉 Thanks for sharing your findings here with me!
      So basically the nested vSwitch has some big issues with VXLANs? My experience in general with TP4 was that TP4 has, regarding to networking, has some really big problems. VLANs with NIC teaming is not working, SET has some troubles and now this. So let us hope that TP5 is more stable an solve this issue 😉
      If I would find some workaround for this issue I will let you know. But currently I have not much hope… 🙁

      • hello jonas,
        sure ! community is all about sharing 🙂 Well TP4 is really great so far and stable from my point of view, but yes there is still some work going on for SDN. Regarding our issue it does appear with the combination of the way hyper-v switch works (require mac spoofing) + the fact we are using VXLAN Inside the nested host. let’s see how it goes with TP5 when it is released so see you soon :).

  • Pingback: The Ops Team #015 – “Whistling Nerf Bullets” | The Ops Team | | Php Technologies()

  • Ion Girloanta

    Hi. I’am new to Azure Stack and try to start my first setup. I’m looking to install Azure Stack within the organization private VLAN and without a internet connection. In the documentation the internet connection is a must. Is there any workaround?

    • J0F3

      Hi Ion,
      That’s unfortunately not possible (at least not in TP1). The internet connection is strictly required because the authentication on the tenant and admin portal goes through an Azure AD. So the Azure Stack needs a direct connection to Azure otherwise it will not work.