iphase.dk Michael Mardahl, MVP
Hybrid Exchange in Azure: Notes from the field
Having an Exchange Hybrid Management server is still an official requirement from Microsoft to support organizations using Exchange Online with identities managed by the on-prem Active directory. So, if you are moving your entire "legacy" datacenter to Azure, it means having your Hybrid Exchange in Azure for management going forward.
I was doing this the other day and decided to see how small I could make it without too much hassle as time was limited.
The goal was to have a relatively cheap VM in Azure, hosting the last "on-premise" Hybrid Exchange Server 2016 (not 2019 as that costs money). And not caring so much about it being "snappy."
>> Preface
For these notes to be useful, you are expected to have a general knowledge of Exchange Hybrid Topology, and a functioning Azure VNET with connectivity to on-prem is required.
Note that there are no detailed steps in this guide as things change around in Azure way too often, and security is very individual. I just wrote this article to share some experiences that could be of use to the MS IT Pro community.
>> Choosing the Right VM
The requirements for Exchange Server 2016 Hybrid are quite extreme. So if we are to keep things on the cheap, a B4ms is the "right" size. Since we need the Mailbox role, a VM with 2cores and 8GB RAM will start puking right away.
Nevertheless, this is what I was aiming to do -- run an Exchange Server 2016 on a B2ms general-purpose server in Azure. Using only standard HDD to keep things cheap.
This is a very cheap option. If not the cheapest one for running a 2core 8GB RAM VM in Azure.
>> Disk sizing
In the spirit of building on the cheap, I chose to use Standard HDD (LRS) all around.
The default Windows Server 2016 Datacenter image from the Azure marketplace is 127GB. I added a 64GB data disk just for the Exchange Server's program files, without host caching for robustness.
│ Building on the cheap
NB: Keep in mind that if you use the Exchange Hybrid server for a ton of management stuff, you might end up with a higher cost for the Standard HDD than a 64GB Premium SSD disk due to the way transactions on the disks are billed. Premium SSD is billed at a fixed cost, Standard HDD is billed per transaction.
>> Installing the Hybrid Exchange in Azure
During the initial VM provisioning, I chose the B4ms VM size to avoid problems during the installation of Exchange Server 2016.
A word of warning: I did try the installation with the smaller B2ms size! But it puked out on me halfway through. If that happens to you, note that it might be because all exchange services are marked as stopped and disabled. The solution is to start any "Microsoft Exchange" service that will start and rerun the installer.
I won't go through the steps for installing the actual Exchange Server, just note that you need the following options set:
* Roles: Mailbox, Management
* File paths: Change C:\Program Files\Microsoft\Exchange Server\V15 to F:\Exchange Server\V15
This is what my disk layout looks like after all is said and done:
>> Resizing the Azure VM
So I managed to get the Exchange Server running on a larger VM size and have confirmed that everything works as expected:
* Public certificates are installed and assigned to services.
* Traffic is flowing as it should.
* The server is visible to the rest of the Exchange Organization.
* I have rerun the Hybrid Configuration Wizard to move the hybrid mail flow to the new server.
Now I need to make sure it would not puke if I resize the VM to a B2ms in Azure...
>> Page file
To accept my wish of running on a smaller VM, I needed to rely on the good old page file. I configured the Page file to fit on the temporary "physical" disk that the VM has (15000MB):
While I was inside the "Performance Options," I also checked that the "Visual Effects" were set to the most performant.
>> Log files
Exchange Servers 2013+ are notorious for their heavy use of logging. I set up a basic scheduled task to run as SYSTEM once a day to purge old logs.
You can grab a copy of the script, with the paths defined as per this blog post, here: ExchangeOnlineScripts/invoke-logPurge.ps1 at main (github.com)
>> Conclusion
After doing all of the above, I could resize the VM to a B2ms size, and it loaded up just fine with no complaints about low memory, and the performance is acceptable for the management tasks that the server was intended for.
I hope you found some inspiration in the above for running your Hybrid Exchange in Azure.
C:\IPHASE\POSTS\AZURE\HYBRID~1.TXT
1 Help 3 Home 5 About 7 Posts 8 Contact 10 LinkdIn
imagevwr.exe