Не удалось создать адаптер только для хоста - PullRequest
0 голосов
/ 12 ноября 2018

У меня проблема с vagrant up в моей системе. У меня есть ошибка, вы можете увидеть ниже. Я попытался переустановить VBox, Vagrant, выключил брандмауэр, проверил сетевой драйвер VBox и перезапустил хост-систему, но он не работает.

Спасибо всем за помощь.

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: E_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: SetupDiCallClassInstaller (DIF_INSTALLDEVICE) failed 
(0x00000002)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component 
HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdeclhandleCreate(struct 
HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp

Версия VBox 5.2.22

Бродячая версия 2.2.0

Операционная система хоста Win7 x64

Гостевая операционная система Ubuntu-16.04.5-рабочий стол-amd64

Vagrantfile

dir = File.dirname(File.expand_path(__FILE__))

require 'yaml'
require "#{dir}/puphpet/ruby/deep_merge.rb"
require "#{dir}/puphpet/ruby/to_bool.rb"

configValues = YAML.load_file("#{dir}/puphpet/config.yaml")

provider = ENV['VAGRANT_DEFAULT_PROVIDER'] ? ENV['VAGRANT_DEFAULT_PROVIDER'] : 'local'
if File.file?("#{dir}/puphpet/config-#{provider}.yaml")
  custom = YAML.load_file("#{dir}/puphpet/config-#{provider}.yaml")
  configValues.deep_merge!(custom)
end

if File.file?("#{dir}/puphpet/config-custom.yaml")
  custom = YAML.load_file("#{dir}/puphpet/config-custom.yaml")
  configValues.deep_merge!(custom)
end

data = configValues['vagrantfile']

Vagrant.require_version '>= 1.8.1'

Vagrant.configure('2') do |config|
  eval File.read("#{dir}/puphpet/vagrant/Vagrantfile-#{data['target']}")
end

Ответы [ 3 ]

0 голосов
/ 14 ноября 2018

Я сделал vagrant up на моем хосте!

После многих попыток я переустановил Windows. Необходимый драйвер хоста виртуальной машины (VirtualBox Host-Only Ethernet Adapter в сети Windows) устанавливался только на «чистую» систему, что очень любопытно для меня.

Vagrant также требуется версия Windows PowerShell старше 3, но Win7 по умолчанию использует 2. Вам необходимо обновить Windows Net Framework для установки 3 и более старой версии на Win7.

Удачи!

0 голосов
/ 14 января 2019

Последние 2 дня я сводил с ума с этой проблемой. Наконец-то нашел решение.

1. Антивирус вызывал проблему

2.Вы должны отключить антивирусные службы в своей системе Windows (вам понадобится доступ администратора или сделать это у ИТ-специалиста вашей компании)

3. Переустановите панель инструментов Docker и запустите ее (режим администратора) Это работает

0 голосов
/ 12 ноября 2018

Проверьте эту ссылку:

Не удалось открыть / создать внутреннюю сеть Vagrant в Windows10

Если это не сработает, тогда комментарий 20 к этому И это предлагает https://www.virtualbox.org/ticket/14545#comment:20

Выполнение следующих действий:

I was able to work around this problem for me with the following steps:
Open the VirtualBox Manager GUI.
Go to File -> Preferences -> Network -> Host-only Networks
Delete all entries in that list
Run vagrant up again
...