I just "create" one with the following script.

#! /usr/bin/python
# macgen.py script generates a MAC address for KVM guests
#
import random
mac = [ 0x54, 0x52, 0x00,
random.randint(0x00, 0x7f),
random.randint(0x00, 0xff),
random.randint(0x00, 0xff) ]
print ':'.join(map(lambda x: "%02x" % x, mac))

Then when I define my system I put that in the networking section, cobbler
will make sure none of your macs are duplicates.

-Jacob

On Tue, Aug 24, 2010 at 3:58 PM, Ian Marlier <imarl...@brightcove.com>wrote:

> Hi, all --
>
> 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.
>
> I do not allow DHCP except to registered clients -- that is, the DHCP
> config has a 1:1 mapping of MAC addresses to IP addresses, and there are no
> "anonymous" addresses available.  For machines provisioned with cobbler
> directly, this is no problem, since the dhcpd.conf file is regenerated
> (including these mappings) each time I sync.  However, for virtual machines,
> the MAC address is not known until I run koan on the host system, and it
> appears that the MAC address is not updated in cobbler.  As a result, the
> virtual machine boots but fails to get an IP address assigned to it, and
> thus cannot get its kickstart file or build.
>
> Is there a way to either:
> - Tell koan to "push" a static IP address config based on cobbler's
> metadata about the virtual machine; or
> - tell cobbler to take the MAC address that is assigned to the virtual
> machine and sync, in order to create a dhcpd.conf file with the correct
> mapping of MAC to IP address?
>
> I've googled around, and it appears that most people get around this by
> having an open DHCP range.  Are there other approaches that people have
> taken to this that I'm just not seeing?
>
> Any thoughts/pointers are appreciated.
>
> - 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