The host network interface with the given name could not be found

16

I'm running Windows 10, VirtualBox 5 and Vagrant 1.7.4 and trying to run openedx plateform.

After i run vagrant up i got:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "ipconfig", "VirtualBox Host-Only Ethernet Adapter #25", "--ip", "192.168.33.1", "--netmask", "255.255.255.0"]

Stderr: VBoxManage.exe: error: The host network interface with the given name could not be found
VBoxManage.exe: error: Details: code E_INVALIDARG (0x80070057), component HostWrap, interface IHost, callee IUnknown
VBoxManage.exe: error: Context: "FindHostNetworkInterfaceByName(Bstr(pszName).raw(), hif.asOutParam())" at line 204 of file VBoxManageHostonly.cpp

The Vagrant file:

Vagrant.require_version ">= 1.5.3"

VAGRANTFILE_API_VERSION = "2"

MEMORY = 4096
CPU_COUNT = 2

# map the name of the git branch that we use for a release
# to a name and a file path, which are used for retrieving
# a Vagrant box from the internet.
openedx_releases = {
  "openedx/rc/aspen-2014-09-10" => {
    :name => "aspen-fullstack-rc1", :file => "20141010-aspen-fullstack-rc1.box",
  },
  "aspen.1" => {
    :name => "aspen-fullstack-1", :file => "20141028-aspen-fullstack-1.box",
  },
  "named-release/aspen" => {
    :name => "aspen-fullstack-1", :file => "20141028-aspen-fullstack-1.box",
  },
  "named-release/birch.rc1" => {
    :name => "birch-fullstack-rc1", :file => "20150204-birch-fullstack-rc1.box"
  },
  "named-release/birch.rc2" => {
    :name => "birch-fullstack-rc2", :file => "20150211-birch-fullstack-rc2.box"
  },
  "named-release/birch.rc3" => {
    :name => "birch-fullstack-rc3", :file => "20150213-birch-fullstack-rc3.box"
  },
  "named-release/birch" => {
    :name => "birch-fullstack", :file => "20150224-birch-fullstack.box",
  },
  "named-release/birch.1" => {
    :name => "birch-fullstack-1", :file => "birch-1-fullstack.box",
  },
}
openedx_releases.default = {
  :name => "kifli-fullstack", :file => "20140826-kifli-fullstack.box"
}
openedx_releases_vmware = {
  "named-release/birch" => {
    :name => "birch-fullstack-vmware", :file => "20150610-birch-fullstack-vmware.box",
  },
}
openedx_releases_vmware.default = {
  :name => "kifli-fullstack-vmware", :file => "20140829-kifli-fullstack-vmware.box",
}
rel = ENV['OPENEDX_RELEASE']

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  # Creates an edX fullstack VM from an official release
  config.vm.box     = openedx_releases[rel][:name]
  config.vm.box_url = "http://files.edx.org/vagrant-images/#{openedx_releases[rel][:file]}"

  config.vm.synced_folder  ".", "/vagrant", disabled: true
  config.ssh.insert_key = true

  config.vm.network :private_network, ip: "192.168.33.10"
  config.hostsupdater.aliases = ["preview.localhost"]

  config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--memory", MEMORY.to_s]
    vb.customize ["modifyvm", :id, "--cpus", CPU_COUNT.to_s]

    # Allow DNS to work for Ubuntu 12.10 host
    # http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client
    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
  end

  config.vm.provider :virtualbox do |v, override|
  v.gui=true
  end

  ["vmware_fusion", "vmware_workstation"].each do |vmware_provider|
    config.vm.provider vmware_provider do |v, override|
      override.vm.box     = openedx_releases_vmware[rel][:name]
      override.vm.box_url = "http://files.edx.org/vagrant-images/#{openedx_releases_vmware[rel][:file]}"
      v.vmx["memsize"] = MEMORY.to_s
      v.vmx["numvcpus"] = CPU_COUNT.to_s
    end
  end
end

When i comment this line, everything goes well

config.vm.network :private_network, ip: "192.168.33.10"

But i connot access to te LMS and CMS pages (Cuz i comment this line of course)

Any suggestion will be appreciated !

vagrant
virtualbox
network-interface
openedx
asked on Stack Overflow Aug 1, 2015 by Bilal

4 Answers

17

Finally ! i solved it ! Here is the solution :

1- I run VBox-Win10-fix-14040.exe as Admin (See this Discussion)

2- Run the VirtualBox.exe as Admin + Compatibility with Windows 7

3- And Vagrant up :)

That's it !

answered on Stack Overflow Aug 6, 2015 by Bilal
1

Simple solution: Delete the already created (default) Host only Ethernet Adapter from VirtualBox Preferences and run sh launch.sh (if you received error while installing Mirantis Openstack package).

P.S. I don't see a reason why it shouldn't work for Vagrant as well.

answered on Stack Overflow Feb 22, 2017 by Javed Mulani • edited Feb 22, 2017 by Javed Mulani
0

for windows 7 x86, maybe your virtual box update to latest version. Try to revert back to version 4. can choose release on march or september 2014

answered on Stack Overflow Aug 14, 2015 by Muhamad Syafiee
0

If you are getting error similar to below while trying to setup Mirantis Openstack package on Virtualbox:

VBoxManage.exe: error: The host network interface name 'VirtualBox Host-Only Et' could not be foundVBoxManage.exe: error: The host network interface named 'VirtualBox Host-Only Et' could not be found Open the network.sh script and add | sed 's/\r$//' as follows before | egrep:

local found_iface=(execute VBoxManage list hostonlyifs | sed 's/\r$//'| egrep "Name: + $name\$" | awk '/Name/ { $1 = ""; print substr($0, 2) }')

local new_name=(execute VBoxManage list hostonlyifs | sed 's/\r$//' | egrep -A9 "Name: + $name\$" | awk '/Name/ { $1 = ""; print substr($0, 2) }')

local new_ip=(execute VBoxManage list hostonlyifs | sed 's/\r$//'| egrep -A9 "Name: + $name\$" | awk '/IPAddress:/ { print $2 }')

local new_mask=(execute VBoxManage list hostonlyifs | sed 's/\r$//'| egrep -A9 "Name: + $name\$" | awk '/NetworkMask:/ { print $2 }')

local new_dhcp=(execute VBoxManage list hostonlyifs | sed 's/\r$//'| egrep -A9 "Name: + $name\$" | awk '/DHCP:/ { print $2 }')

local id=execute VBoxManage hostonlyif create | sed 's/\r$//'| sed "s/'/_/g" | cut -d "_" -f2 | sed 's/\r$//'| sed "s/^_//" | sed "s/_$//"

answered on Stack Overflow Aug 8, 2019 by ainaomotayo • edited Aug 9, 2019 by ainaomotayo

User contributions licensed under CC BY-SA 3.0