Wednesday, 27 November 2013

Sys-Unconfig on Solaris 10 Branded Zone Doesn't Give Option to Change Hostname

As the title says, I was trying to do a sys-unconfig on a Solaris 10 branded zone and when I reboot and go enter the new config info, the hostname doesn't get asked to be changed. The system automatically configures the zonename as the hostname.

Some things I tried that didn't work:

  1. Configure a NIC that doesn't exist
    Since most of the googled results pointed to pulling out the network cable, I tried the logical equivalent for a zone. However, configuring a non-existent NIC doesn't work, because the a zone won't boot when configured with a NIC that doesn't exist.  
  2. Choose a NIC that does exist but is offline
    Same reasoning at point 1, still doesn't work though.
  3. Configure an IP that doesn't exist on our LAN
    Same reasoning at point 1, still doesn't work though.
  4. Do it with no NIC configured
    This actually works, the system asks me for a new hostname during the sysconfig. Unfortunately, it doesn't ask me for any of the subsequent network info. So when I add the NIC, I'll have to then do the subnet and DNS configuration manually. No thank you.  
  5. Search for files that contain the hostname and delete manually
    Just in case the sys-unconfig was not deleting these files. Didn't work.
  6. Set the bootargs to "noauto"
    Got this from an Oracle SR for when the hostname is being retrieved from the jumpstart server (which I don't have anyway). Didn't work.
What worked:
  1. After the sys-unconfig and subsequent sysconfig completed, I edited the following files and rebooted the zone:
    • /etc/inet/hosts
    • /etc/nodename
    • /etc/hostname.net0 (or whatever's relevant)

No comments:

Post a Comment

Note: only a member of this blog may post a comment.