Problem with the resolv.cnf

51 views
Skip to first unread message

Almudena Soblechero Garcia

unread,
Jun 9, 2014, 7:08:09 AM6/9/14
to vagra...@googlegroups.com
Good morning every body!


Im spanish, but i'm goint to tried write in english.


I'm workingwith Vagrant, and, i want to set up a dns server, but, when i restart my vm, the resol.conf  changes, and my DNS configuration, fail....


There any solution, for that problem?



I would like to use vagrant with a DNS server to work properly puppet.


Is this feasible?


rewards

Alvaro Miranda Aguilera

unread,
Jun 9, 2014, 4:45:09 PM6/9/14
to vagra...@googlegroups.com
Hola!

I do speak spanish , so if you think spanish will be quicker easier for you, feel free to send me an email

What I do understand from your mail is, at the first boot after vagrant provision the box, a working resolv.conf is there, and all good.

Then, after the reboot, this resolv.conf change and doesn't work anymore for you.

I don't think is going to be any different from virtualbox to vmware on your desktop, but is hard to know if you are on virtualbox/vmware/aws/openstack/docker/lxc :D

For desktop, like vmware/virtualbox the eth0 is NAT, and will use the networking of your laptop, so if the laptop can reach the servers by name, the vm should.
If the laptop can't then, the vm won't.

Dirt fix will be do something like this:

cp /etc/resolv.conf /etc/resolv.conf.ok

echo 'cat /etc/resolv.conf.ok > /etc/resolv.conf' >> /etc/rc.local

but is a hard ugly hack.

if you share more information, I can try to assist to get a better solution and understand the problem.

Saludos!
Alvaro.


--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Almudena Soblechero Garcia

unread,
Jun 10, 2014, 4:46:10 AM6/10/14
to vagra...@googlegroups.com
Hola Álvaro, buenos días, mi inglés tampoco es muy bueno que digamos, pero vamos a intentarlo ;)

Hello Álvaro, good morning, my english...in't perfect, but lets go to try it!!


Well, i explain my configuration:


I use Vagrant for virtualbox distribution, and im trying to attempt to build a client-server environment, with vagrant and puppet tools, but, for that enviroment booth vm had have dns configuration, with a dns server and dns clients.


to achieve this, its necessary configuration the booth resol.conf files, and that file, with, the vagrant reboot, put me the VAGRANT NAT configuration...
I do not know if I'm explaining it right... I want to have my own resolv.conf configuration, and when i reboot my vagrant vm, my configuration are losed...


Ther's any sugestion? :(

Almudena Soblechero Garcia

unread,
Jun 10, 2014, 4:49:11 AM6/10/14
to vagra...@googlegroups.com
Hola buenos dias Álvaro, muchas gracias por haberme contestado en el google group!!

Estoy intentando hacer una cofngiruación con vagrant, pero me temo, que dicha configuración, no es posible, la quería hacer para presentarla en un proyecto, pero mucho me temo que vagrant, no esta hecho para gestionar arcquitecturas cliente servidor con puppet :(.

Te he contestado en el grupo de google :)


salu2

Almudena.

Alvaro Miranda Aguilera

unread,
Jun 10, 2014, 4:57:20 AM6/10/14
to vagra...@googlegroups.com
I will send you an emai, you send the email to the mailing list :D

Alvaro

Almudena Soblechero Garcia

unread,
Jun 10, 2014, 5:18:50 AM6/10/14
to vagrant-up
Vagrantfile.copia

Alvaro Miranda Aguilera

unread,
Jun 10, 2014, 5:49:04 AM6/10/14
to vagra...@googlegroups.com
Hello there,

We spoke over gtalk, so I am going to summarize here.

the /etc/resolv.conf in your ubuntu box get modified by the OS, and you tried to stop that and didn't work.

That is not a Vagrant or Virtualbox issue, it's a feature in the OS.

I did send to you a Vagrantfile for Oracle linux 6.5, you can change to use centos

I did test it, and it's what I use for my test case, and PEERDNS=no in /etc/sysconfig/network-scripts/ifcfg-eth0 stop that 

So, give it a try, test it.. you will see it works.

You can install the epel rpm in that vm and use puppet for your test.


something like

config.vm.provision :shell, :inline => "yum install -y http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"


Feel free to email me if you have issues (mailme directly if you will write in other language rather than english please :) )

Alvaro.




--
Vagrantfile
Reply all
Reply to author
Forward
0 new messages