UPDATE (5 Feb, 2014) : This error comes up when machine is restarted without proper shutdown
I am trying to install EdX's open source Learning Management System, through their development vagrant box on a remote machine. However, I get an error related to virtual machine GUI. Is there anything that can be done via CLI/ssh ? This is the exact error.
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' 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.
Below are the contents of VagrantFile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.network :forwarded_port, guest: 8000, host: 9000
config.vm.network :forwarded_port, guest: 8001, host: 9001
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network :private_network, ip: "192.168.20.40"
nfs_setting = RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/
config.vm.synced_folder ".", "/opt/edx/edx-platform", id: "vagrant-root", :nfs => nfs_setting
# Make it so that network access from the vagrant guest is able to
# use SSH private keys that are present on the host without copying
# them into the VM.
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |vb|
# Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "2048"]
# This setting makes it so that network access from inside the vagrant guest
# is able to resolve DNS using the hosts VPN connection.
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
config.vm.provision :shell, :path => "scripts/install-acceptance-req.sh"
config.vm.provision :shell, :path => "scripts/vagrant-provisioning.sh"
end
No, there's not much you can do/diagnose using CLI or Ssh at this stage, because the VM fails to initialize properly and is not in a "working" state.
You should follow the advice contained in the error message.
Destroy your current VM:
then open VirtualBox GUI, and restart the Vagrant setup with :
You can then watch in the VM Console/Window (from Virtualbox GUI) what fails and prevents the setup from running.
An alternative way to start the VM with a console GUI would be to modify your
Vagrantfile
:(destroy your existing and failing VM with
vagrant destroy
and then runvagrant up
)If the remote machine (where VirtualBox runs) is a Unix box accessed using SSH, you may be able to export the GUI to your local machine using the
-X
option when SSHing to it. See this answer for more details aboutssh -X