[et-mgmt-tools] cobbler system add
Michael DeHaan
mdehaan at redhat.com
Mon Jul 30 21:02:01 UTC 2007
drew einhorn wrote:
> 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.
This wouldn't be required to pick the MAC and avoid the menu altogether.
All that requires is a cobbler system entry for the new machine
with the right mac addr and profile assignment. This creates an entry
in /tftpboot that the machine would find.
Though maybe I'm misunderstanding the problem...
>
> 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.
Excellent.
>
> There's a new VI Perl SDK Beta. Haven't looked at the .exe
> I downloaded. Haven't found a Linux version.
Hopefully that is just an installer and it's all web services driven.
AFAIK, VMware is supposed
to have a WSDL interface. SOAP isn't as clean (or simple) as XMLRPC,
but it'll work better
than nothing :)
>
> 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 at redhat.com
> <mailto:mdehaan at redhat.com>> 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 <http://192.168.1.50> --hostname="
> foo.example.com <http://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 at redhat.com <mailto:et-mgmt-tools at redhat.com>
> > https://www.redhat.com/mailman/listinfo/et-mgmt-tools
> <https://www.redhat.com/mailman/listinfo/et-mgmt-tools>
>
> _______________________________________________
> et-mgmt-tools mailing list
> et-mgmt-tools at redhat.com <mailto:et-mgmt-tools at redhat.com>
> https://www.redhat.com/mailman/listinfo/et-mgmt-tools
>
>
>
>
> --
> Drew Einhorn
> ------------------------------------------------------------------------
>
> _______________________________________________
> et-mgmt-tools mailing list
> et-mgmt-tools at redhat.com
> https://www.redhat.com/mailman/listinfo/et-mgmt-tools
More information about the et-mgmt-tools
mailing list