Installing SharePoint Foundation 2010 on a Virtual Machine running Windows Server Standard or Windows Server 2008 R2 fails at the end of the installation saying that errors occurred and the log must be consulted etc.
The log wasn't helpful, but I did notice in the %TEMP% directory that there was a folder for SQL Express, so it turns out it was SQL Express part that failed during the setup of the standalone Sharepoint Foundation 2010 installation. http://support.microsoft.com/kb/957453
The prerequisites installed fine.