Running AX2012 R2 locally on Windows 2012 Server booted directly from VHD

I have been working on a large project since a couple of months now and we use a virtualized environment where every developer has his own proprietary development machine. I am not going to make any statements about virtualization and the hardware that is beneath all of those machines is definitely ok.But here’s the thing:

  • There is a Citrix involved and the network at the customer site does not cope with the traffic now and then.
  • Secondly, the developer machines have enough resources ( or at least they think VMware gives them enough 😉 ) but Dynamics Ax 2012 (R2) is quite the resource consumer (CPU when compiling and memory when generating CIL and performing DB syncs…)

So in the end these machines end up being perceived as too slow and I wanted to see if my personal (physical) machine would perform better when I worked on it locally and just using the network to get to the TFS. The following things I am already sure of:

  • I am not on the company domain which relieves me of all the policies being executed at startup ( Yes, they take forever there! And no I am going to tell you how to run AX 2012 without a domain as that used to be possible in AX2009 but with AX 2012 it is a whole other story, which I am happy to give you some details about if you would ask me apart from this post 🙂 )
  • I am absolutely sure how much resources I own on my machine

The machine on which I am running my test here has the following key specifications: (It is a pretty decent thing (the SSD helps a lot), but you can always argue for more RAM off course 😉

  • HP Elitebook 8570p
  • Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz, 2601 Mhz, 2 Core(s), 4 Logical Processor(s)
  • 8GB DDR3
  • 250 GB SSD drive

There are two goals of this test:

  • Running AX2012 locally and solving my problem of my virtual developer machine being too slow over citrix
  • Booting directly from a VHDX (Hyper-V Virtual Hard Disk) so that I can switch between operating systems and enable full hardware access for my virtual machine. (Except for the disk which is still virtualized because we boot from a VHDX file)

First step : Create a virtual machine and install Windows Server 2012

Now off we go! Off course I am not going into many details of creating a VHD file as this is prerequisite knowledge for this post. It is just creating a virtual machine and installing the Windows Server 2012.

Second step : Creating a boot option for the Windows Server 2012 VHD

The first step was simple, but now comes the interesting part. We know how to create the virtual machine, but how can we boot right of the VHDX instead of having to boot an OS first to be able to run your virtualization software of choice?

Well, BCDEDIT to the rescue! BCDEdit is found in your windows\system32 folder and is used to modify your boot configuration. What we need to do here is to add a boot option that mounts our VHDX file when booting.

Follow the steps in the following link and you will be able to do just that! http://bootdiskette.info/how-to/boot-from-a-vhd/adding-the-vhd-entry-in-boot-menu-and-then-boot-from-vhd/

Third step : Installing a domain controller

AX 2012 cannot run without a domain controller ( captain obvious to the rescue 🙂 ) so we are not going to modify registry keys to trick it into running without one. (As was possible in AX 2009)

Again, there is nice step-by-step guide from Microsoft to install Active Directory Domain Services on your 2012 Server ( Yes, dcpromo has been deprecated 🙂 ) : http://social.technet.microsoft.com/wiki/contents/articles/12370.step-by-step-guide-for-setting-up-windows-server-2012-domain-controller.aspx

If you follow the steps you should have a domain controller on there and your server manager should look similar to the one I have here.

Server manager

Fourth step: Installing SQL Server, Visual Studio and AX2012 R2

I think this step is familiar. You have your own Server and domain controller up an running so you can go ahead and create the needed service accounts and Dynamics AX 2012 R2 has everything it needs to run in there. From here on, it is just like installing your own developer environment.

Conclusion

First thing that I have noticed: Windows Server 2012 really seems to be performing well and handling resources nice. I have the OS running, domain controller active and it only used 1.5 GB of ram (I expected it to use more). The startup time is also acceptable : 2.5 minutes from cold boot to logged in. (Compare that to booting windows 7 in the same time with running all of the company’s policies until I could log in…)

Another advantage here is that I have created a copy of the virtual machine so whenever I run into trouble, I can just boot into the other main OS again and replace the VHD file with a backup and I am good to go again. And when I want to get rid of the dual boot option, I just have to remove the VHDX file and adjust the boot configuration with BCDEdit and it’s gone. All of this minimizes the overhead of having to remaster your machine once in a while because it starts to get slow.

So I hope I showed you how you could do things differently when you want to run Ax locally.

3 thoughts on “Running AX2012 R2 locally on Windows 2012 Server booted directly from VHD

  1. Thanks Kenny.
    Have you timed any compilation run and how much of a gain it gets compared to running the VHD on top of a host environment?

    Oh btw, I am VERY interest about the “details” you’re willing to share about running AX2012 without a domain. =p

    Cheers~

  2. Hi Dolee,

    For now, I cannot give you a detailed report on how it is performing compared to the virtual machine. (I have some coding to do for a demo 🙂 )

    But I can already tell you this:

    Full compile time on the virtual machine : 4,5 hours (Level 3 no cross ref)
    Full compile time on the physically booted VHD : 2 hours

    DB Sync on vm : 20 mins
    DB Sync on physically booted VHD : 8 mins

    Compile CIL on VM : 20 mins
    Compile CIL on physically booted VHD : 12 mins

    Keep in mind that these are ‘quick results’ and not thoroughly tested cases.

  3. Hello,

    Nice alternative to all potential problems.
    I’m interested too on the way to make AX 2012 run without never being connected or had been connected to a domain.
    I tried on Win 8 and SQL 2012, created applicaiton and database, but the AOS never succeeded to install, and tried every options about UserDnsDomain and ActiveComputerName values…
    So I’m really interested in your solution!

Leave a Reply

Your email address will not be published. Required fields are marked *