Hypervisor

From Dietpc

Jump to: navigation, search

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

QuantityTypeMake and ModelPropertiesSourceTotal Price (AU$ circa Sep 2011)
1CaseMini-Box M3502x 2.5" int (customised, see below), concealed front USB, 192mm(W) x 210mm(D) x 62mm(H)Mini-box.com.au$70
1Power Supply KitPicoPSU-150-XT (internal DC-DC) / Generic (external AC-DC)12V @ 8.5A, ~110W maxMini-box.com.au$100
1MainboardJ&W Minix-H61-USB32x DDR3, 4x SATA2, 4x USB2, 2x USB3, 2x GB LAN, integrated GPU (DVI/VGA/HDMI), 1x PCIe 16xTechbuy$95
1CPUIntel Core i5 2500S2.70 GHz quad core 65W TDPDinsdale's Hardware (eBay)$235
1CPU coolerDynatron K2Low profile (28mm H), includes 75mm blower (noisy) which I discardedMini-box.com.au$45
1CPU fanTop Motor DF127015BU70mm 4-pin PWM , to replace noisy blowerThe Fan Van (eBay)$10
2RAM DIMM4GB DDR3 G.Skill PC3-21331333MHzMSY$45
2HDDSamsung HM641JI2.5" 640 GB SATAMSY$130
1SSDToshiba4 GB USB thumb driveMSY$10
1SATA Power CableGenericShort Molex to SATA power (not one with clip, as shown)MSY$5
1SATA Data CableGenericShort "left-angle" (15cm)TechBuy$5
1SATA Data CableGenericShort straight (25cm)MSY$5
1Mini-PCIe cardIntel Centrino Advanced-N 1030802.11b/g/n wireless and Bluetooth (picture is larger than life size!)MegaBuy$20
2SMA PigtailGenericMini-box.com.au$15
2SMA AntennaGenericMini-box.com.au$25
1Case Mounting KitMini-BoxWall/VESA mount For M350 case (w/o VESA screws)Mini-box.com.au$55
4VESA mounting screwsGenericMini-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.

Personal tools