kbyrd's answer only works with shared vm's. Ja5087's answer works, but there is another way that is cross platform. I provide this answer because I was looking for the same answer today and did not come across a single post will all the information.
This answer allows starting a vm in the background if you so choose.
Create a script with the following command:
vmrun -T {ws|server|player|...} [-vp virtualMachinePassword] [-gu guestUser] [-gp guestPassword] start "path to vmx file" [nogui]
-vp is the virtualMachinePassword for encrypted machines
-gu is the guest user to sign in with and -gp is the guest user password if you want to autologin and it is not set in the vm config.
nogui starts the vm in the background
To prevent failure of startup due to vmware dialogs, edit the .vmx file and add the following options to auto answer any vmware dialogs:
uuid.action = "keep"
OR uuid.action = "create"
msg.autoAnswer = "TRUE"
For the uuid.action, this answers the question when you start the vm after moving or copying to a new location. keep is the equivalent of "I Moved It", create is the equivalent of "I Copied It".
Thanks! Gues this means I have to login right? – BetaRide – 2011-10-12T14:02:42.433
If you have the settings set to that yes. – Ja5087 – 2011-10-12T14:04:47.330