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?

  • Consider running your VirtualBox VMs in bridged mode instead of NAT mode. Nov 7, 2012 at 1:34
  • Even though you have private/public network configured Chef provisioner still uses as node['ipaddress'] Apr 25, 2013 at 8:05
  • maybe this is the ticket on the opscode site?
    – cwd
    Aug 13, 2014 at 1:14

2 Answers 2


This cookbook might help you, it changes the ipaddress node attribute to use the ip address associated to the eth1 interface: https://github.com/tknerr/cookbooks-vagrant-ohai


Here is a complete Vagrant Plugin that installs an ohai plugin that does something similar https://github.com/avishai-ish-shalom/vagrant-ohai

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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