How do I create a custom resolution for my display in Lion, running in a virtual machine?
I'm running OSX under VMWare, and as long as you don't run the VM in full screen, Display Preferences shows the screen size as the current window size, minus any host window borders.

With this you can resize the window manually to get close to the resolution you require.

The caveat to this is that you can't "set" the screen size to an exact amount, but with a bit of playing about you can get the resolution within a few pixels.

You will need a monitor with a larger resolution as the VM window does take away some pixels, so if your monitor is only 1280 wide, you will never get a full 1280 width with this method.