This isn't really a gaming question, it's more of a "Can you help me build" question.
To be fair you might have more luck asking this question on a Mac forum.
You can run Virtual Machines on most Mac systems. They do NOT play games well.
The 27-inch iMac has a DisplayPort input that you might be able to use if your computer has a DisplayPort output, but on the site it suggests there are also adapters available for the iMac, but doesn't state what they are, or why they are needed.
You said you don't have space for them both ... if it's only because of the monitor (and why wouldn't it be, the iMac has no 'tower' or box) then there's a chance you can run your PC video output to the input on the iMac screen ...
DO NOT take my word for this, but I would start looking in that direction if you have that option. This way you can keep your PC box under your desk or wherever you want and ditch it's monitor, using the iMac screen as the display instead.
I will repeat, I don't know if this will work, you can look into it some more. Ask a Mac genius or something, they think they know everything.