Raspberry Pi as XBMC Media PC

So… wanted to try out the Raspberry Pi to run XBMC. Already run XBMC on a Revo 3700 under Windows7 but wanted to set up another TV a cheaper way. Step up the Raspberry Pi. First the shopping list. As well as the Pi bought the extra bits needed as listed below (price in GB £ at Jan 2013 – click on links to go to products on Amazon and CPC-Farnell):

  • Raspberry Pi (Model B) 512Mb version (£28.07) CPC-Farnell
  • Cyntech IceBerry Case for Raspberry Pi with adaptor to fit to VESA 100 Monitor (£8.99) Amazon
  • High Speed HDMI Cable with Ethernet (v1.4a) 0.50m (£2.95) Amazon
  • USB 2.0 A to Micro B 0.30m (£4.99) Amazon
  • SanDisk 8GB 30MB/s Extreme HD Video SDHC Card Class 10 (£8.64) Amazon
  • Super Talent UFD 8GB ST Pico Mini-A USB stick (£3.99) Amazon

All these bits are available from Amazon if you want to do a one-stop shop, else shop around. The Pi is cheapest from CPC/Farnell. Total cost £57.63. So for under £60 you have all you need. You can miss out on the USB stick depending on install options selected.

CIMG2948

Assembly a reasonably simple job – the Pi is a tight squeeze into the case – just have to watch be careful pushing the USB connector into its cut-out. The case can be used with the model A Pi, but for the model B need to remove the tabs that cover up couple of the ports not found on the A (Ethernet and 2nd USB port). The ‘IceBerry’ case loks quite nice – can still see the circuitry and get the nice ‘light tubes’.

CIMG2951 CIMG2952

Bought the case with a 100mm VESA plate, but then discovered the TV only has 75mm VESA mounting – doh! The screws that hold the box together go through the plate first. The plate comes with the stand-off posts for mounting away from the back of the TV. However, such is the width of the PI box, you wont get all four screws in, so just using two extra holes drilled in the plate and using top two screws only. This isn’t really an issue as the PI weighs very little. if you have a wall mount TV, then you can just use sticky pads to fix the box or just wedge it behind.

The picture below shows PI mounted on the back of the 22” TV. You can see the short micro USB power cable going to the USB socket on the TV for power and the short HDMI lead.

CIMG2961

Before you power it all on though, you need to prepare the SD card and USB stick fro XBMC!

Continue reading

sfvAlarms and vSphere 5.1

Thanks to Pascal for trying out sfvAlarms on newly released vSphere 5.1 (sfvAlarms is my import and export utility for vCenter alarms). The export is OK but not the import. Am looking into this now and hope to have another version that will be 5.1 compatible as well as backwards compatible with 4 and 5. Currently sfvAlarms only works with 4.0 and 5.0 as per User Guide description.

Have downloaded the 5.1 vCenter Appliance and 5.1 C# Web Services SDK and getting an error it looks like on the AlarmSpec when calling CreateAlarm. I can’t however see anything wrong withe spec! aaarrgghhh! I need to go back to something really simple and see if can create the simplest possible alarm in 5.1 to make sure not something awry at VMware’s end!. Nothing I can see in the revision updates seems to relate to alarms, although have noticed that there are now 61 default alarm definitions as opposed to the 54 in vSphere 5.0.

The VMware KB for restoring default vCenter alarms doesnt seem to work any more either for 5.1 (KB: 2009166) – at least I cant get the default alarms back on the 5.1 applicance.

*Update 12-Oct-2012

  • KB all good.. dont know what happened but works fine on v5.1
  • New version of sfvAlarms now on Download page (v.1.1.0) now with vCenter 5.1 support 🙂

vSphere Autodeploy and DHCP

Few things I have learnt on my Autodeploy journey regarding DHCP…

When using DHCP, use reservations, then add Option 12 to your reservation and enter the host name. When your host gets added to vCenter it will come in with proper host name and qualified with domain (depending on other setups).

Also on properties of your reservation (using W2008R2), select DNS tab, and allow updates by ensuring Enable DNS dynamic updates is ticked, then selecting option Always dynamically update DNS A and PTR records. I Also tick box Dynamically update DNS A and PTR records for DHCP clients that do not request updates. This will mean you will get your auto-deploy hosted added to DNS with Host(A) record (and if you have remembered to create a reverse lookup zone for your subnet)a PTR record as well. This saves the work of adding this manually.

And finally… setting Spanning-Tree PortFast on your switch port with which your host is booting and getting DHCP lease is required. Have seen 2nd-stage DHCP request within gPXE failing / timeout unless Spanning-Tree PortFast is set.

vSphere Autodeploy

Stripeyfish is feeling chuffed! Managed to get AutoDeploy working under VMware Workstation 7 and just pushed out my first stateless ESXi 5 VM! Still a way to go with host files, answer files, VIB cutomisations etc but its a start!

Have built the lab from scratch – no use of appliances. So have W2008R2 based VMs as follows:

  • Domain Controller (inc. DNS)
  • SQL 2008R2
  • vCenter
  • Auto Deploy server hosting DHCP / AutoDeploy / Solarwinds TFTP

The PowerShell side of things strikes me as odd… like its unfinished though. For some reason even though the latest PowerCLI installed I had to manually add in the snapins for VMware.ImageBuilder and VMware.DeployAutomation (which took me a while to figure out). Was launching PowerCLI from desktop shortcut.

Once have tested all in the lab will be trying on real tin as part of a vCloud setup (which am also teaching myself and have partly setup in Workstation as well although my PC getting a bit stetched!) so can push out Resource Cluster hosts via Auto Deploy. Well thats the plan!

VMware vCenter Server Alarms – Import and Export utility now uploaded!

V1.0.0 of sfvAlarms has hit the decks and is now available on the download page. This simple utility allows the export and import of vCenter Server alarms from a simple Windows GUI. It uses the VMware Web Services SDK and is written in C#.

I felt something a lot simpler than having to use Powershell scripting or other scripts would enable managing alarms across vCenter’s to be much more controlled. Being able to import and export alarms at will allows for duplication of alarms as well as being able to revert to a known state in case of meddlers!

All comments greatly received as well as enhancement requests! I have tested as much as I can on vCenter 4 and against the vCenter 5 appliance. The User Guide on the download page has much more info about the utility.

If you are giving it a whirl I would obviously suggest not installing it on a production environment, but trying it out on a test vCenter installation first or maybe the VMware vCenter 5 appliance that can be downloaded from VMware.

Hope it proves useful, if not at least it has been a technical exercise for me to brush up on some programming skills 🙂

VMware vSphere Web Services SDK – WDSL issues building the DLLs

As per the developer setup guide for VMware vSphere Web Services SDK 5.0, you have to build your own DLLs from the wsdl files provided.
There are a few changes from SDK 4.0, most notably the lack of the genvimstubs.cmd and OptimiseWsStubs.exe files. However it is still fairly straightforward… apart from the initial wsdl command! read on…

Depending on where you extract the SDK zip file to you may end up with spaces in your path. After lots of head scratching it turns out wsdl.exe does not like this! If you have spaces in your path, then when running command “wsdl.exe /n:VimyyApi vim.wsdl vimService.wsdl” you will get an error as follows – despite trying all combinations of environment variables, running from Visual Studio command prompt in the actual vim25 directory:
Error: Could not find a part of the path ‘c:\program%20files\microsoft%20visual%20studio%209.0\sdk\vsphere5\vsphere-ws\wsdl\vim25\query-messagetypes.xsd’.

So rather than copy to e.g. Visual Studio/SDK path, just extract to e.g. C:\vSphere5\… and then once produced the two DLLs if you want to compile the samples, then move/copy to correct folder afterwards. The main DLL gets produced twice – the first time ‘as is’ to then produce the second XMLSerialisers DLL, then again when the reference to this DLL has been added to the vimservice.cs file and the XMLAttributes commented out – this is all in the Developer Setup Guide.

Hopefully this will save a few hours as I spent trying to work out what was going on! (This was with VS2008).

VMware vCenter Alarms – Import and Export

Anyone who has custom alarms in vCenter will be frustrated when they need to set up the same alarms in multiple datacenters as there is nothing out of the box that provides this either in vSphere 4 or 5 (please let me know if there is!).
To this end I have written a utility that allows simple export and import of alarms in and out using the C# web services API. It works really well and also effectively allows state management of alarms so that if anyone fiddles with alarms can easily reset to known set.

Update 21st May 2012 – nearly ready to upload… been doing some more coding on the front end over the weekend. Works with vSphere4.. just looking at vSphere5 compatibility.