I recently worked on a project where I had to install Exchange Server 2016 on an Azure VM and I chose a D2 sized Azure VM (2 cores, 7GB RAM) thinking that will suffice, well that was a big mistake.
The installation made it to the last step before a warning appeared informing me that the server is low on memory resources and eventually terminated the installation, leaving it incomplete.
Let this be a warning to the rest of you, choose a D3 or above sized Azure VM to save yourself a whole lot of agony.
To try and salvage the Exchange install I attempted to re-run the installation as it detects an incomplete installation and tries to pick up where it failed previously, this did not work.
I then tried to uninstall Exchange completely by running command: “Setup.exe /mode:Uninstall /IAcceptExchangeServerLicenseTerms”. This also did not work as it was trying to uninstall an Exchange role that never got installed, this left me one option manually remove Exchange from Active Directory and rebuild the Azure VM. 
To remove the Exchange organisation from Active Directory I had to complete the following steps;

  1. On a Domain Controller | Open ADSI Edit
  2. Connect to the Configuration naming contextconfig-naming-context
  3. Expand Services
  4. Delete CN=Microsoft Exchange and CN=Microsoft Exchange Autodiscoverconfig-exchange-objects
  5. Connect to the Default naming contextdefault-naming-context
  6. Under the root OU delete OU=Microsoft Exchange Security Groups and CN=Microsoft Exchange System Objects delete-exchange-objects
  7. Open Active Directory Users and Computers
  8. Select the Users OU
  9. Delete the following:
    • DiscoverySearchMailbox{GUID}
    • Exchange Online-ApplicationAccount
    • Migration.GUID
    • SystemMailbox{GUID}ad-exchange-objects

After Exchange was completely removed from Active Directory and my Azure VM was rebuilt with a D3 size I could successfully install Exchange Server 2016.

Category:
Azure Infrastructure, Azure Platform, Exchange
Tags:
, , , , ,

Join the conversation! 13 Comments

  1. Yeah a good trick is to over provision for the installation and then dial it back down after

    • Yeah i tried that Exchange 2016 wont run correctly, you will find services will crash and it just wont work, definitely need a D3 minimum for Exchange 2016. I find Exchange in general is memory resource heavy and I guess that is why Microsoft recommend a minimum of 8GB RAM for Exchange 2016.

  2. I had the same issue, luckly after changing the VM to D3 and restarting the machine and continuing the install did help.
    Once the install was able to change it to D2 and it was working fine

  3. Don’t forget premium storage in Azure is still a requirement….
    “Deployment on Microsoft Azure virtual machines is supported if all storage volumes used for Exchange databases and database transaction logs (including transport databases) are configured for Azure Premium Storage.” from https://technet.microsoft.com/en-us/library/jj619301(v=exchg.160).aspx

  4. How do you guys operate email servers on Azure?
    I am having trouble sending emails to more and more domains even from our root server hosted elsewhere, but all the Azure IP addresses ‘with no exceptions’ are proactively blocked by many large email operators, as it said so in this support page:
    https://blogs.msdn.microsoft.com/mast/2016/04/04/sending-e-mail-from-azure-compute-resource-to-external-domains/
    I quote:
    “Sending outbound e-mail to external domains (such as outlook.com, gmail.com, etc) directly from an e-mail server hosted in Azure compute services is not supported due to the elastic nature of public cloud service IPs and the potential for abuse. As such, the Azure compute IP address blocks are added to public block lists (such as the Spamhaus PBL). There are no exceptions to this policy.”

  5. I had the exact same problem – the error popped up stating that the program (exchange install) would be closed due to memory shortage. I ignored the warning and waited. Eventually the install completed. After a reboot the performance was horrendous and I couldn’t start Exchange powershell. However, a quick change to the Page file resolved the problem completely. I changed the page file to be a static 7GB + 10Mb as per MS recommendations and rebooted. All sorted!

  6. Why did you remove exchange org, you could have done RecoverServer

    • RecoverServer is intended for recovery only and not as a repair tool, to recover from a failed install, recover from a failed uninstall, or to reconfigure a server. So in my case RecoverServer would not be applicable.

  7. Hi, can you advise recommended Azure resource requirement if i want to install exchange server 2016 with 1000 mail boxes for testing purposes.. say each mail box with 20gb space
    as i understand i need to have virtual network, ad server and vm for exchange server.. what size vm and storage requirements would i need..
    thank you

Comments are closed.