Schedule Kickstart - hostname for system

Latest response

When you schedule a kickstart for a virtualization host in the Satellite GUI, are you able to pass the name you enter there into the kickstart (as a hostname, for example), in any way?

Responses

Do any Satellite/kickstart users here know the answer to this one?

Hi Jamie,

Going to your Satellite, Kickstart Profile, Advanced Option and finally under network you can add --hostname=your-hostname-here right after the network configuration (DHCP or Static).

Please, if the above is note the case, share more details.

Regards

Fábio Da Cunha

What Fabio describe is an option that we also have used.

The method we currently use (which is bit more involved)...

  • comment out the network line in your kickstart profie (on the Sat Server)
  • PXE boot (or boot from ISO) and use the arrow keys to move to the kickstart you would like to use then hit TAB
  • when you hit TAB the kickstart command will appear - append the following to that line
  • ip=192.168.0.110 netmask=255.255.255.0 gateway=192.168.0.1 dns=192.168.0.10 hostname=mytest.mycompany.com

I believe if the IP address you provide is in DNS, it will figure out the hostname on it's own.  You might also want to try

ip=dhcp hostname=mytest.mycompany.com

The part of the method we use that is bothersome for me is having to comment out the network line in your kickstart.  However, if I did not do that part - it did not seem to matter what I provided at boot time, the kickstart profile would take precedence.

So - give it a try and see if it works for you.  I may have a screen shot that I can attach to this thread.

## EDIT:  I also should mention that we upload our own Kickstart profile (in addition to using Satellite to generate the profile).  This allows a lot more flexibility, but also requires quite a bit of knowledge of what it expects for options and keywords.

## EDIT 2:  I just realized that I was missing one key point in the original post - you are scheduling a Kickstart from Satellite (which we do not do).  I believe there is a spot where you can pass kernel params, etc.. and that would be the spot where you put ip=<blah> netmask=<blah> etc...  Now I have some homework as I am curious how you would scehdule a kickstart! ;-)

Maybe try asking on the... oh wait. Nevermind. ;)

I set the hostname of a machine by setting my own variable at PXE boot time like 'THEHOSTNAME=my-servers-fqdn'. I then fetch that by sourcing /proc/cmdline (all the variables set at boot time will appear there) and process the information in my kickstart script. Something like:

# example

# in %PRE

cp /proc/cmdline /tmp/mycmdline

# in %POST NOCHROOT

. /tmp/mycmdline

hostname $THEHOSTNAME

# enf of example

 

Not sure how this would play out when you schedule a kickstart from RHN Satellite though..

Fabio, Magnus, et al.

All of those methods work fine.  However, that's not the question I'm digging into.

* Using the method I described, by going to the VirtHost > Virtualization > Provisioning, and filling out ONLY the data in that form/on that page, is there a way to take the value that I enter into that name field and make it available (or is it already available) in the kickstart as a variable?

BTW, it's also the domain name kvm uses to build out the VM.

Not sure about you can fill in in "Virtualization > Provisioning" but when you schedule a normal kickstart via the RHN Satellite you can select "Advanced Kickstart Configuration" and there input "Kernel options:" that will end up in /proc/cmdline and can be processed as I described above.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.