Re: cobbler system add

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm using cobbler on a VMware ESX server.

For now, I'm creating VMs by hand using the vmware gui client.

When I power them up they PXE boot, I type menu and choose a profile.
Was hoping I could nail down the ip to the mac in %post

I have been reluctant to manually dig into PM to find mac
address and manually make a dhcp reservation.

I'm looking into the VMperl API.  VMware is calling it a legacy API.
Don't know how much longer they will support it.

I think it won't be too difficult to use VMperl to create scripts to
make an appropriate dhcp reservations, or create a VM to order.
Will let you know when I have something more concrete than plans.

There's a new VI Perl SDK Beta.  Haven't looked at the .exe
I downloaded.  Haven't found a Linux version.

Have a vague recollection of a version issue with dnsmasq
on my platform, CentOS5, but that could be my imagination,
need to look at this again.

Drew

On 7/30/07, Michael DeHaan <mdehaan@xxxxxxxxxx> wrote:
drew einhorn wrote:
> Near the end of %post I issued a cobbler system add command
> to bind the dynamically assigned ip to the mac address.

DHCP reservations work exceedingly well.   If you have manage_dhcp
turned on in your /var/lib/cobbler/settings it will write your dhcp.conf
for you.
dnsmasq works even better as you can also pin the hostname from cobbler
(dnsmasq does both DHCP and DNS, and cobbler can auto-configure it).

Example:

vi /var/lib/cobbler/settings
manage_dhcp : 1
manage_dhcp_mode : dnsmasq

# cobbler system add --name=foo --mac=AA:BB:CC:DD:EE:FF
--ip=192.168.1.50 --hostname=" foo.example.com"

This will ensure that when MAC address AA:BB:CC:DD:EE:FF boots it will
automatically get the designed IP and (if using dnsmasq) the given hostname.

if you leave manage_dhcp mode to "isc" (the default), you still get the
variable $hostname accessible in your kickstart templates, so you can
still set hostname/etc, but you will
have other hoops to jump through to make it actually use it.   Which is
what I think you are alluding to below:




>
> After trying it and seeing that it was not working, I said:
>
> Duhhhh!!!!
>
> It needs to run on the cobbler host, not the box being provisioned.
>
> Is there an easy way to do this?
> I can think of some that are not easy.

Possibly including...

(A) just-once-single-command-authorized-root-ssh (kind of scary)
(B) CGI script (still scary)

???

Both of which pose interesting security issues.   DHCP reservations are
the way to go, IMHO, because they can be done entirely server side --
but I'm not a network administrator and you might have valid reasons for
not doing things that way.

>
> --
> Drew Einhorn
> ------------------------------------------------------------------------
>
> _______________________________________________
> et-mgmt-tools mailing list
> et-mgmt-tools@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/et-mgmt-tools

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools



--
Drew Einhorn 
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux