How to make Virtual Machines useable

I run Arch Linux on my home computer. Because I work with .Net a lot, there are many times I need to do things on a Windows machine. I've turned to VirtualBox for this purpose.

Here, I'd like to say a few key things to make virtual machines run nearly faster than native.

First of all, you need a modern machine. At least 4 CPU cores, 8G of DDR3 RAM, etc etc. Second of all, you need harddrive speed. This is the one single huge bottleneck of virtual machines. I've heard of people swearing by SSDs for virtual machines. I'm sure that'd help things considerably. But, if you want a lot of space, and something really speedy, use RAID. With my machine, I bought 2 SATA3 64M cache Western Digital Black 500TB harddrives. These things are basically the fastest, yet affordable consumer drive. You could also go Velociraptor, but at that point why not buy an SSD.

Anyway, buy at least 2 good harddrives. The more cache the better. Then, set up RAID 0 for the partition holding your virtual machines. I actually went ahead and made some partitions I care about such as /home be RAID1, and then everything that I could just reinstall such as /usr RAID0, along with the partition holding my machines. For filesystem, I'm not really too sure. I use xfs on my host machine and have yet to have any problems. I imagine ext4 may have some slow downs because of extensive journaling, but I don't know that.

There are a few things to keep in mind with the virtual machine software as well. The two best ones I've observed are VMWare and VirtualBox. One is free, one isn't. I'm not for sure which is actually more performant, but VirtualBox works good enough for me. Anyway, whichever you choose, make sure to always make the virtual disk a fixed size disk. This makes your virtual machine faster, and really with harddrive space as abundant as it is, you shouldn't have any excuse. You can always resize the disk later if needed.

One last thing, run Linux as your host. RAID is about 20 times easier and faster, it'll consume less resources, and virtual machine software just seems to work better running on top of it.

If you follow this advice, you can have some smoking virtual machines. For instance in the time of writing this blog post I installed Windows 8 enterprise in a virtual machine. When I did this on my work laptop it took an hour and a half to get all the way through the install.

Posted: 9/15/2012 5:03:03 PM