I am trying to build a vagrant box from a VirtualBox machine. When I give vagrant up, I get an error saying

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ifup eth1

If I try to run the command manually, I get

/etc/network/interfaces:17: duplicate interface
ifup: couldn't read interfaces file "/etc/network/interfaces"

The network-related part of the vagrantfile is

config.vm.network :hostonly, ""

(if I disable this line and use only a NAT interface, things work, but I would like both a NAT and a host-only network connection)

The contents of /etc/network/interfaces is

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug eth1
iface eth1 inet dhcp
# The contents below are automatically generated by Vagrant. Do not modify.
auto eth1
iface eth1 inet static

I tried commenting out the iface eth1 inet dhcp before packaging the machine, but it didn't have any effect (the line was not commented out on the vagrant box).

  • Created a vagrant bugreport: #1092
    – Tgr
    Aug 29, 2012 at 16:08

1 Answer 1


Take a look at this:


Removing the entries other than eth0 in the /etc/udev/rules.d/70-persistent-net.rules

and removing all but the eth0 ifcfg-eth files in /etc/sysconfig/network/

did the trick for me.

Running virtualbox on ubuntu 12.1, with a suse 11 operating system on the vbox

  • the second place is actually /etc/sysconfig/network-scripts/ Jun 28, 2014 at 4:53

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.