Installing Azure Stack TP2 on Vmware Workstation

Most commonly how I learn is to do things virtually using VMware player, workstation or server. In some instances products are not allowed to be installed on a virtualized platform and in this case Azure Stack is specifically set to check if the install is running in a virtualized environment but I am not ready to use full physical machine to test and see how the product works, so I had a challenge to modify scripts to allow the Azure Stack TP2 install on a virtualized platform. Now if i you might now that you are able to run hyper-v in a virtualized platform using the “Virtualize Intel VT-x/EPT or AMD-V/RVI” checkbox on the virtual machine and that is pretty cool being able to virtualize a virtual platform. The Azure Stack TP2 is only single instance install so you cannot install it on a multiple instances/multiple servers at least for this technical preview. The environment which is configured bellow is not supported by Microsoft and will probably not be anytime in the future, but Microsoft must be aware that installing this on a virtualized environment for IT specialists will allow them to be more productive and get a deep learning of the product. There are some rumors that have been said in few occasions that the Azure Stack will not be released as a individual product rather will Microsoft do some agreement with hardware suppliers to sell Azure Stack as an appliance, I don´t know if that is true or not but we will just wait and see, but until then I will not stand by and do nothing to learn. Before we start we need to know what the requirements are to install Azure Stack TP2 so you would need a quite a big beast server to handle the process.

  • Minimum of 96GB of memory or 128GB as recommended. (There are ways to hack this by using DiskRAM software i.e. ReadyBoost EMDMgmt registry hack, but not recommended because it is very slow)
  • Minimum of 12 Cores CPU or 16 Cores CPU as recommended
  • Minimum of 4x Disks and each 140GB or 4x 250GB Disks recommended
  • Public Azure AD credentials as Global Admin required.
  • Virtualizing Azure Stack environment is not supported through VMWare or Hyper-V by Microsoft.

These are the steps you need to do before you begin.

Here are the steps you need to do to install Azure Stack TP2 on VMWare Workstation

Create a new virtual machine

Click on Custom and then Next

Set the hardware compatibility to Workstation 12.0 as you can see that the limitations is 64GB of memory per virtual machine. But in this case we need to hack the memory limits. Click on Next to continue.

Select “I will install the operating system later.” and click on Next

Set the operating system as Microsoft Windows and the version as Windows Server 2016.

Type in the name of the virtual machine and click on Next

Select BIOS and click on Next

Set the processors as 1 and the cores as 12 and click on Next

Set the memory as much as you can and click on Next, we will configure this later on.

Select Use network address translation (NAT) and select Next

Select the only option available and click on Next

Create a new virtual disk and click on Next

Set the Size to be at least 500GB and click on Next

Set the Name of the disk and click on Next

Click on Finish

Edit the virtual machine and selet the Processors and click on “Virtualize Intel VT-x/EPT or AMD-V/RVI”

Select the CD/DVD and use ISO image and select the Windows Server 2016 ISO and then click on OK and start the Machine.

Wait for a while until you get the language settings

Install Windows using your default language and click on Next

Select Windows Server 2016 Datacenter Evaluation and click on Next

Use Custom Install and continue

Select the 500GB disk and click on Next

When the install is complete, you must set the password. Type in the password and click on Finish.

Install VMWare tools and reboot the machine when done.

Create a folder on C: named PreConfigureWindows

Extract the AzureStack zip and copy the CloudBuilder file to the C:\PreConfigureWindows folder.

Type in the powershell command which can be located on this site. Wait until the server has been configured and then shutdown the VM. https://azure.microsoft.com/en-us/documentation/articles/azure-stack-run-powershell-script/

When the VM is turned off you need to edit the virtual machine and add 4x 200GB disks. Now you need to do this correctly because if you don´t the installation will hang. Click on Add

Select Hard Disk and click on Next

Set the virtual disk type as SATA and click on Next

Select create a new virtual disk and click on Next

Set the Maximum disk size to 200GB and click on Next

Set the Name of the disk and click on Finish. You need to do this three times more so you have 4x 200GB disks.

It should look something like this. When done you need select the top disk and click on Advanced.

Then you should see the Virtual device node. Write down the SATA nodes down where the name “New Hard Disk (SATA)” is. In this case it is SATA0:0, SATA0:2, SATA0:3, SATA0:4.

Browse to the folder where the Virtual Machine is located and find the vmx file and edit in Notepad.

Browse down to the bottom and write in the following code

sata0:0.sharing = “multi-writer”

sata0:2.sharing = “multi-writer”

sata0:3.sharing = “multi-writer”

sata0:4.sharing = “multi-writer”

This is the memory hack so the limitations is not 64GB. In this case I set it to 120GB and set the minVmMemPct to 50 which means that it uses 50% of the physical memory and 50% of the swap. You can use 100% if you like. When turning on the Virtual Machine you will get an error saying that it is not supported and can cause problems, but that is ok because this is only a test environment.

Turn on the virtual machine and enter Powershell as administrator and type in the following code, you need to set the CloudBuilderDiskPath to the path where you copied the CloudBuilder file. Run the code and wait until it is completed, this will reboot the computer a few times, you might need to watch for errors.

After reboot you will see “AzureStack TP2” and you can wait for few seconds or press enter to continue.

You will need to Install VMWare tools again, reboot the machine when it is complete.

When you have logged on again, open Powershell ISE as administrator and edit the BareMetal.Tests.ps1 which is located in “C:\CloudDeployment” folder. Browse to line 376 and change it.

As you can see I have deleted $physicalMachine.IsVirtualMachine to $false. Change it in your powershell ISE editor.

Next go to line 453 in Powershell ISE editor

and change it to 12 as you can see in this screenshot.

Create a new document in Powershell ISE and run the InstallAzureStackPOC.ps1 which is located in C:\CloudDeployument\Configuration

Type in the password which will be used in the domain controller and click on OK.

Type in your Public Azure AD credentials

The installation will start, it will begin by installing Active Directory virtual machine.

You can open Hyper-V manager to see that the virtual machine has been created.

In some instances the installation will stop at this point it will be endless. This means that the sharing has not been configured in the vmx file or you have not created 4x disks, you need save the file and try again or create the 200GB disks.

Final thoughts:

Now this environment might have some problems but at least you are able to do some learning and figure out how this product works. I have been running this for a while and I can say that it is quite good for a TP release to learn. I will continue posting awesome stuff so hope you will learn and have as much fun as I did.

Those who are interested I have created a channel on discord named #AzureStack, it is similar to the old IRC. Here is a link https://discord.gg/vFD2Xky

Trackback from your site.