How to use sysidcfg for zone deployment

This is mostly for myself that I can remember how to use the least documented feature of Solaris and openindiana - the sysidcfg files.

These files help deploying new zones faster, as you don’t have to configure them by hand afterwards. But what is the syntax and how can you use them?

Here is an example file

# name_service=DNS {domain_name=<your_domain> name_server=<your_dns_server>}
network_interface=<interface1> {primary hostname=<hostname> default_route=<route_ip> ip_address=<if_ip> netmask=<if_netmask> protocol_ipv6=yes}
network_interface=<interface2> {hostname=<hostname> ip_address=<if_ip> netmask=<if_netmask> protocol_ipv6=yes default_route=NONE}`

The most important thing first: you don’t need system_locale after openindiana 151 anymore. If you have it in your config, even with C, delete it or else the setup will not work!

If you don’t have a dns record for your zone yet, set the @name_service@ to NONE. If you have already a record set, use the commented syntax.

The next interesting setting is root_password. Here you don’t input the password in cleartext but crypted. I wrote a little script to generate this string. You can find the code here.

The network_interface part is pretty easy, if you take these lines as a dummy. If you have only one interface, you can name the first interface PRIMARY. That way, you have a bit less to write.

That’s all so far. I will update this post, when I have figured out, what to fill into nfs4_domain and security_policy.