Hypervisor
by Paul Whittaker, Jan 2012
Contents |
Introduction
My latest obsession is creating Mini-ITX (because I like this form factor!) hypervisors. I am now using one of these - an LGA775+DDR2 prototype - to host all of my DIET-PC development VMs. This article, however, is about my much more "commercially accessible" LGA1155/DDR3 design.
Design Parameters
- As much CPU and RAM as possible within Mini-ITX form factor constraints (typically at most 2 DIMM slots, single CPU socket, <= 65W TDP)
- Total price less than $1000
- As small a case as possible
- Redundant (RAID 1) disk storage with sufficient capacity to store many virtual machines
- O/S resides fully (with the possible exception of swap) on solid state disk, not the storage it manages
- Capable of running KVM using DIET-PC (although W2K8R2-plus-Hyper-V and VMware ESXi could also be considered)
- As quiet as possible
- Energy efficient when idle (mostly because I want one of its VMs to run torrents off-peak!)
- Flexible networking (e.g. wireless, bluetooth, dual NIC) for alternate (non-hypervisor) uses
Hardware
Picture Gallery
Components
Quantity | Type | Make and Model | Properties | Source | Total Price (AU$ circa Sep 2011) | |
---|---|---|---|---|---|---|
1 | Case | Mini-Box M350 | 2x 2.5" int (customised, see below), concealed front USB, 192mm(W) x 210mm(D) x 62mm(H) | Mini-box.com.au | $70 | |
1 | Power Supply Kit | PicoPSU-150-XT (internal DC-DC) / Generic (external AC-DC) | 12V @ 8.5A, ~110W max | Mini-box.com.au | $100 | |
1 | Mainboard | J&W Minix-H61-USB3 | 2x DDR3, 4x SATA2, 4x USB2, 2x USB3, 2x GB LAN, integrated GPU (DVI/VGA/HDMI), 1x PCIe 16x | Techbuy | $95 | |
1 | CPU | Intel Core i5 2500S | 2.70 GHz quad core 65W TDP | Dinsdale's Hardware (eBay) | $235 | |
1 | CPU cooler | Dynatron K2 | Low profile (28mm H), includes 75mm blower (noisy) which I discarded | Mini-box.com.au | $45 | |
1 | CPU fan | Top Motor DF127015BU | 70mm 4-pin PWM , to replace noisy blower | The Fan Van (eBay) | $10 | |
2 | RAM DIMM | 4GB DDR3 G.Skill PC3-2133 | 1333MHz | MSY | $45 | |
2 | HDD | Samsung HM641JI | 2.5" 640 GB SATA | MSY | $130 | |
1 | SSD | Toshiba | 4 GB USB thumb drive | MSY | $10 | |
1 | SATA Power Cable | Generic | Short Molex to SATA power (not one with clip, as shown) | MSY | $5 | |
1 | SATA Data Cable | Generic | Short "left-angle" (15cm) | TechBuy | $5 | |
1 | SATA Data Cable | Generic | Short straight (25cm) | MSY | $5 | |
1 | Mini-PCIe card | Intel Centrino Advanced-N 1030 | 802.11b/g/n wireless and Bluetooth (picture is larger than life size!) | MegaBuy | $20 | |
2 | SMA Pigtail | Generic | Mini-box.com.au | $15 | ||
2 | SMA Antenna | Generic | Mini-box.com.au | $25 | ||
1 | Case Mounting Kit | Mini-Box | Wall/VESA mount For M350 case (w/o VESA screws) | Mini-box.com.au | $55 | |
4 | VESA mounting screws | Generic | Mini-box.com.au | $5 | ||
Total without extras (wireless, VESA mount) | $755 | |||||
Total with extras | $875 |
Putting It Together
The main obstacle to assembling the above kit is that the case is only 60mm tall. Precious few LGA1155/6 coolers can fit in this at all, and of those that can only the ones with blowers are short enough to fit a 2.5" hard disk above it (as the case manufacturer intends) and can avoid severe airflow disruption by venting horizontally rather than vertically. The problem is, blowers are much noisier than fans (as they are designed primarily for use in 1U rack mount servers, in a server room that is already noisy), and will also produce no airflow over the hard disks and the rest of the mainboard.
So after some experimentation, what I did was make some spacers out of strips of tin, and use them to attach the second hard disk directly underneath the first, such that you have a "dual stack" hard disk pancake attached to a single HDD bracket on the LHS (facing front), leaving the RHS clear for a top-venting cooler. This trick can't be used with every mainboard, but the JW Minix-H6XX-USB3 boards have south bridge heat sinks short enough to fit your drive stack above. Even so, the tolerances are very fine, such that the round coolers that are typically used with Intel CPUs won't fit. So I took a square cooler fitted with a blower, discarded the blower, and replaced it with a square 70mm fan of the type used in stock AMD coolers, fitted by means of some barbs which once I again I hand-made from strips of tin. It sounds pretty dodgy, but it actually all works beautifully, and everything is very firmly secured.
Software
Software configuration was pretty straightforward, as I'd already done most of the ground-work as part of my [DIY_NAS exploration into DIY NAS solutions]. The hard part was finding out exactly what worked, and what didn't, in the unstable (particularly with regard to Spice, the open-source VDI solution) QEMU and QEMU-KVM distributions.
I originally intended to have the O/S boot from an IDE or SATA DOM (Disk-On-Module), but very soon discovered that the case that I had selected has hidden - and fairly annoyingly inaccessible, especially considering the fragile plastic front-cover clips! - front USB ports, such that a humble USB stick would serve just as well for the boot device, at a fraction of the price.
One slight complication to the use of boot-from-USB is that the disk's device name tends to vary depending on what other USB and/or eSATA devices are plugged in, which causes problems if your bootloader expects the root filesystem to be on (for example) /dev/hdc specifically.