PyBossa vagrant is not working
<p>We are facing issues while configuring PyBossa on following Cloud server.</p>

<pre><code>DigitalOcean
RAM: 8GB
SSD: 80GB
OS: UBUNTU 16.04.1
Arch: 64
</code></pre>

<p>I am trying to configure it using following commands.</p>

<pre><code>apt-get install virtualbox
apt-get install vagrant
git clone --recursive https://github.com/PyBossa/pybossa.git
cd pybossa
vagrant up
</code></pre>

<p>System stuck at "vagrant up" and trace is as follows.</p>

<pre><code># vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==&gt; default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: &gt;= 0
==&gt; default: Box file was not detected as metadata. Adding it directly...
==&gt; default: Adding box 'ubuntu/trusty64' (v0) for provider: virtualbox
    default: Downloading: https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box
==&gt; default: Successfully added box 'ubuntu/trusty64' (v0) for 'virtualbox'!
==&gt; default: Importing base box 'ubuntu/trusty64'...
==&gt; default: Matching MAC address for NAT networking...
==&gt; default: Setting the name of the VM: pybossa_default_1472726103015_90247
==&gt; default: Clearing any previously set forwarded ports...
==&gt; default: Clearing any previously set network interfaces...
==&gt; default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==&gt; default: Forwarding ports...
    default: 5000 (guest) =&gt; 5000 (host) (adapter 1)
    default: 5001 (guest) =&gt; 5001 (host) (adapter 1)
    default: 22 (guest) =&gt; 2222 (host) (adapter 1)
==&gt; default: Running 'pre-boot' VM customizations...
==&gt; default: Booting VM...
</code></pre>

<p>Tried changing timeout in Vagrant File using </p>

<pre><code>config.vm.boot_timeout = 300
</code></pre>

<p>But still no effect. Can you suggest resolution?</p>

<p>Issue was with Virtualbox version it works with 4.0, 4.1, 4.2, 4.3 only.</p>

<p>Now downgraded OS to Version 14.04 and and Virtual box to 4.3, now it's moving on, and now problem is this trace.</p>

<pre><code>[default] Forwarding ports...
[default] -- 22 =&gt; 2222 (adapter 1)
[default] -- 5000 =&gt; 5000 (adapter 1)
[default] -- 5001 =&gt; 5001 (adapter 1)
[default] Running 'pre-boot' VM customizations...
[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
'gurumeditation' state. Please verify everything is configured
properly and try again.
</code></pre>

<p>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 <code>vagrant up</code> while the
VirtualBox GUI is open.</p>

<p>If you again try this, Vbox is still locked.</p>

<pre><code># vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["modifyvm", "2b7f90da-d5a5-4782-a6a5-4e3e96838ed3", "--natpf1", "delete", "ssh", "--natpf1", "delete", "tcp5000", "--natpf1", "delete", "tcp5001"]

Stderr: VBoxManage: error: The machine 'pybossa_default_1472733433672_71002' is already locked for a session (or being unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LockMachine(a-&gt;session, LockType_Write)" at line 471 of file VBoxManageModifyVM.cpp
</code></pre>

<p>Now if you kill process and command "vagrant up --debug"
then trace ended with vbox mode.</p>

<pre><code>/usr/lib/ruby/vendor_ruby/vagrant/machine.rb:147:in `action'
/usr/lib/ruby/vendor_ruby/vagrant/batch_action.rb:63:in `block (2 levels) in run'
 INFO interface: error: The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'gurumeditation' 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.
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'gurumeditation' 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.
</code></pre>

<p>What could be a solution?</p>

<p>I've just tested a new installation of PYBOSSA with latest version of VirtualBox (v5.1.4) and Vagrant (v1.8.5) and everything has worked as expected. I don't know exactly what could be wrong, but I run vagrant up in my own laptop, not inside a virtual machine (did you use a virtual machine within Digital Ocean?). Thus, my advice will be the following:</p>

<ul>
<li>Install the latest versions of Vagrant and VirtualBox</li>
<li>Re-run vagrant-up and see what happens.</li>
</ul>

<p>Be sure to clean the previous VM, to start from clean fresh install.</p>

python vagrant pybossa