Have you considered using dhcp classes to only give out IP's to 'unknown
clients' if those clients are pxebooting/in anaconda ?

eg:
class "pxeclients" {
  match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
  option domain-name-servers 192.168.0.10;
  filename "pxelinux.0";
  default-lease-time 300;
  max-lease-time 300;
}
...
pool {
   allow members of "pxeclients";
   range dynamic-bootp 192.168.2.0 192.168.2.100;
 }


Then use a cobbler_register snippet to add the MAC into cobbler.
We've not gone down this road, but have had a similar internal debate about
the best way to skin this particular cat.

On Wed, Aug 25, 2010 at 6:59 AM, Ian Marlier <imarl...@brightcove.com>wrote:

> On Wed, Aug 25, 2010 at 5:31 AM, Tom Brown <t...@ng23.net> wrote:
>
>> > I'm doing some work to get koan provisioning virtual machines in my
>> > environment at the moment, and am running into some trouble.
>> Specifically,
>> > I can't figure out how to actually give the virtual machine an IP
>> address.
>>
>> Just create a system definition that has an IP address, ie statically
>> configured, then when the VM is provisioned it will be so with the
>> correct IP.
>>
>> Or an i misunderstanding what you are trying to do?
>>
>
> Nope, you've got what I'm trying to do, it's just not quite as simple as
> that because of the way that MAC address assignment is done.
>
> I can create a system object that has an IP address assigned but does not
> have a MAC address assigned.  In this case, the virtualization layer (Xen or
> whatever) will just pick a random MAC and use that.  The virtual machine is
> launched with the appropriate kernel options specifying a kickstart file and
> the like.  However, when the virtual machine comes up, it does not get an IP
> address.  This is because I don't allow open DHCP in my environment.  Since
> cobbler does not know the MAC address of the virtual machine, `cobbler sync`
> does not add the VM to the dhcp configuration, and thus the VM cannot
> retrieve the kickstart profile.  Having the virtualization layer deal with
> MAC address assignment turns out to be very convenient, but because of this
> problem does not fully work in my environment.
>
> Everything does work correctly if I assign a MAC address to the system when
> I create it in cobbler (as suggested by Scot and Jacob).  Which is fine,
> except that it's an extra step, and a pain when bulk provisioning.  I would
> prefer not to have to do anything with the assignment of MACs at all, if
> possible.
>
> It sounds like I'm not missing anything in terms of current capabilities,
> so I've gone ahead and filed an enhancement request with the behavior that I
> would ideally like to see (https://fedorahosted.org/cobbler/ticket/601),
> and I'll look at using Jacob's snippet to generate MACs for the time being.
>
> Thanks, all.
>
> - Ian
>
> _______________________________________________
> cobbler mailing list
> cobbler@lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/cobbler
>
>
_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to