On Wed, Oct 17, 2012 at 5:02 PM, Matthew Burgess <
matthew.2.burg...@gmail.com> wrote:

> On Wed, Oct 17, 2012 at 3:49 PM, GordonJB <g.bonth...@gmail.com> wrote:
> > So I take it that when the new VM announces itself to the network, it
> will
> > go off to the DHCP server and pick a static IP if there is one defined
> > already for it's MAC address in a config file somewhere?
>
> Yes, that's correct.  You can also set up a generic pool of addresses
> that a VM may get one from if you don't know its MAC address, but then
> you're not guaranteed to get the same IP address every time.
>
> The problem I encountered with VMWare VMs was that the MAC address
> wasn't generated until the VM was first powered on, so configuring
> DHCP ahead of time wasn't possible.  As we didn't have any automated
> provisioning set up, the process was to do an initial boot and
> interrupt the boot process fairly quickly and power the VM off.  Then
> I'd grab the MAC address from VSphere and pop it into the DHCP
> server's config.
>

just FYI - Foreman creates the vm, then fetch the vm new mac, create a dhcp
entry with that mac, and at the end powers on the vm.

Ohad

>
> > Is there a way to have a MAC address/IP pairing generated if one does
> not exist?
>
> I think the approach I'd take with this is to have a fairly small pool
> of addresses used for temporary IPs while a box is being provisioned.
> Once the box is up, you could have another puppet module that would
> figure out, using some other policy (potentially as simple as doing a
> DNS lookup on your VM's hostname), what the IP address of the box
> should be, find the MAC address of the NIC (exposed by facter), then
> put that in to the DHCP server's config.  Automated provisioning
> solutions such as Foreman or Razor
> (http://puppetlabs.com/blog/puppet-razor-module/) may have
> better/other ways of doing it, but that would be my initial approach.
> That Razor page also links to Puppetlabs' own DHCP module
> (https://github.com/puppetlabs/puppetlabs-dhcp), so I'd be prone to
> try that for your DHCP config needs first, before looking at modules
> on the Forge.
>
> Regards,
>
> Matt.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to