As you may have seen on various news sites, the UK is covered in snow at the moment and we aren’t coping well as a civilisation. I usually leave my work computer in the office unless I am planning to work from home the following day, and since the weather forecast on Tuesday was that it would be easy to get to work on Wednesday I did so.
As it turns out, we got another 2 inches of snow on Tuesday night, and the site at which I work is closed until further notice. Happily, this has not been quite as big a problem as it otherwise would have been for me; and in the interests of (a) bragging and (b) hopefully aiding my colleagues who are in a similar plight, I shall now explain how I got around it.
One option, of course, is to effectively donate one of your own computers to your company, running their stuff on it. This is unattractive because it costs a lot. Obviously, if there were a way to get a free computer to run your company’s programs on this problem would go away. I have an additional complication in that my company prefers Windows on Linux on the desktop, and I prefer OS X.
Now any system, whether real or in VirtualBox, needs somewhere to store its data. In the case of OS X on my MacBook this goes on an SSD disk built into the machine. One option for the storage for the VirtualBox virtual machines is to allocate some space on this SSD disk for the virtual machine – I chose not to do this because (a) I have better uses for the space and (b) it means you always have to run the virtual machine on the same physical machine every time. Fortunately I have a machine I use as a server which has plenty of spare space: I allocated some of its space and used the open-source software to make it available on my network. VirtualBox accesses the iSCSI disk and presents it to the guest operating system as a local disk, so you don’t need to go trying to find iSCSI initiator software for whatever OS you want to run.
This means I can run the virtual machine on my laptop or on my other mac; if I run it on my other mac I can access it using an RDP client. New in VirtualBox 3.1 is a rather cool feature allowing me to start the VM on one system and later “teleport” it to the other without needing to shut it down or losing any data. This is handy, as my laptop has more CPU grunt, but uses a wireless network whereas my other mac is slower but on the same wired network as the iSCSI server so it can do things which involve a lot of access to the virtual disk much more efficiently. Another problem with running the VM on the laptop and using iSCSI disks over wireless is that if I sleep and wake the laptop the VM software starts wanting to access the disk before the network is available to service the request.
Once I’d set all that up, it was quite simple to follow the instructions to install Ubuntu in the VM, then I downloaded the VPN packages to connect to the office network with my wife’s laptop, installed them, and then it was good to go.
Total elapsed time for the whole project would probably be about 3 hours, most of which is just computers doing things and maybe 30 minutes of human time overall. Once you’ve set it up, it’s not very much slower to use than an actual machine.
Of course, you can use Windows instead of Linux if you have the appropriate licenses (I don’t), and the host operating system can be pretty-much anything.