前提・実現したいこと
vagrantでvirtualboxの仮想サーバーを構築したい
発生している問題・エラーメッセージ
初回はvagrant up
で仮想サーバーを構築し
vagrant ssh
で仮想サーバーに接続できるが
vagrant reload
すると仮想サーバーに接続できなくなる
vagrant status
で確認すると仮想サーバーは既に起動している
❯ vagrant reload ==> default: [vagrant-hostsupdater] Removing hosts ==> default: Attempting graceful shutdown of VM... default: Guest communication could not be established! This is usually because default: SSH is not running, the authentication information was changed, default: or some other networking issue. Vagrant will force halt, if default: capable. ==> default: Forcing shutdown of VM... ==> default: Checking if box 'ubuntu/trusty64' version '20190514.0.0' 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: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> 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 reset. Retrying...
❯ vagrant status Current machine states: default running (virtualbox) The VM is running. To stop this VM, you can run `vagrant halt` to shut it down forcefully, or you can run `vagrant suspend` to simply suspend the virtual machine. In either case, to restart it again, simply run `vagrant up`.
該当のソースコード
Vagrantfileです
Vagrant.configure("2") do |config| config.vm.box = "ubuntu/trusty64" config.vm.provider "virtualbox" do |vb| vb.customize ["modifyvm", :id, "--cableconnected1", "on"] end end
試したこと
vagrant up --provision
で実行するvagrant plugin update
プラグインのアップデートをする
補足情報(FW/ツールのバージョンなど)
vagrant 2.2.10
virtualbox 6.1.14
macOS catalina 10.15.6
あなたの回答
tips
プレビュー