By user12620111 on May 21, 2013
As a review, with Solaris 10, use your favorite editor to create a sysidcfg file:
1) Solaris 10 Install: Using sysidcfg to avoid answering the configuration questions in a newly installed zone:
After the "zoneadm -z app-41 install" you can copy the sysidcfg file to "/ZONES/app-41/root/etc/sysidcfg" (assuming your "zonepath" is "/ZONES/app-41") and the initial boot process will read the settings from the file and
not prompt the system administrator to manually enter the settings.
2) Solaris 10 Clone: Using sysidcfg when cloning the zone
I used a similar trick on Solaris 10 when cloning old zone "app-41 to new zone "app-44":
# zonecfg -z app-41 export | sed -e 's/app-41/app-44/g' | zonecfg -z app-44
# zoneadm -z app-44 clone app-41
# cat /ZONES/app-41/root/etc/sysidcfg | sed -e 's/app-41/app-44/g' > /ZONES/app-44/root/etc/sysidcfg
# zoneadm -z app-44 boot
With Solaris 11, instead of a small human readable file which will containing the configuration information, the information is contained in an XML file that would be difficult to create using an editor. Instead, create the initial profile by executing "sysconfig":
# sysconfig create-profile -o sc_profile.xml
# mkdir /root/profiles/app-61
# mv sc_profile.xml /root/profiles/app-61/sc_profile.xml
The new XML format is longer so I won't include it in this blog entry and it is left as an exercise for the reader to review the file that has been created.
1) Solaris 11 Install
# dladm create-vnic -l net0 app_61
# zonecfg -z app-61
Use 'create' to begin configuring a new zone.
create: Using system default template 'SYSdefault'
zonecfg:app-61> set zonepath=/ZONES/app-61
zonecfg:app-61> add net
zonecfg:app-61:net> set physical=app_61
# zoneadm -z app-61 install -c /root/profiles/app-61
# zoneadm -z app-61 boot
# zlogin -C app-61
2) Solaris 11 Clone: If you want to clone app-61 to app-62 and have an existing sc_profile.xml, you can re-use most of the settings and only adjust what has changed:
# dladm create-vnic -l net0 app_62
# zoneadm -z app-61 halt
# mkdir /root/profiles/app-62
# sed \
-e 's/app-61/app-62/g' \
-e 's/app_61/app_62/g' \
-e 's/126.96.36.199/188.8.131.52/g' \
< /root/profiles/app-61/sc_profile.xml \
# zonecfg -z app-61 export | sed -e 's/61/62/g' | zonecfg -z app-62
# zoneadm -z app-62 clone -c /root/profiles/app-62 app-61
# zoneadm -z app-62 boot
# zlogin -C app-62
I hope this trick saves you some time and makes your process less brittle.