Just got back from the VMWare Infosession. The guy talked about the workings of VMWare virtualization. It’s quite cool.<p/>

The way it’s implemented in VMWare is: all code, OS and app, runs at ring 3 (userland) in the guest. Most instructions go through to the processor and aren’t touched. However, an instruction that would need to talk to the hardware directly in some way (like getting a trap thrown) gets special translation – it runs a kernelspace module in the host OS that hears the trap and does whatever needs to be done in the guest instead of the host.<p/>

This makes VMWare very fast for most cpu-bound activities, since it’s mostly just passing them straight through to the CPU. However, regarding IO and drivers, much more emulation occurs – VMWare emulates a standard ethernet card, and a standard SCSI controller, etc. This entails a lot of IO slowness, but it makes a lot of sense – the reason being that now, you can do things like put the harddrive on the network, so that all the VMWare machines are accessing the same disk. You can install as many virtual ethernet cards as you want, organize them topologically however you want (links and switches, between different physical machines, etc.,) and they really act like one, with a certain virtual MAC address and an IP that the real world sees and can understand.<p/>

Then you can pull REALLY cool tricks, like moving a guest OS from one host to another with barely a blink. It precopies memory for a few seconds before the switch, then it halts the VM, copies the diffs from the precopied memory (which should be small) and cranks up the VM on the other machine. It doesn’t even need a new IP address or anything!<p/>

Anyway, I got a free copy of VMWare, so I’m gonna install it on my linux machine here someday and see if it works. <p/>