I'm using cobbler on a VMware ESX server.<br>
<br>
For now, I'm creating VMs by hand using the vmware gui client.<br>
<br>
When I power them up they PXE boot, I type menu and choose a profile.<br>
Was hoping I could nail down the ip to the mac in %post<br>
<br>
I have been reluctant to manually dig into PM to find mac<br>
address and manually make a dhcp reservation.<br>
<br>
I'm looking into the VMperl API.  VMware is calling it a legacy API.<br>
Don't know how much longer they will support it.<br>
<br>
I think it won't be too difficult to use VMperl to create scripts to <br>
make an appropriate dhcp reservations, or create a VM to order.<br>
Will let you know when I have something more concrete than plans.<br>
<br>
There's a new VI Perl SDK Beta.  Haven't looked at the .exe<br>
I downloaded.  Haven't found a Linux version.<br><br>
Have a vague recollection of a version issue with dnsmasq<br>
on my platform, CentOS5, but that could be my imagination, <br>
need to look at this again.<br>
<br>
Drew<br>
<br><div><span class="gmail_quote">On 7/30/07, <b class="gmail_sendername">Michael DeHaan</b> <<a href="mailto:mdehaan@redhat.com">mdehaan@redhat.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
drew einhorn wrote:<br>> Near the end of %post I issued a cobbler system add command<br>> to bind the dynamically assigned ip to the mac address.<br><br>DHCP reservations work exceedingly well.   If you have manage_dhcp
<br>turned on in your /var/lib/cobbler/settings it will write your dhcp.conf<br>for you.<br>dnsmasq works even better as you can also pin the hostname from cobbler<br>(dnsmasq does both DHCP and DNS, and cobbler can auto-configure it).
<br><br>Example:<br><br>vi /var/lib/cobbler/settings<br>manage_dhcp : 1<br>manage_dhcp_mode : dnsmasq<br><br># cobbler system add --name=foo --mac=AA:BB:CC:DD:EE:FF<br>--ip=<a href="http://192.168.1.50">192.168.1.50</a> --hostname="
<a href="http://foo.example.com">foo.example.com</a>"<br><br>This will ensure that when MAC address AA:BB:CC:DD:EE:FF boots it will<br>automatically get the designed IP and (if using dnsmasq) the given hostname.<br><br>
if you leave manage_dhcp mode to "isc" (the default), you still get the<br>variable $hostname accessible in your kickstart templates, so you can<br>still set hostname/etc, but you will<br>have other hoops to jump through to make it actually use it.   Which is
<br>what I think you are alluding to below:<br><br><br><br><br>><br>> After trying it and seeing that it was not working, I said:<br>><br>> Duhhhh!!!!<br>><br>> It needs to run on the cobbler host, not the box being provisioned.
<br>><br>> Is there an easy way to do this?<br>> I can think of some that are not easy.<br><br>Possibly including...<br><br>(A) just-once-single-command-authorized-root-ssh (kind of scary)<br>(B) CGI script (still scary)
<br><br>???<br><br>Both of which pose interesting security issues.   DHCP reservations are<br>the way to go, IMHO, because they can be done entirely server side --<br>but I'm not a network administrator and you might have valid reasons for
<br>not doing things that way.<br><br>><br>> --<br>> Drew Einhorn<br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>
> et-mgmt-tools mailing list<br>> <a href="mailto:et-mgmt-tools@redhat.com">et-mgmt-tools@redhat.com</a><br>> <a href="https://www.redhat.com/mailman/listinfo/et-mgmt-tools">https://www.redhat.com/mailman/listinfo/et-mgmt-tools
</a><br><br>_______________________________________________<br>et-mgmt-tools mailing list<br><a href="mailto:et-mgmt-tools@redhat.com">et-mgmt-tools@redhat.com</a><br><a href="https://www.redhat.com/mailman/listinfo/et-mgmt-tools">
https://www.redhat.com/mailman/listinfo/et-mgmt-tools</a><br></blockquote></div><br><br clear="all"><br>-- <br>Drew Einhorn