SmartOS – Part 1

SmartOS is a hypervisor and a live image based on Illumos (Open Solaris, Unix-based). It supports the creation of zones (Unix/Ubuntu/Centos, very much like Promox) as well as regular virtual machines via KVM. Site is http://smartos.org/, you can find a good basic overview of the possibilities is at http://www.machine-unix.com/beginning-with-smartos/ (other user experience at http://opusmagnus.wordpress.com/2012/02/14/discovering-smartos/)and a very good description of the virtulization approach and OS basics at http://www.perkin.org.uk/posts/smartos-and-the-global-zone.html.

SmartOS is a 64bits only OS and I don’t have many x64 capable machines so I decided to experiment with SmartOS as a virtual machine on ESXi.

The First Challenge
ESXi will only boot from the ISO image in the virtual CD tray the first time after the VM is created. The second time and thereafter, it will try to start from the hard drive and crash, since SmartOS is loaded into RAM at launchtime and isn’t actually installed on the drive. For some reason, you can’t have a virtual USB key through ESXi, just share a physical one plugged into the hypervisor, which just isn’t an elegant solution. So I went about adding SmartOS to my PXE server (a Windows XP machine, which incidentally I need to have a look at because it has been crashing regularly on me but that’s another story) and well, that wasn’t as straightforward as that at all. I checked those links for reference – http://nahamu.github.com/2011/08/17/smartos-pxe.html – http://blog.smartcore.net.au/smartos-network-boot-with-pxe/ but nothing fit and I had to play around <<ADD DETAILS OF THE SETUP HERE>>

The Second Challenge
I then went about creating a zone to install FIFO on (http://project-fifo.net/display/PF/Project+FiFo+Home) but discovered at pkgin update time (“pkgin -fy up”) that my zone didn’t have connectivity (ie it couldn’t download the package_summary.gz that I checked was available on the joyent site), the IP of the zone registered on the LAN tab on my router, yet I couldn’t ping it. It turned out that I had to update ESXi to allow Promiscuous Mode for the NIC it presents to the virtual machines (that’s done through the vSphere console, under Configuration -> Network for the hypervisor itself, not the specific VM).

The Third Challenge (User-Related)
At this stage, I then went ahead and ran the chunter script… in the fifo zone rather than the global zone, which caused some havoc not easily rolled back and this ended up prevented the web console from working. After some unsuccessful debugging, I ended up tearing the fifo zone down and rebuilding from scratch. Workin perfectly now!

For future experimentation, if I can get suitable physical hardware to deploy
http://ispire.me/how-to-create-smartos-windows-vm/

If needed
http://wiki.smartos.org/display/DOC/SmartOS+on+VirtualBox

Advertisements