Thought I would detail the steps I follow when creating a stand-alone development vm for SharePoint, and some of the software I like to have on one.
 
I tend to use VMWare Workstation for my vm's as I like the interface, but Microsoft's Virtual PC works just as well, with the (huge) added advantage of being free. 
 
I've not tried MS Windows Server 2008 as yet as it is not used at any of the business locations I have worked at, so this guide covers using Server 2003 - though I expect the process would be almost the same on 2008.
 

- Build the VM
 
First step is to build a VM in whichever VM hosting software you are using.  Assign it as much RAM as you can afford on your system (I recommend at least 1gig), and enough disk space to cover your future needs - it is not possible to extend your virtual machine drive size on most VM Hosting software (although you can add additional virtual drives to you VM and gain more space that way). I tend to go for around 40Gig which, after all the software I require is installed, gives me around 15gig space remaining.  I also generally call my vm something like "DevBox32" or "DevBox64" depending on what version of the OS I am using.


Update:
As shown in the comments below, it is possible to increase the size of a virtual drive, but you must detatch it from the vm first - painful
, but nice to know.  Many thanks to Cimares (Paul Hunt) for this little nugget.
 

Install your OS on the virtual machine, using the latest Release if possible (MS Windows Server 2003 R2 at time of writing). 
 
For development vm's, I strongly recommend the KISS practices for usernames and passwords, and so I use "Administrator" and "password" for the OS admin account. For any other OS admin-type passwords (eg the recovery password in DNS) I also use "password".
 
Once the install is complete, I run Windows Activate and Windows Update to get all the latest patches and hotfixes.  At this point, it is a really good idea to backup your virtual machine (ie. copy the folder on the host's filesystem that contains all your virtual machine's files) so that you have a nice "baseline" virtual machine that you can use in the future if you need to create other Server 2003 vm's that don't need all the rest of the stuff we are going to put on this one.

 
- Turn off System Beep
 
A lot of the installers used cause a system beep, which can be annoying for people sat around you, so I tend to turn it off.  Do this through using the Regedit utility, changing the HKEY_CURRENT_USER/Control Panel/Sound/Beep to "No".  Reboot the vm so the new setting is applied.

--- Update: actually, have found the most effective way of switching off the system beep is to run this command fron the windows run box:
sc config beep start= disabled
 

- AD and DNS
 
Now, I make the vm a Domain Controller in a new AD Forest using the "Manage Your Server" mmc snap-in (can be found in "Administrative Tools", and is shown in Server 2003 every time you log in until "Dont display this page at logon" is checked). 
 
I tend to call the domain "Development" and ignore the MS warning about using a multipart domain name. I allow the Domain Controller wizard to install DNS for me by selecting the appropriate option when it comes up, and reboot the machine at the end as the wizard directs.
 

- Create Accounts
 
I then relax the Domain Security password policies, by using the "Domain Security Settings" snap-in in Administrative Tools.  Keep all the settings defined, but set them to be 0 - eg. Enforce Password History to be 0, Max Password Age to be 0, etc.
 
This allows me to use the username as the password also for the service and testuser accounts required, keeping it all nice and simple.  I then restart the vm so that it boots with the new password policies active.
 
Once the machine is back up, I make the following accounts by going into "Active Directory User and Computers" snap-in, using the username as the password for each one, and unchecking the "User must change password at next logon" and checking the "Password never expires" options:
  • svc-sqlsver (SQL server service account)
  • svc-spsadmin (SharePoint Server service account)
  • svc-spsapool (SharePoint Server application pool account)
  • svc-spssearch (Sharepoint Server Search account)
  • testuser (test user account)


I make each of these accounts members of the "Administration" group except for the testuser account.  Make it a member of the "Remote Desktop Users" group.


- Application Server
 
Next step is to install the dotNet frameworks - I install versions 2.0 and 3.0. After they are installed, run Windows update to get the latest service packs and fixes for these on.
 
When this is complete, open the "Manage Your Server" snap-in again, and add the "Application Server" role.  When installing this, ensure "Frontpage extensions" remains unchecked, and check "Enable asp.net".
 
At this point we have finished with the "Manage my Server" snap-in, so I check "Don't display this page at logon" and close it.
 

- Turn off IE Enhanced Security
 
Again, to keep the whole environment simple, I turn off IE's enhanced security.  Do this by opening "Add or Remove Programs" in the Administrative Tools, and selecting "Add/Remove Windows Components". "Internet Explorer Enhance Security Configuration is an option in this list.
 

- Install SQL Server
 
Next step is to get the database on there.  I tend to use SQL Server 2005, and first install the server component, ensuring "SQL Server Databse Services", "Analysis Services", "Report Services" and "Integration Services" are installed.
 
Use the "svc-sqlsvr" account we created earlier for the service account, and use Windows Auth mode. Collation can be a prickly issue with some DBAs, but I just use the default on my vm.
 
I then install the SQL server client components on the vm, ensuring that the "Connectivity components", "Management Tools" and "Legacy Components" are installed. 
 
On completion of the client tools installing, I reboot the virtual machine (to remove some file locks these installs leave about).
 
When the vm has rebooted, I install SP3 for SQL Server, and then run windows update (it is cumulative, so includes SP1 and SP2).
 

- SharePoint
 
I generally install MOSS Enterprise on my vm's, as this is what most of the companies I have worked for are using.
 
Install it as a full install (not single machine) so that MSDE is not installed, and use the svc-spsadmin account when prompted.
 
Once it has completed installing, I then put on the WSS SP1, MOSS SP1 and then any infrastructure updates (in that order). MSDN license holders will note that there is a version of MOSS available that has SP1 integrated with it.  I have found that this contains DLLs of a different version to a base MOSS install that has had SP1 applied against it, meaning backup/restores of site collections from one to the other fails to work because of version incompatabilities.  Because of this, I tend to just build it from the base up.
 

- Office and SharePoint Designer
 
Office 2007 are the next things to go onto the vm. You need Office 2007 on there to replicate your general users environment and perform any sort of testing. Although I am not a big fan of SharePoint Designer, it can be a handy piece of kit to have around. 
 
I install both these pieces, then run windows update to get the latest patches, and then activate them.
 

- Visual Studio and Source Safe
 
Time to put the development IDE on - I use Visual Studio 2008.  I also stick on Visual Source Safe so that I have some form of source control (even one that can't do proper branching/merging ;)
 

- SDK's and more
 
Spend any time developing with SharePoint object model and you will realize having the SDK's available is invaluable.  I stick on both the WSS SDK and the Office Server (MOSS) SDK.  I also put on the WSS Visual Studio Extensions so I can get the SharePoint Solution Generator.
 

- Desktop Shortcuts
 
Make some desktop shortcuts now for the Hive-12, your wwwroot/vss directory, wherever you are storing your studio project files, and a command prompt for accessing STSADM.
 

- Niceties
 
At this point, you have a nice development vm ready for use, but there are some other "niceties" that you should consider installing to make your life easier:
 
  • Powershell and the PowerGUI - to enable some power scripting
  • Reflector - brilliant bit of reverse engineering kit - install it into your 'ProgramFiles' directory, and make a shortcut in your Start menu
  • DebugView - the best way for outputting debug statements - install it into your 'ProgramFiles' directory, and make a shortcut in your Start menu
  • Fiddler - useful proxy-ing debug tool
  • Adobe Acrobat - you are going to need it on there sooner or later
  • MS IE Dev toolbar - In-browser set of dev tools
  • MS Sandcastle, HTML Help and Sandcastle Helpfile Builder - the replacement for ndoc that I use for producing API doc
  • SharePoint Explorer Community Edition - brilliant free in-browser toolbar for administering a sharepoint site - will save you hours!
  • Textpad - everyone has a favourite notepad replacement, mine is textpad
  • 7-Zip - great free compression utility - supports most formats
  • BGInfo - updates your desktop background with system information - useful for easily seeing whats what on your vm
  • Process Explorer - powerful (though resource hungry) replacement for the windows Task Manager
  • Infopath Forms Server - if it is used in your prod setup

Lastly, but certainly not leastly, create a README.TXT to be stored with your vm files that explains what OS and SP is on it, what else is installed etc. - much easier to open a text file then have to boot the vm and poke around.

Happy dev-ing!!