If you are running the Azure AADConnect software on a Hyper-V VM being backed up by Veeam be aware that recent updates to AADConnect “break” Veeam in a really weird way. What you will see as the tipoff is Veeam reporting VSS errors. The VSS Writer service on the Hyper-V host might also fail and has to be restarted. When you restart the service and try backup again it will fail, again ad nauseum.
I had this issue and went back and forth with Veeam support. The log files I sent them made no sense. One log even said the repository was running out of space (it wasn’t). I was getting nowhere with support. So I trawled around in the Veeam forums and found a few threads where people were discussing what looked to be a similar problem. There were a few solutions bandied about by different people. In the end, it all came down to dealing with the root cause of the issue, the SqlVSSWriter on the VM. This is the info that Veeam sent me:
1. Disable SQL VSS Writer if no other SQL in use on the server
This forum post notes a PowerShell script that can be used as pre-freeze script to work around issue during backups
3. Third workaround is to move the Azure AD Connect stuff to another server that you can disable the SQL VSS writer for until this gets patched by Microsoft
I tried disabling the SqlVSSWriter but had no joy. Another fix that I found which worked for me is to shutdown the Azure AD Sync service during my backup window. This works but, of course, AAD Connect won’t sync data while the service is shutdown. I scheduled shutdown and restart of the service through the Task Scheduler on the Hyper-V VM. I set up two batch files, one to stop the service and one to start the service and those are called by appropriate scheduled task.
Stop service command: Powershell Stop-Service -DisplayName ‘Microsoft Azure AD Sync’
Start service command: Powershell Start-Service -DisplayName ‘Microsoft Azure AD Sync’
Veeam is working with Microsoft to fix the problem. Until a patch is released by one or both vendors you’ll have to try one of these workarounds to get past the problem.