- Install Windows Server 2008 R2/Windows Server 2012
- Install SharePoint 2013/2010 with all updates and do not run SharePoint Configuration Wizard
- You can install Visual Studio
- You can install Microsoft Office
- Do not install SQL Server because it can't be sysprepped.
- Do not enter any domains. Just because it's useless and I haven't checked whether it works or not.
- run C:\Windows\System32\Sysprep\Sysprep.exe
- Make sure you've checked "Generalize" option:
- Backup your virtual machine for later reuse
After you run your virtual environment you will need to:
- Install Domain controller role if it's a standalone Development environment.
- Join a domain (in case of SharePoint 2013)
- Install SQL Server (optional)
- Run SharePoint Configuration Wizard
Conclusion:
There is only one mandatory step (Run SharePoint Configuration Wizard) you will need to do on your sysprepped virtual machine. Very convenient.