Windows7にVagrant(1.7.4)+virtualbox(5.0.6)を入れ、そこにCentOS6.5をインストールして
使っているのですがvagrant upをするさいに、Vagrantfileで指定した固定ipアドレス(config.vm.network "private_network", ip: "192.168.99.10"
)で接続できません。
vagrant up
やvagrant reload
するたびに、プログラムの変更許可を聞かれ、「はい」を押すとホストオンリーアダプタがサフィックス付きで生成されてそのipも全部違います。「いいえ」を押すとエラーで起動できません。localhost:3000だと普通にアクセスできます。
画面はこんな感じです
①vagrant up
コマンド入力時
②virtualboxのホストオンリーアダプタ
ちなみにvagrant up
したときのメッセージはこちらです
vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> 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: 3000 => 3000 (adapter 1) default: 22 => 2222 (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: Warning: Connection timeout. Retrying... default: Warning: Remote connection disconnect. Retrying... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... default: The guest additions on this VM do not match the installed version o f default: VirtualBox! In most cases this is fine, but in rare cases it can default: prevent things such as shared folders from working properly. If you see default: shared folder errors, please make sure the guest additions within t he default: virtual machine match the version of VirtualBox you have installed on default: your host and reload your VM. default: default: Guest Additions Version: 4.2.12 default: VirtualBox Version: 5.0 ==> default: Configuring and enabling network interfaces... ==> default: Mounting shared folders... default: /vagrant => C:/work/CentOS6.5 ==> default: Machine already provisioned. Run `vagrant provision` or use the `-- provision` ==> default: flag to force provisioning. Provisioners marked to run always will still run.
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。