2015-08-01 14 views
16

Tôi đang chạy Windows 10, VirtualBox 5 và Vagrant 1.7.4 và cố gắng chạy biểu mẫu openx.Giao diện mạng máy chủ với tên đã cho không thể tìm thấy

Sau khi tôi chạy vagrant up tôi đã nhận:

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 

File Vagrant:

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 

Khi tôi bình luận dòng này, mọi thứ đều suôn sẻ

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

Nhưng tôi connot quyền truy cập vào trang LMS và CMS (Cuz i nhận xét dòng này tất nhiên)

Mọi đề xuất sẽ được đánh giá cao!

+0

Bạn đã kiểm tra xem nó không giống với vấn đề mở này: ... https://github.com/mitchellh/vagrant/issues/4970 – mplf

+0

Yah, tôi đã kiểm tra, nhưng giải pháp được đề xuất không hoạt động (Tôi chỉ có một phiên bản của trình điều khiển Oracle Virtualbox) – Bilal

+0

Một gợi ý ngớ ngẩn nhưng có thể giúp về mặt lý thuyết: thử mở GUI quản lý VirtualBox và kiểm tra xem có bộ điều hợp mạng với tên đó trên máy ảo mà bạn đang cố gắng khởi động hay không. Nếu không, hãy thử đổi tên nó thành bất cứ điều gì mà Vagrant muốn (ví dụ trong trường hợp của bạn "VirtualBox Host-Only Ethernet Adaptor # 25") – J0HN

Trả lời

17

Cuối cùng! tôi đã giải quyết nó! Dưới đây là giải pháp:

1- Tôi chạy VBox-Win10-fix-14040.exeas Admin (Xem this Discussion)

2- Chạy Compatibility VirtualBox.exeas Admin + với Windows 7

3- Và Vagrant up :)

Vậy đó!

+1

Nó đã giúp bạn! Tệp trực tiếp [tải xuống] (https://www.virtualbox.org/attachment/ticket/14040/VBox-Win10-fix-14040.exe) – Aistis

+1

Vẫn gặp vấn đề tương tự, ngay cả sau khi làm theo các bước trên :( – Monk789

+1

Tác vụ này cho tôi chạy trên Windows 7 –

0

cho cửa sổ 7 x86, có thể là hộp ảo của bạn cập nhật lên phiên bản mới nhất. Hãy thử quay trở lại phiên bản 4. có thể chọn phát hành vào tháng 3 hoặc tháng 9 năm 2014

1

Giải pháp đơn giản: Xóa bộ điều hợp Ethernet chỉ được tạo (mặc định) từ VirtualBox Preferences và chạy sh launch.sh (nếu bạn gặp lỗi khi cài đặt Gói Mirantis Openstack).

P.S. Tôi không thấy lý do tại sao nó không nên làm việc cho Vagrant nữa.

Các vấn đề liên quan