you're reading...

SmartOS, Project Fifo and Bind

At work we have been looking at using SmartOS for a skunk works project to test disaster recovery/flash back for Oracle DB using SmartOS and ZFS snapshots.

One really nice frontend for SmartOS is Project Fifo.

While offically it doesn’t support the current release of SmartOS, I have had issues running the recommended version of SmartOS (20130222) on my hardware at home, I believe it has to do with either the dual nics built into my motherboard, or the drivers for them.

Looking at the chunter script there are newer versions supported, but I really didn’t have any luck with them either.

I was able to replicate my issues with VirtualBox, so that let me quickly test which versions of SmartOS might work. Love the fact that the OS isn’t really installed, so upgrading or downgrading is just a matter of changing my iPXE menu and rebooting the server.

SmartOS recent released a new version and I was able to get it to work with Fifo in Virtualbox. At first I ran into an issue which can be kinda frustrating to deal with if you don’t know what’s going on.

Basically the hypervisor gets reported by chunter to fifo as localhost (, making fifo unable to function correctly.

It doesn’t matter if you set hosts file or the app.conf for chunter with the host info, it will still not work, this is because of how chunter (and I think other fifo components) determine the hostname.

In short, you need a DNS server. If you do a lot of VM testing on your laptop like I do, chances are you won’t be able to resolve the names you use in your test networks.

Simple solution is to create a tiny zone that just runs bind.

Grab the base64 image with imgadm
imgadm import fdea06b0-3f24-11e2-ac50-0b645575ce9d

Create a ns1.json like this:

 "autoboot": true,
 "brand": "joyent",
 "image_uuid": "fdea06b0-3f24-11e2-ac50-0b645575ce9d",
 "max_physical_memory": 64,
 "cpu_cap": 100,
 "hostname": "ns1",
 "alias": "ns1",
 "quota": "2",
 "resolvers": [
 "nics": [
        "interface": "net0",
        "nic_tag": "admin",
        "ip": "",
        "netmask": "",
        "gateway": ""

Running vmadm create -f ns1.json will make a 64meg mem / 2gb disk zone for running bind in.

Once created do a zlogin to the VM ID and run something like this (adjusting IP’s if desired):

pkgin install bind

cat >>/opt/local/etc/named.conf<<EOF
zone "local" {
  type master;
  file "/var/named/zones/local.db";

zone "2.0.10.in-addr.arpa" {
  type master;
  file "/var/named/zones/local.rev";

mkdir /var/named/zones

cat >>/var/named/zones/local.db<<EOF
local.      IN      SOA     ns1.local. admin.local. (

local.      IN      NS    ns1.local.

ns1         IN      A
smartos     IN      A
fifo        IN      A

cat >>/var/named/zones/local.rev<<EOF
@ IN SOA ns1.local. admin.local. (

                      IN    NS     ns1.local.
2                     IN    PTR    ns1.local.
10                    IN    PTR    smartos.local.
11                    IN    PTR    fifo.local.

svcadm enable dns/server:default

Now when you make the fifo zone you point to as the resolver and you will be able to find your hypervisor.



2 thoughts on “SmartOS, Project Fifo and Bind

  1. ns1.json – should me removed comma “,” in line 23.
    also before creating that vm, you must install image imgadm import fdea06b0-3f24-11e2-ac50-0b645575ce9d

    Posted by Alex | December 25, 2013, 12:04 pm
  2. Good catch, thanks Alex.

    Posted by koaps | December 28, 2013, 1:05 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s