hello, what version of centos is ? can you share the content of
/etc/sysconfig/network /etc/sysconfig/network-scripts/ifcfg-<eth*,e*> thanks On Sun, Jul 31, 2016 at 4:30 AM, Matthew Kettlewell < [email protected]> wrote: > Hello - > > I've been trying to build a custom CentOS packer image for a few weeks, > and can get just about everything to work, except for the initial > /etc/resolv.conf requires a network restart to pickup the DHCP . > > I'm using latest Packer with Virtualbox OVA... uploading to S3, and > importing the ova into and amazon AMI ... when I create the instance, the > networking doesn't work because there are no DNS resolvers set. However, > after restarting networking, my DHCP Option Sets from Amazon are picked up, > and all is good. > > It was my impression that including cloud-init was all that was required, > and that networking should "just work", so clearly I'm doing something > wrong.... not sure if it's the way I'm using packer, or if it's an AWS > config setting ... > > Any assistance on what I'm doing wrong would be greatly appreciated. > > Below is exactly what I see upon starting up a new instance with my AMI > ... > > > [centos@ip-10-0-0-7 ~]$ cat /etc/resolv.conf > > # Generated by NetworkManager > search ec2.internal > > # No nameservers found; try putting DNS servers into your > # ifcfg files in /etc/sysconfig/network-scripts like so: > # > # DNS1=xxx.xxx.xxx.xxx > # DNS2=xxx.xxx.xxx.xxx > # DOMAIN=lab.foo.com bar.foo.com > > [centos@ip-10-0-0-7 ~]$ sudo systemctl restart network > > [centos@ip-10-0-0-7 ~]$ cat /etc/resolv.conf > > ; generated by /usr/sbin/dhclient-script > search ec2.internal > nameserver 8.8.8.8 > nameserver 8.8.4.4 > nameserver 4.2.2.1 > > > > > > Thanks - > > Matt > > > > > > > > > > > -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html. Behavior in > violation of those guidelines may result in your removal from this mailing > list. > > GitHub Issues: https://github.com/mitchellh/packer/issues > IRC: #packer-tool on Freenode > --- > You received this message because you are subscribed to the Google Groups > "Packer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/packer-tool/4ba1dd61-203c-4913-b15e-fd3d28865b9e%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/4ba1dd61-203c-4913-b15e-fd3d28865b9e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Alvaro +31103400555 -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAHqq0exFgFowC%3DhwqEcX8yQVefrh6Fj%2BodexVqFTymLrpk920A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
