Why would you even want to do this? Personally, I think anyone that is hands-on with D365 should be able to access a VM of their own if they wish, and I attempt to answer why below.
Most organizations tend to give VMs to only technical consultants or internal developers. It’s fairly easy to follow a rule of one VM to one developer.
What if you don’t fit the bill and request a VM? It may raise some questions and eyebrows.
At the same time, we hear questions like why are techno-functional people so hard to find? Are they mythical creatures like 🦄s? Or why aren’t our team members’ skills better?
We can’t expect the unicorns and skills to appear out of nowhere. We need to cultivate them by giving people the tools they need to grow. Having a VM all to your own will help you develop tremendously, regardless in which neat little box you are placed or allow yourself to be placed. Learning should be accessible, not stifled, and you can take ownership of your growth.
Why limit yourself to thinking “I’m functional and that is technical” or vice versa?
So if you wish to grow and want to invest in yourself by having your own VM, I hope this post helps you.
And finally, to be honest, another reason I’m publishing this post is because I always forget how to do this myself.
Notes before we get started
â–¶ This post is intended for those who are not given VMs as part of their jobs and who wish to avoid the red tape associated with such requests
â–¶ If your situation allows you to use a cloud-hosted environment deployed through LCS, that is the easiest and preferred method in my opinion
â–¶ There are other approaches to get either a cloud-hosted VM or local VM deployed, and this is simply one way to get a local VM using personal Microsoft accounts and subscriptions (the only organizational requirement is not a challenge for those currently working for a Microsoft partner/customer)
â–¶ I’m using Azure to host the VM because my personal laptop is not ideal for hosting a one-box development environment and, more importantly, I get to learn more about Azure
â–¶ Check out part 2 on this topic for an easier and better approach
Prerequisites
â–¶ Your own personal Azure subscription
â–¶ Your organization must have the appropriate D365 subscription
Part 1 – Deploy a Windows Server VM from the Azure portal
Part 2 – Get the downloadable VHD files from Dynamics LCS and extract the VHD
Part 3 – Convert the VHD into an Azure managed disk
Part 4 – Deploy and use the VM!
Part 1 – Deploy a Windows Server VM from the Azure portal
We will use a Windows Server image since we need Hyper-V Manager in later steps.
- Sign into your personal Microsoft account and go to the Azure portal
- Create a resource group
- Create a virtual machine
- The main attributes of the VM that we care about are:
- Size: D4s v3 (4 vcpus, 16 GiB memory)
- OS disk type: standard HDD (LRS) (256 GiB)
- Once the deployment is complete, go to the VM and confirm you can connect via RDP
- Give the VM a moment to initialize itself, including automatically launching the Server Manager dashboard
- In the dashboard, click Add roles and features
- Using the role-based options, select Hyper-V
- Restart the VM after the Hyper-V installation is complete
Our general purpose VM is now ready for the next part.
Part 2 – Get the downloadable VHD files from Dynamics LCS and extract the VHD
Note that you do not need to be a member of any projects in LCS to do this.
Our friends at Microsoft have a concise version of steps available at Microsoft Docs if you prefer.
- Re-connect to the VM from part 1
- Sign into your organizational Microsoft account
- Go to LCS and click on the Shared asset library tile
- Select Downloadable VHD from the list on the left
- Decide which version you want and download all parts
- In this example, we download all 9 parts for the 10.0.17 version
- Open part 1 or the executable (.exe) file
- Click Accept to agree to the software license terms
- Select a destination folder for the VHD file
- When the extraction is complete, you should see the VHD or disk image file in the destination folder
Since I’m already using this VM for general purposes and want to avoid nesting the D365 VM here, the next part is an intermediate piece.
Note: you can stop here, skip the remaining parts, and simply use Hyper-V Manager to run the D365 VM here if you don’t care about nested virtualization.
Part 3 – Convert the VHD into an Azure managed disk
Besides avoiding nesting the D365 VM in our general purpose VM, a great benefit of this approach is the opportunity to learn a bit of other Azure services and tools by experience.
- Continuing from our last steps, open Hyper-V Manager
- Click Edit Disk in the Actions pane on the right to launch the Edit Virtual Hard Disk Wizard
- In the wizard, first locate the VHD file, and then select the Convert action, VHD format, and Fixed size disk type to finish
- Note: if there is not enough disk space, first resize the general purpose VM disk (using the Azure portal) and then expand the disk volume in Windows (using Computer Management or Disk Management)
- Note: this is the longest running step – take a break for 30-60 minutes while the virtual disk is edited
- Now that we have fixed size version of the VHD, let’s create an Azure storage account and a blob container via the Azure portal
- Next, install Azure Storage Explorer on our general purpose VM
- In Azure Storage Explorer, sign into your Azure subscription
- Select the blob container created earlier in the EXPLORER pane on the left, and upload our fixed size VHD file using a page blob blob type
- Note: this step takes about 20-30 minutes, so it’s time for another break (thankfully)
- Once the VHD file upload is complete, go to the Azure portal
- Create a managed disk with storage blob source type, selecting the uploaded file as the source blob, and Windows OS type
- Note: for the disk size, I’m using standard HDD LRS 256 GiB
We are now ready for the grand finale.
Part 4 – Deploy and use the VM!
- Once the disk is created, we can create a VM directly from the disk in the Azure portal, which defaults the VM image to the disk
- Note: whether you wish to have multiple VMs or simply delete/recreate VMs periodically, all you need to do is 1) make sure to keep the VHD blob, and 2) create new disks and VMs to your heart’s content
- The attributes of this VM are the same as the previous VM:
- Size: D4s v3 (4 vcpus, 16 GiB memory)
- OS disk type: standard HDD (LRS) (256 GiB)
- Also keep in mind that you can resize the VM later based on your experience and budget
- Once this resource deployment is complete, go to the VM to start it and connect via RDP:
- User name: \administrator
- Password: pass@word1
- Use the desktop shortcut to open the AdminUserProvisioning tool
- For the email address, use your organizational Microsoft account, and click Submit
- Open your favorite web browser and go to https://usnconeboxax1aos.cloud.onebox.dynamics.com/
- After successfully signing in, you should see a sight for sore eyes
Finally, your own VM is at your fingertips. The world is your oyster.
How are you making your people, process, and product better with Dynamics?