BizTalk development on virtual machines has become an essential part of the development process. The speed with which you can tear down and build up BizTalk VMs means you spend less time configuring environments and more time developing artifacts. Typically, an instance of one of these environments contains everything (BizTalk, SQL Server, Visual Studio, etc.) running on a single VM machine. Spinning up a new development environment is as easy cloning your base image. Occasionally, though, you need a development or sandbox environment that's a little more than a virtualized BizTalk "island", of sorts, with everything running on a single VM.
Recently, I was tasked with creating a PoC for a client. The concept was simple: take an existing virtualized development environment and split the hosts across two different machines. The existing topology included one BizTalk server and a separate database server, meaning I was going to have to create a new BizTalk VM to add to the existing group. Rather than standing up a new BizTalk server based on the original base image (not a trivial task since, in this case, there was a substantial amount of non-BizTalk configuration that would need to take place), I wanted to try cloning the existing BizTalk server and adding the clone to the group.
Here are the final steps (disclaimer: this process should not be applied to anything other than a development/sandbox environment):
- Stop and disable all of the host instances on the original BizTalk VM. It's important that the host instances are disabled prior to cloning because we don't want the clone initiating communication with the message box after a reboot.
- Shut down the original BizTalk VM.
- Clone the original BizTalk VM. Obviously, this step varies depending on what virtualization platform you're using so I'll avoid the details here.
- Start the original BizTalk VM and the clone.
- Open the BizTalk Server Configuration tool on the clone and unconfigure all BizTalk features on the machine.
- Reconfigure the necessary BizTalk features on the clone. At this point you'll be joining the existing BizTalk group, rather than creating a new group. Keep in mind that certain features may not need to be configured on the clone. For example, if you already have BAM tools configured on the original server you may not need to configure this feature on the clone.
If you stop here (which I did the first time I attempted this) you'll run into issues as soon as you restart the host instances. The reason is because MSDTC on the clone is retaining a reference to the original machine. In order to remove the reference you'll need to uninstall and reinstall MSDTC, while removing some registry keys in the process. Another explanation of this process can be found here. Here are the remaining steps:
- Uninstall MSDTC on the clone by running the following command:
- Remove the following registry key completely:
- Reboot the clone
- Install MSDTC on the clone by running the following command:
C:\windows\system32\msdtc – install
- Enable and configure MSDTC according to your original specifications using Component Services.
And that's all there is to it. You should now have two servers in your existing BizTalk group. You're ready to begin configuring your new environment!