Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using a bridged network on a vagrant VM with chef-client. knife node show test1-vagrant shows an ip address of, which is eth0. eth1 is, which is what DHCP gave it. How can i get chef thinking the ip address is instead, so that I can knife ssh -a ipaddress?

share|improve this question
Consider running your VirtualBox VMs in bridged mode instead of NAT mode. – Michael Hampton Nov 7 '12 at 1:34
Even though you have private/public network configured Chef provisioner still uses as node['ipaddress'] – Maxim Vladimirsky Apr 25 '13 at 8:05
maybe this is the ticket on the opscode site? – cwd Aug 13 '14 at 1:14

This cookbook might help you, it changes the ipaddress node attribute to use the ip address associated to the eth1 interface:

share|improve this answer

Here is a complete Vagrant Plugin that installs an ohai plugin that does something similar

Only problem is right now it seems to only install it if you are using the :chef_solo or :chef_server provisioner.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.