G’day,
I’m about to overhaul my current setup and thought I’d write about it in case anyone was interested.
Existing setup & equipment
Lounge room:
Other room(s):
Goals for new setup
I’ve just recently bought a house (previously rented) so have an opportunity to run cables through the house and/or make modifications as required. Also, I’m running out of disk space on the file server, so I’ve decided now is a good time for an overhaul, and to setup a base framework for all the technology (current and future) for my new house.
I’m interested in technology used for practical purposes, thus I’ve wanted to tinker with some smart home/home automation stuff for a while now, but for various reasons, haven’t had a chance.
Ideally, I’d like the following:
With the above, there are a few conflicting issues:
My Solution
My solution, virtualisation. At first I didn’t think it could be done, but after having done a bit (A LOT!) of research, I’m convinced that it should all work. Here’s what’s changed:
Build new VM Server:
Existing HTPC front end:
Network infrastructure, cabling and devices:
Backups:
Pros/Cons to Solution
Well this post is a lot longer then I was expecting and probably includes a lot of irrelevant stuff. I wonder if anyone is still reading. Anyway, if I've overlooked anything, or you know why something won't work, or just feel like commenting, please do.
I’m about to overhaul my current setup and thought I’d write about it in case anyone was interested.
Existing setup & equipment
Lounge room:
- 52” Samsung LCD
- 5.1 pioneer receiver
- HTPC
- Runs MP frontend and TV Server, occasionally used for games
- Vista Home Premium 32-bit
- 2 x TV dual tuner cards
- 1TB drive for OS and TV recordings
- 4GB RAM
- Core 2 Duo 3.0GHz CPU (E8400)
- ATI Radeon HD 4870 graphics card
- Creative Sound Blaster X-Fi XtremeGamer sound card
- BluRay drive
- Runs 24x7
- Logitech Harmony One remote – controls all the above
Other room(s):
- File server
- Pentium D 820 CPU
- I think it has around 1GB RAM (maybe 2GB), would have to open up and check
- 5 x 320GB HDD’s in software RAID 5, effectively around 1.2TB of disk space.
- Stores all other data, music, movies, etc other then the TV recordings on the HTPC.
- No monitor, keyboard, etc
- Runs 24x7
- Runs some version of Ubuntu linux – to be honest, I may have forgotten the root password. This box has been rock solid, so I never needed to get in there and do anything. Only ever got repowered when the power went out and when I moved house.
- When turning it on after I moved house I discovered that one of the fans in the power supply doesn’t work anymore, so it does run quite hot now – no idea how long it has been running like this for.
- Laptop
- Network infrastructure and devices
- ADSL 2+ router
- 100Mbit wired network between router, server & HTPC (currently I’ve just got patch cables just lying on the floor)
- 54Mbit wireless from router for laptop
- I have 2 x routers and both seem to have issues:
- On one of them, the wireless seems to stop working regularly, (wired network continues just fine) and requires a repower to get working again. This usually happens when it’s under a bit of load, i.e. downloading something large at full speed.
- The other one is more stable, however, tends to reset itself (more frequently under load). The biggest issue is that it forgets what IP addresses it has dished out via DHCP, thus I get IP conflicts on the network.
- Since moving to the new house, I have tried “splitting the load” between the two devices. i.e.
- Once acts as an ADSL 2+ router with wireless turned off.
- The other has the router bit turned off and just acts as a wireless access point (WAP).
- This seems to be working better, but is not perfect.
- VoIP ATA on wired network
- ADSL 2+ router
Goals for new setup
I’ve just recently bought a house (previously rented) so have an opportunity to run cables through the house and/or make modifications as required. Also, I’m running out of disk space on the file server, so I’ve decided now is a good time for an overhaul, and to setup a base framework for all the technology (current and future) for my new house.
I’m interested in technology used for practical purposes, thus I’ve wanted to tinker with some smart home/home automation stuff for a while now, but for various reasons, haven’t had a chance.
Ideally, I’d like the following:
- Setup a base to build upon for some smart home/home automation stuff
- This may include some “smart” wiring.
- Flexibility to tinker and/or gradually add home automation stuff in the future
- This may include a mixture of unknown/unspecified hardware, OS platforms and/or software (including software developed myself)
- Tie in MediaPortal for media distribution
- As a software developer I can see the potential that MP2 has. Thus, I want to try and design the setup for MP 2 (as much as is possible with the current stage of development) to ease the transition from MP1 when the time comes
- Reduce power consumption (if possible)
- Introduce power management to either turn off or at least put to sleep a PC when not in use.
- Increase disk space for downloads, media, TV recordings, etc
- Possibly get some sort of backup of important data happening – currently I have none.
- All done with the minimum of costs
- Not a primary concern, but a factor none the less.
With the above, there are a few conflicting issues:
- Home automation requires solid reliability which typically means running in environments that don’t change much.
- Media and software such as MP tends to run in environments that evolve and change much more frequently.
My Solution
My solution, virtualisation. At first I didn’t think it could be done, but after having done a bit (A LOT!) of research, I’m convinced that it should all work. Here’s what’s changed:
Build new VM Server:
- Will run VMWare ESXi 4.0 (which is free)
- This is a “bare metal” hyper visor. This basically means;
- There is no “host” OS, which cuts out a few layers of software and increases performance, (unlike VMWare Workstation or similar which runs on a host OS like Windows). ESXi effectively is the OS. But more importantly, it allows;
- PCI device pass-though via VMDirectPath
- This is the magic that allows I/O to a PCI device (or PCIe device, etc, like a TV tuner card) to be forwarded to a specific virtual machine, effectively giving the VM direct access to the hardware without any software emulation layers.
- ESXi does not need any drivers for the device; this is all handled by the VM’s OS.
- To make this work, you need chipset support and motherboard bios support for “Intel Virtualization Technology for Directed I/O (VT-d)”. NOTE: this is different to the “Virtualisation Technology” option in the bios for the CPU.
- Up to 2 PCI devices can be passed though to a single VM – I will be passing the 2 x tuner cards (removed from the HTPC) though to a VM with MP TVService on it.
- ESX is completely remotely managed, thus has no need for a monitor, keyboard, etc.
- Host a large amount of disk space.
- 2 x 1TB HDD in RAID1 mirror, effectively 1TB of disk space.
- One of these drives will be taken from the current HTPC; another identical drive will be purchased.
- This will be used for hosting the virtual machine images.
- 4 x 2TB HDD in RAID5, effectively 6TB of disk space.
- This disk space will be allocated to a file server VM.
- It will be used for storage of all data, music, movies, and TV recordings.
- Between the TV recordings on the current HTPC and everything else on the file server, I’m already using around 2TB, so this should triple the space.
- Data on the current file server will be moved to here.
- Both RAIDs will be on a single 8-port Adaptec 3805 RAID card
- 2 x 1TB HDD in RAID1 mirror, effectively 1TB of disk space.
- Have 2 physical network ports:
- ESXi can be setup with virtual networks with virtual switches etc.
- One physical port will be for my internal network
- The other will be forwarded to the firewall VM and will have the ADSL router/modem on it only.
- See Firewall VM for details
- Virtual Machines:
- MP Server/TV Service
- Not sure if licences can be transferred like this, but the 32-bit Vista licence on the current HTPC will be used here anyway.
- This VM will have the 2 x PCIe TV tuner cards mapped to it.
- File server
- 64-bit OS of some kind to support the large disk space
- Possibly Win 2008 server or linux.
- 64-bit OS of some kind to support the large disk space
- Firewall
- Probably one of those free linux based ones, e.g. SmoothWall. Any suggestions?
- This VM will be setup with 2 virtual NICs, one mapped to the internal network, the other mapped to the physical NIC with the ADSL router.
- If possible, the ADSL router will have its routing capabilities (and wireless) turned off, so effectively it will be just a modem.
- All routing and DHCP, etc will be done by this VM.
- Hopefully this will help with the stability issues under load.
- Possible VM required to host network boot images
- HTPC will network boot from an image here
- Need to do a bit more research on how this will work
- Other VMs
- Unknown future VMs, possibly for home automation stuff.
- The above VMs are how I see it laid out now, but may evolve over time
- MP Server/TV Service
- Hardware:
- Intel BLKDX58SO motherboard
- It was very difficult to find a motherboard with support for VT-d in the BIOS (this is not something that is usually documented), especially one with a working implementation of it.
- Even harder was finding one that has enough PCIe slots!
- Intel Core i7 920 CPU
- Intel Virtualisation Technology capability is required, but most CPUs support that these days.
- 6G(3x2G) DDR3 RAM
- Cheap graphics card – Asus EAH4350 512M PCIE
- The most advanced graphics this will see is the BIOS. ESXi install is text based and once installed is completely remotely managed (other than some basic management network settings, again only text based menus)
- Onboard graphics would be perfect (so it doesn't waste a valuable PCIe slot) but that doesn't seem possible. Anyone know of a cheap graphics card with lower power consumption than this one?
- Adaptec ASAR3805Kit SATA/SAS RAID card
- This is a hardware RAID card. ESXi does not support "fake" RAID or software RAIDs.
- 2 x Seagate 1TB 7200RPM SATA II Server edition(ST31000340NS) HDD
- One is existing in the HTPC, the other will be purchased
- 4 x Western Digital 2TB SATA II HDD Green Power
- Coolermaster Centurion RC-590-KKN1 590 Case Black
- 8 x iCute SATAII Hot Swap Mobile Rack – not exactly required, but they each have an LED which can be plugged in the RAID card to see each drives activity, identify faults, etc
- Antec ATX EarthWatts 650W power supply
- 2 x Hauppauge HVR-2200 Hybrid Dual Tuner Card – from existing HTPC
- Intel BLKDX58SO motherboard
Existing HTPC front end:
- Current HTPC will still be used as a HTPC with the following changes
- The 2 x PCIe tv tuner cards will be moved to the VM server to be mapped to the TVServer VM.
- The 1TB HDD will be removed and used in the RAID1 mirror of the VM server to hold the images for the VMs (which will ultimately hold the hard drive image for this HTPC)
- Network boot from one of the VMs
- need to research this a bit more for how exactly this will be done
- I don't see any bottlenecks here as gigabit network speeds are faster than the single 1TB drive in the HTPC currently
- When not in use, it can be powered down, or at least put to sleep to reduce power consumption – from what I've read, this graphics card is not exactly very power efficient.
- Windows 7 Home Premium 64-bit - assuming there are 64-bit sound/graphics drivers that work, are there any issues with games, etc by going 64-bit?
Network infrastructure, cabling and devices:
- Expanding on what I’ve already done:
- One of the ADSL routers will have its wireless and routing capabilities turned off, effectively making it just an ADSL2+ modem – this will be mapped to the firewall VM.
- The other will have its modem & router turned off, effectively making it just a wireless access point (WAP).
- The firewall VM will perform all the routing and DHCP, etc so hopefully things will be a bit more reliable.
- Splitting this over multiple devices will no doubt increase power consumption, but I’ll take that over unreliability
- New gigabit switch
- Existing VoIP ATA
- "Smart" wiring
- Everything will be cabled back to a central place, this allows things to be easily "patched" from anywhere to anything in the future.
- Given that all the media distribution (TV, music, movies, etc), VoIP, etc is all over TCP/IP or can run on CAT6 cabling, I think that will be the bulk of what I put in
- CAT6 cabling will be added where and as required
- Speaker cabling to the receiver
- Phones can patched from the VoIP ATA over the CAT6 cabling so no extra requirements there.
- If any other cabling is required for home automation in the future, this can be added later - the house is an old Queenslander which allows very easy access to retrofit stuff and run cables under the floor/house
- I'm considering moving the HTPC & receiver out of the lounge room in together with the VM server and patch panel
- This would just require running a longer HDMI extension cable from HTPC back to the TV, as well as USB (probably with USB hub in lounge room) for assorted devices like wireless keyboard, IR receiver, etc.
- Not sure about IR getting back to receiver though – would have to investigate a bit more on that.
- In the future I may want to control the TV, receiver, etc remotely for home automation, so may need a more sophisticated IR control solution anyway.
Backups:
- Old file server will serve as a backup server of important data
- Will probably locate it in a different room, or under the house, or maybe even in the shed
- Possibly using WiFi to this box (rather than wired network) may isolate it from the (admittedly small) risk of a power surge or spike down the network cables.
- Investigate the use of Wake-on-LAN (WOL) to only power on when required, thus reducing the power used by this extra machine
Pros/Cons to Solution
- Pros:
- Hopefully reduced power consumption
- Better utilization of resources (i.e. CPU, RAM, disk, etc)
- Allows me to very quickly backup and test changes to any system with very little risk
- i.e. VM's can be duplicated/cloned, etc, likewise, the net boot image for the HTPC can be copied and restored quickly
- e.g. This means with the relevant backups, a MP test build or plugin or driver or whatever, can be installed (to any of the VM's or net boot HTPC) without fear of it destroying the setup. If things go bad (registry destroyed, OS won't boot, etc), it's a very simple matter of stopping that VM and firing up the original, or copying the original net boot image back.
- Pretty much the only thing shared between the clones would be the mass storage of data, media, TV recordings, etc.
- The VM server also allows me to temporarily (or permanently) fire up a new environment with any OS very quickly without any extra hardware
- Cons:
- Added cost
- The X58 platform is expensive (CPU, RAM, motherboard)
- Hardware RAID card – ESXi does not support “fake” or software RAID or cards
- Overkill on specs
- Again, additional cost
- I read somewhere, however, that i7 CPUs claim to be more power efficient then some other CPUs, particularly under idle load. However, I couldn’t find much info comparing various processors/platforms power consumption under various loads, i.e. idle, full load, etc.
- Limited hardware compatibility for ESXi
- Websites such as ESX / ESXi 4.0 Whitebox HCL do help to some degree.
- Added cost
Well this post is a lot longer then I was expecting and probably includes a lot of irrelevant stuff. I wonder if anyone is still reading. Anyway, if I've overlooked anything, or you know why something won't work, or just feel like commenting, please do.