The code appears to be fine. The issue is with VMware it doesn't like
me replacing the network config files but if I manually edit them it
seems to be fine. Is it possible to have puppet just edit the contents
of files instead of completely replacing them? Does anyone else have
problems with file replacement messing with things?

On Dec 22 2011, 3:21 pm, Luke <lutay...@gmail.com> wrote:
> I mean does the code look ok?
>
> Are we thinking that it is a prob with the vm config on the esx side?
>
> On Dec 21, 4:30 pm, Luke <lutay...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > The macaddress in the vm is set to automatic but the populated value
> > matches exactly the value that I put into the file, that is where I
> > got it from (in fact I checked the ifconfig-eth0 before creating the
> > file and it had the same values that I specified).
>
> > On Dec 21, 12:03 pm, Charles Buckley <rijrun...@gmail.com> wrote:
>
> > > Hello,
>
> > >   That is not quite what I am asking. Your VM configures a set of
> > > parameters for the
> > > system to use when you build out the VM environment. One of those values 
> > > is
> > > that
> > > macaddr of the server. (Not just the driver).
>
> > >   These settings look to all be on the VM guest. The host table.
> > > resolv.conf.
>
> > >   What I am trying to determine is why you are feeding it a macaddr, at
> > > all. If you
> > > were creating the VM guest, I could see feeding it a macaddr. But, here 
> > > you
> > > are trying
> > > to change the macaddr of an existing guest. (basically, if you bring up 
> > > the
> > > VM
> > > network properties, you will likely find that the macaddr below is
> > > different than the
> > > one the VM host has in the guest properties.)
>
> > >   Where did you acquire the macaddr below to use for this?
>
> > > Charles Buckley
>
> > > On Wed, Dec 21, 2011 at 8:05 AM, Luke <lutay...@gmail.com> wrote:
> > > > Hello Thank you for your reply.
>
> > > > I don't seem to have a 70-persistent-net.rules. I have a 60-net.rules
> > > > with
>
> > > > ACTION=="add", SUBSYSTEM=="net", IMPORT{program}="/lib/udev/
> > > > rename_device"
> > > > SUBSYSTEM=="net", RUN+="/etc/sysconfig/network-scripts/net.hotplug"
>
> > > > What do you mean by VM definition. I made sure that it was in the
> > > > right vlan etc. One thing that I noticed is that the puppet learning
> > > > VM is set to flexible while the rest of them are set to E1000.
>
> > > > On Dec 20, 4:46 pm, Charles Buckley <rijrun...@gmail.com> wrote:
> > > > > Hello,
>
> > > > >   What are the VM's definitions of its network interfaces?
>
> > > > >   Also, if you are trying Linux, what are the contents of
> > > > > /etc/udev/rules.d/70-persistent-net.rules ?
>
> > > > > Charles Buckley
>
> > > > > On Tue, Dec 20, 2011 at 1:41 PM, Luke <lutay...@gmail.com> wrote:
> > > > > > Hello,
>
> > > > > > I created a module for modifying the base network settings on a
> > > > > > machine. However no matter what changes I make it keeps giving me 
> > > > > > the
> > > > > > error "has differentMACaddressthan expected, ignoring" when the
> > > > > > network tries to startup.
>
> > > > > > I am testing this out on the puppet learning VM.
>
> > > > > > Does anyone see anything wrong with my code:
>
> > > > > > init.pp
>
> > > > > > --------------------------
>
> > > > > > define basehost ($ipaddress, $gateway, $hostname, $environ,
> > > > > > $macaddress) {
>
> > > > > >   file { 'hosts':
> > > > > >        path    => '/etc/hosts',
> > > > > >        ensure  => 'present',
> > > > > >        owner => 'root',
> > > > > >        group => 'root',
> > > > > >        mode => '644',
> > > > > >        content => template("basehost/hosts.erb"),
> > > > > >        notify => Service[network],
>
> > > > > >      }
>
> > > > > >   file { 'resolv.conf':
> > > > > >        path    => '/etc/resolv.conf',
> > > > > >        ensure  => 'present',
> > > > > >        owner => 'root',
> > > > > >        group => 'root',
> > > > > >        mode => '644',
> > > > > >        content => template("basehost/resolv.conf.erb"),
> > > > > >        notify => Service[network],
>
> > > > > >      }
>
> > > > > >   file { 'network':
> > > > > >        path    => '/etc/sysconfig/network',
> > > > > >        ensure  => 'present',
> > > > > >        owner => 'root',
> > > > > >        group => 'root',
> > > > > >        mode => '644',
> > > > > >        content => template("basehost/network.erb"),
> > > > > >        notify => Service[network],
>
> > > > > >      }
>
> > > > > >   file { 'ifcfg-eth0':
> > > > > >        path    => '/etc/sysconfig/network-scripts/ifcfg-eth0',
> > > > > >        ensure  => 'present',
> > > > > >        owner => 'root',
> > > > > >        group => 'root',
> > > > > >        mode => '644',
> > > > > >        content => template("basehost/ifcfg-eth0.erb"),
> > > > > >        notify => Service[network],
>
> > > > > >      }
>
> > > > > >    service { network:
> > > > > >         ensure => "running",
> > > > > >         hasstatus => "true",
> > > > > >         hasrestart => "true",
> > > > > >         restart => "/etc/init.d/network restart",
> > > > > >      }
>
> > > > > >    }
>
> > > > > > hosts.erb
> > > > > > ----------------------------
>
> > > > > > # Do not remove the following line, or various programs
> > > > > > # that require network functionality will fail.
> > > > > > 127.0.0.1               localhost.localdomain localhost
> > > > > > <%= ipaddress %>  <%= hostname %> <%= hostname %>.<%= environ
> > > > > > %>.mydomain.local manage.<%= environ %>.mydomain.net
> > > > > > ::1             localhost6.localdomain6 localhost6
>
> > > > > > resolve.conf.erb
> > > > > > ----------------
>
> > > > > > search <%= environ %>.mydomain.local
> > > > > > nameserver 10.180.0.2
> > > > > > nameserver 10.180.0.4
>
> > > > > > network.erb
>
> > > > > > ------------------
>
> > > > > > NETWORKING=yes
> > > > > > NETWORKING_IPV6=no
> > > > > > HOSTNAME=<%= hostname %>.<%= environ %>.mydomain.local
> > > > > > GATEWAY=<%= gateway %>
>
> > > > > > ifcfg-eth0.erb
>
> > > > > > ----------------
>
> > > > > > # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
> > > > > > DEVICE=eth0
> > > > > > BOOTPROTO=static
> > > > > > IPADDR=<%= ipaddress %>
> > > > > > NETMASK=255.255.255.0
> > > > > > ONBOOT=yes
> > > > > > HWADDR=<%= macaddress %>
>
> > > > > > Gets kicked off using:
>
> > > > > > basehost {'basehostsetup':
> > > > > >  ipaddress => '10.148.0.32',
> > > > > >  gateway => '10.148.0.1',
> > > > > >  hostname => 'myhostname',
> > > > > >  environ => 'test',
> > > > > >  macaddress => '00:50:56:ac:40:8a',
> > > > > >  }
>
> > > > > > --
> > > > > > 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.

-- 
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