Don’t do it or do it in DSRM. Until for various reasons you just… can’t. Unacceptable downtime, Exchange/SBS, Windows 2003 (can’t stop AD services), etc. Doesn’t matter, you just have to do the P2V online.
It’s not supported (probably) or recommended but if you really need to then (skipping obvious steps):
- Stop replication some time before finalizing conversion
repadmin /options %COMPUTERNAME% +DISABLE_OUTBOUND_REPL repadmin /options %COMPUTERNAME% +DISABLE_INBOUND_REPL
- Disconnect target VM network and boot to DSRM.
- Set “database restored from backup” flag in registry – just in case!
https://technet.microsoft.com/nl-nl/library/dd363545(v=ws.10).aspx - Boot normally
- Enable replication
repadmin /options %COMPUTERNAME% -DISABLE_OUTBOUND_REPL repadmin /options %COMPUTERNAME% -DISABLE_INBOUND_REPL
Again, not supported nor recommended but it has worked for me.