takafumi blog

日々の勉強メモ

【Vagrant】【VirtualBox】 それでも起動しないとき

環境  Vagrant 1.8.1 VirtualBox 5.0.12

【VirtualBox】 が起動しない時の対処 - takafumi blog
の続き

VirtualBoxが動いたので、これでvagrant upできると思ったら

==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'paused' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.

VirtualBoxコマンドラインから起動できない?
と思ったが、他のPCでは起動したので、またセキュリティソフト系の問題だと思う。
とりあえず、vagrant upしたときにVirtualBoxGUIも起動するようにする。

Vagrantfileを以下のように変更。

diff -u Vagrantfile.ORI Vagrantfile
--- Vagrantfile.ORI     2016-01-01 08:51:50.786582400 +0000
+++ Vagrantfile 2016-01-02 06:37:37.158967400 +0000
@@ -43,13 +43,13 @@
   # backing providers for Vagrant. These expose provider-specific options.
   # Example for VirtualBox:
   #
-  # config.vm.provider "virtualbox" do |vb|
-  #   # Display the VirtualBox GUI when booting the machine
-  #   vb.gui = true
-  #
+  config.vm.provider "virtualbox" do |vb|
+    # Display the VirtualBox GUI when booting the machine
+    vb.gui = true
+
   #   # Customize the amount of memory on the VM:
   #   vb.memory = "1024"
-  # end
+  end
   #
   # View the documentation for the provider you are using for more
   # information on available options.

これで、vagrant up時にVirtualBoxGUIも起動するようになる。

そして再びvagrant up
よし、起動した。sshでも問題なし。