2016-09-04 8 views
1

今日、私は、最新のUbuntuリリースを、迷惑メールを使って自分のバーチャルボックスに入れようと考えていました。イメージをロードしてvagrant upを実行した後、私は以下のようにエラーを受け取りました。これは仮想ボックスのネットワーク構成に関連しています。Oracle VirtualBox 5.0.16のbento/ubuntu-16.04で不具合が失敗しましたr105871

は興味深いことに、いくつかの記事は、(主にGitHubの、例えば:https://github.com/mitchellh/vagrant/issues/7155上)が、また、AskUbuntu(https://askubuntu.com/questions/760871/network-settings-fail-for-ubuntu-xenial64-vagrant-box)、StackOverflowの(vagrant up command giving error and eth1 not showing a resolvable ip address)とStackExchange(https://unix.stackexchange.com/questions/188413/not-able-to-resolve-ip-address-for-eth1-in-vagrant-vm)にすでにオンラインがあります。しかし、これらの問題は、xenial64(すなわち、ではなく、bento)であるか、またはpublic_network構成を使用します。 https://askubuntu.com/questions/760871/network-settings-fail-for-ubuntu-xenial64-vagrant-boxで報告されているように

は、この問題がubuntu/trusty64又はubuntu/wily64ために存在するが、ubuntu/xenial64及びbento/ubuntu-16.04(すなわち、両方のUbuntu 16ボックス)の両方のための問題であると思いません。

下記のVagrantfileに記載されているように、bento/ubuntu-16.04の簡単な設定があり、private_networkのみを使用しています。明らかにするために、この投稿(vagrant up command giving error and eth1 not showing a resolvable ip address)を使用することはできません。なぜなら、それは迷惑メール設定の一部であるpublic_networkをコメントアウトすることを示唆しているからです。また、このエラーが発生した時点で他のVMは実行されていないことに言及する必要があります。

エラーログから、netowrkインターフェイスeth1に問題があることは明らかですが、正確に何が問題なのかは不明です。私は以前、同じ迷惑メール設定と同じOracle VBを持つhashicorp/precise32ubuntu/trusty64 Ubuntuボックスを正常に起動しましたが、この問題は発生していません。

何か助けていただければ幸いです。技術的なセットアップと参照ファイルは以下の通りです。

乾杯


セットアップAHL:

Vagrantfile:

Vagrant.configure(2) do |config| 

    config.vm.box = "bento/ubuntu-16.04" 

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

end 

出力:

C:\Users\AHL\workspace>vagrant up 
Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Checking if box 'bento/ubuntu-16.04' is up to date... 
==> default: Clearing any previously set forwarded ports... 
==> default: Clearing any previously set network interfaces... 
==> default: Preparing network interfaces based on configuration... 
    default: Adapter 1: nat 
    default: Adapter 2: hostonly 
==> default: Forwarding ports... 
    default: 22 (guest) => 2222 (host) (adapter 1) 
==> default: Booting VM... 
==> default: Waiting for machine to boot. This may take a few minutes... 
    default: SSH address: 127.0.0.1:2222 
    default: SSH username: vagrant 
    default: SSH auth method: private key 
==> default: Machine booted and ready! 
GuestAdditions 5.0.16 running --- OK. 
==> default: Checking for guest additions in VM... 
==> default: Configuring and enabling network interfaces... 
The following SSH command responded with a non-zero exit status. 
Vagrant assumes that this means the command failed! 

/sbin/ifdown eth1 2> /dev/null 

Stdout from the command: 



Stderr from the command: 

mesg: ttyname failed: Inappropriate ioctl for device 

C:\Users\AHL\workspace> 

答えて

2

私はあなたのリストには、あなたがhttps://github.com/mitchellh/vagrant/issues/6871

問題がまだ開いている追加する必要があると思う - 一部のユーザーは誰がありますが問題を解決できると報告しました(https://github.com/mitchellh/vagrant/issues/6871#issuecomment-223290622またはhttps://github.com/mitchellh/vagrant/issues/6871#issuecomment-222348226

パッカーを使って自分で箱を作ることができるのであれば、ネットワーク上の問題のいくつかの修正があります。

6

問題があり、何らかの理由で仮想ボックスが仮想ケーブルをネットワークインターフェイスに接続していないことがわかりました。

私は例えば私の場合、私は1ギガバイトのRAM、USB3と接続されたネットワークケーブルを望んでいた、私のconfig.vm.provider "virtualbox" do |vb|ループに

vb.customize ["modifyvm", :id, "--cableconnected1", "on"] 

を追加することによってそれを解決:

config.vm.provider "virtualbox" do |vb| 
    vb.memory = "1024" 
    vb.customize ["modifyvm", :id, "--usbxhci", "on"]    # Connect USB3 disk 
    vb.customize ["modifyvm", :id, "--cableconnected1", "on"] 
end 

私はこれを必要としませんでした--cableconnected1私が使用した他のボックスの行は、config.vm.box = "bento/ubuntu-16.04"にのみあります。

vagrant upがケーブルに接続していないかどうかを確認する必要があります。また、別のネットワークがあり、eth0が接続されていないため、eth1が配線されています。

特定のケースを確認してください。多分、あなたはオプションの後の数字で遊ぶ必要があります。

希望すると便利です。

+1

ありがとうございました。このフィックスはこの日を保存しました。 '--cableconnected1'行を追加するだけでうまくいった – yvoyer

関連する問題