How-to create your own CONTOSO-like virtual machine (Pt. 1)

Since this little blog is kind of development related by nature I had the need for a suitable development environment after its start. The environment had to be

  • autonomous and independent
  • slim and runnable on a notebook with reasonable performance nonetheless
  • current standard AX (AX 2012 R3 CU9)
  • development-ready
  • equipped with data

How you can create such an environment is described in the following. The result is a great choice for demo or training purposes, too.


First of all an overview what the ingredients will be in the final:

  • Windows Server 2012 R2 on Hyper-V
  • SQL Server 2014
  • Reporting Services
  • Analysis Services
  • Office 2013
  • Visual Studio 2013
  • Microsoft Dynamics AX 2012 R3 CU9
  • Test Data Transfer Tool
  • Visual Studio Online

Why CONTOSO-like and not CONTOSO?

Initially I planned to use the CONTOSO demo VM you can get on PartnerSource / CustomerSource and actually I downloaded and ran it. But the current version seems to have issues with internet access (I was not able to fix quickly) which makes it useless for me because I need to connect it to Visual Studio Online. In addition to that you might want to have a solution that is slimmer than CONTOSO and be more in control of what is going on there.

Set up virtual machine

Hyper-V New Fixed Size Disc
If you want to set up a virtual machine you should always start with a new hard disk with a fixed size in my opinion – to make sure you get the best performance. For virtualization I use Hyper-V for quite some time now, especially since you can host VMs on Windows client machines (since Windows 8 I think). You might have to activate the Windows Feature for it… To create a new disk, start Hyper-V Manager and open the according dialog via New / Hard Disc… in the Actions area on the right. The newer VHDX is the right choice if you do not plan to run the VM on an older host like Windows Server 2008 R2. In the next step, choose Fixed size and define its name and location. I always use names that equals the later machine name – in this case axilityR3CU9.vhdx in C:\VMs\axilityR3CU9\, for example. The planned minimal scenario without SharePoint / Enterprise Portal and Management Reporter runs on little more than 120 GB at the moment. For a stable solution with good prospects I’d recommend to use 160 GB. Btw: If you have the chance to put this to a SSD you might be surprised how fast AX can get 🙂
The next step is to create the virtual machine by clicking New again and this time Virtual Machine….. For the sake of consistency the name could be axilityR3CU9 and the location C:\VMs\axilityR3CU9\. If you chose to use vhdx before you want to use Generation 2, otherwise take the first generation. Do not save RAM when you have plenty left – if possible, assign 16 GB (or 16384 MB) at least. Right now, I run it with 12 GB only though and I think it might be possible to be run with even less than that. This enables you to host it on a notebook having 16 GB of RAM only, for example. Do not check the Dynamic memory setting because that might escalate and would have a negative performance impact anyway (at least I believe that it has). Concerning the network setup you need to have an external connection which you might have to create in Hyper-V Manager’s Virtual Switch Manager if it wasn’t there already. In the following you’ll assign the previously created hard disk (Use an existing virtual hard disk).

VM Settings
After the VM was created you have to go to its settings (mark it and click Settings… on the right) to adjust some things. Give it more virtual processors – 4 would be a good starting point (if the host is able to provide that). Also use Add Hardware / SCSI Controller to add a DVD Drive to the VM. This needs to be brought up in the boot sequence in the Firmware area to enable us to install the operating system afterwards. To insert images I usually double-click the machine in Hyper-V Manager which opens the Virtual Machine Connection. In non-fullscreen mode you can select Media, DVD Drive and Insert Disk… to assign an .iso file to the drive. In this case you want to pick a Windows Server 2012 R2 image file.

Operating system

Installing the OS should be quite straight forward. Select the whole available space on the disc and run through the setup. Personally, I have to change only the setting for the keyboard layout to reflect my German hardware 😉 One interesting remark I can make though is that I always use en-us images for everything that has to do with AX because of bad experiences in the past (SharePoint was not able to work properly in the localized version or on a localized OS).
After the installation is finished you want to change the computer’s name via right click on This PC and Properties in Windows Explorer. In the dialog in Change Settings use Change… to assign a new name – in my case that was axilityR3CU9 again.

Important: If you want to have several of those VMs working with a common version control (TFS / VSO) they need to have different names!

Set up domain

Active Directory Add Roles And Features
I detail this a little more because I assume that it is way less familiar to most than installing an AX client, for example.
You need a domain to run AX. In concrete terms you need hosts and users that are members of an Active Directory domain. One of the highlights of CONTOSO VM is that it comes with its own domain controller. But getting there is easy – we can do so, too! Simply use the Add Roles and Features Wizard from Server Manager to add the Active Directory Domain Services. Be aware that some of the upcoming steps need a surprisingly high amount of time to execute – be patient with it. In the configuration dialog select Add a new forest and define a Root domain in my case.
Active Directory Configuration Wizard New Forest
When you reach the Domain Controller Options you have to provide a password, leave everything else at their standard values. The NetBIOS domain name is the short form of the domain, AXILITY in my case. After that there is a prerequisite check which will (if there’s no differing setup) warn you against non-static IP configuration. You can review your works after the installation has finished in the system’s properties.
Computer Is Part Of The Domain Now
By the way: The user you used all the time (BUILTIN\Administrator) now implicitly was promoted to the domain administrator – which is AXILITY\Administrator resp. here.

Continue with the second part.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.