# Issue with vagrant version following the dev guide

**URL:** https://meta.discourse.org/t/issue-with-vagrant-version-following-the-dev-guide/46760
**Category:** Development
**Created:** [03.Июль.2016 01:58:47 UTC](https://meta.discourse.org/t/issue-with-vagrant-version-following-the-dev-guide/46760 "2016-07-03T01:58:47Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![chagara](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@chagara](https://meta.discourse.org/u/chagara)
#### Post date: [03.Июль.2016 01:58:47 UTC](https://meta.discourse.org/t/issue-with-vagrant-version-following-the-dev-guide/46760/1 "2016-07-03T01:58:47Z")

</div>

helo,

I was following the guide in [https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md](https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md) and I’m running into a couple of issues:

1. Can someone update the vagrant VM listed in the guide above? I install the latest version of visual box and the tools. I get an error that it has a different version of the tools than the host and fails to finish. I can still ssh and update the box but, as a new person exposed to this steps this can be confusing.

2. From my understanding this VM tries to mount the local shared where you git cloned the discourse code and ran ‘vagrant up’ from. This failed still even after updating and restarting the VM. I went to the settings in virtualbox and it looks like the auto-mount is off and mounts to /media instead of /vagrant from what I understood the steps in the guide.

3. The git clone never shows up in /vagrant and I had to do another git clone inside the VM to be able to follow the steps and chown /vagrant to the vagrant user as its owned by root. After that the rest of the steps work 🙂

Please let me know If I made a mistake or took a wrong turn 🙂 I’m loving discourse so far. Also with permission I can update the guide posted above and do a PR request if no problems.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [03.Июль.2016 11:32:47 UTC](https://meta.discourse.org/t/issue-with-vagrant-version-following-the-dev-guide/46760/2 "2016-07-03T11:32:47Z")

</div>

Can you post the logs/output for your attempt?

It seems to work fine for me.

```plaintext
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'discourse-16.04'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: discourse_default_1467544808688_93034
==> 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 => 4000 (adapter 1)
    default: 1080 => 4080 (adapter 1)
    default: 22 => 2222 (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 timeout. Retrying...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if its present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> 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 of
    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 the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default: 
    default: Guest Additions Version: 5.0.18
    default: VirtualBox Version: 4.3
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /vagrant => /home/cpradio/Server/git/discourse

```

---

<div class="post-metadata">

### Author: ![chagara](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@chagara](https://meta.discourse.org/u/chagara)
#### Post date: [03.Июль.2016 12:53:25 UTC](https://meta.discourse.org/t/issue-with-vagrant-version-following-the-dev-guide/46760/3 "2016-07-03T12:53:25Z")

</div>

you have the error in the logs you posted.

default: The guest additions on this VM do not match the installed version of  
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 the  
default: virtual machine match the version of VirtualBox you have installed on  
default: your host and reload your VM.

Then it tries to to update the VM but, fails because its already getting updated on the inside. I go inside the VM and do apt-get upgrade then do a restart. The shared files never mount.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [03.Июль.2016 13:49:06 UTC](https://meta.discourse.org/t/issue-with-vagrant-version-following-the-dev-guide/46760/4 "2016-07-03T13:49:06Z")

</div>

But for me, it all ends successfully, the files mount and I can run Discourse. If it still isn’t mounting after you update the guest additions, you have something else going wrong.

---

<div class="post-metadata">

### Author: ![chagara](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@chagara](https://meta.discourse.org/u/chagara)
#### Post date: [03.Июль.2016 14:29:31 UTC](https://meta.discourse.org/t/issue-with-vagrant-version-following-the-dev-guide/46760/5 "2016-07-03T14:29:31Z")

</div>

Well that’s what I’m trying to figure out. Using ubuntu 16.04 mint latest vagrant and virtualbox

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [03.Июль.2016 14:49:11 UTC](https://meta.discourse.org/t/issue-with-vagrant-version-following-the-dev-guide/46760/6 "2016-07-03T14:49:11Z")

</div>

Hmm… not sure, as this topic isn’t far different to the steps you’ve done.

> [@(Superseded) Set up a development environment using Vagrant on Ubuntud](https://meta.discourse.org/t/howto-set-up-a-development-environment-using-vagrant-ubuntu-guide/45277):
>
> information_source This doc is no longer maintained and using Docker for development is recommended instead of using Vagrant. See: [Install Discourse for development using Docker](https://meta.discourse.org/t/beginners-guide-to-install-discourse-for-development-using-docker/102009) After having setup several systems with a discourse development environment using Vagrant, I thought I would write a quick guide here, which I really should submit as a README. This setup was tested on a virgin installation of 18.04, and uses Eclipse with Aptana Studio 3. Install requirements sudo apt install vag…

---

<div class="post-metadata">

### Author: ![chagara](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@chagara](https://meta.discourse.org/u/chagara)
#### Post date: [03.Июль.2016 14:52:11 UTC](https://meta.discourse.org/t/issue-with-vagrant-version-following-the-dev-guide/46760/7 "2016-07-03T14:52:11Z")

</div>

==\> default: Machine booted and ready!  
[default] GuestAdditions versions on your host (5.0.22) and guest (5.0.18) do not match.  
mesg: ttyname failed: Inappropriate ioctl for device  
rmmod: ERROR: Module vboxguest is in use by: vboxvideo  
mesg: ttyname failed: Inappropriate ioctl for device  
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)  
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?  
mesg: ttyname failed: Inappropriate ioctl for device  
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)  
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?  
mesg: ttyname failed: Inappropriate ioctl for device  
Hit:1 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) xenial InRelease  
Hit:2 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) xenial-updates InRelease  
Hit:3 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) xenial-backports InRelease  
Hit:4 [Index of /ubuntu](http://security.ubuntu.com/ubuntu) xenial-security InRelease  
Hit:5 [Index of /chris-lea/redis-server/ubuntu](http://ppa.launchpad.net/chris-lea/redis-server/ubuntu) xenial InRelease  
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)  
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?  
==\> default: Checking for guest additions in VM…  
The following SSH command responded with a non-zero exit status.  
Vagrant assumes that this means the command failed!

apt-get update

Stdout from the command:

Hit:1 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) xenial InRelease  
Hit:2 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) xenial-updates InRelease  
Hit:3 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) xenial-backports InRelease  
Hit:4 [Index of /ubuntu](http://security.ubuntu.com/ubuntu) xenial-security InRelease  
Hit:5 [Index of /chris-lea/redis-server/ubuntu](http://ppa.launchpad.net/chris-lea/redis-server/ubuntu) xenial InRelease

Stderr from the command:

mesg: ttyname failed: Inappropriate ioctl for device  
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)  
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [03.Июль.2016 15:04:54 UTC](https://meta.discourse.org/t/issue-with-vagrant-version-following-the-dev-guide/46760/8 "2016-07-03T15:04:54Z")

</div>

I was able to set this one up inside a Ubuntu inside VMware player

> [@Install Discourse on Ubuntu or Debian for Development](https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-ubuntu-for-development/14727):
>
> warning This guide covers installation instructions in a development environment. For a production guide see: [Install Discourse in production with the official supported instructions](https://meta.discourse.org/t/how-to-install-discourse-in-production/142537) So you want to set up Discourse on Ubuntu or Debian to hack on and develop with? We’ll assume that you work locally and don’t have Ruby/Rails/Postgres/Redis installed on your Ubuntu or Debian system. Let’s begin! Requirements We suggest having at least 4 GB RAM and 2 CPU cores. Current compatibility: O…

---

<div class="post-metadata">

### Author: ![chagara](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@chagara](https://meta.discourse.org/u/chagara)
#### Post date: [03.Июль.2016 15:40:10 UTC](https://meta.discourse.org/t/issue-with-vagrant-version-following-the-dev-guide/46760/9 "2016-07-03T15:40:10Z")

</div>

I searched around and at first It looked like a vagrant bug but, it turns out is a bug in ubuntu 16.04 that has not been fixed yet. I’m not sure what flavor you guys use for your host but, I’m using ubuntu 16.x and the VM used for discourse is also 16.04  
[https://github.com/mitchellh/vagrant/issues/6871](https://github.com/mitchellh/vagrant/issues/6871)  
[https://github.com/mitchellh/vagrant/issues/7537](https://github.com/mitchellh/vagrant/issues/7537)
