Strange - with v. 2.2.3, my host directory is not mounted on /vagrant. I am dead in the water -- please help!

31 views
Skip to first unread message

Bill Torcaso

unread,
Feb 1, 2019, 10:28:09 AM2/1/19
to Vagrant

Hello all,

I just downloaded Vagrant version 2.2.3, and installed it with no trouble.

Then I run 'vagrant up' and 'vagrant ssh'.  I connect with no trouble.

I am in the '/vagrant' directory.  I run 'ls' ...

Expected behavior:  I will see ALL OF THE FILES that are in the same HOST directory as my Vagrantfile.

Actual behavior: I see NONE OF THE FILES from my host directory

Debug actions:

  1. Read the Release Notes.  I don't see anything about required changes to my Vagrantfile (shown below)

  2. Run 'mount'.  I see a boatload of stuff, but nothing I can identify as relevant.

  3. Run 'ls /'.  Nope, my files are not there.
Speculation: the problem is in my Vagrantfile

Here is my Vagrantfile with line numbers.  It has not changed.


1 # -*- mode: ruby -*-

2 # vi: set ft=ruby :

3 Vagrant.configure(2) do |config|
 
 
4 config.vm.box = "torchbox/wagtail-stretch64"

5 config.vm.box_version = "~> 1.0"

6

7 config.vm.network "forwarded_port", guest: 8000, host: 8000, auto_configure: true

8

9 config.vm.provision :shell, :path => "vagrant/provision.sh", :args => "ousweb"

10

11 config.ssh.forward_agent = true
12 end


Here is the output of some 'ls' commands.


[ousweb vagrant]$ pwd

/vagrant

[ousweb vagrant]$ ls

[ousweb vagrant]$ # I expect all the files from my HOST directory

[ousweb vagrant]$ ls -a ~

. .aws .bash_logout .cache .lesshst .ssh .viminfo .virtualenvs

.. .bash_history .bashrc .gitconfig .profile .vim .vimrc

[ousweb vagrant]$ ls /

bin dev home initrd.img.old lib64 media opt root sbin sys usr var vmlinuz.old

boot etc initrd.img lib lost+found mnt proc run srv tmp vagrant vmlinuz
[ousweb vagrant]$


Here is the output of 'mount'.


[ousweb vagrant]$ mount

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)

udev on /dev type devtmpfs (rw,nosuid,relatime,size=240932k,nr_inodes=60233,mode=755)

devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)

tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=50416k,mode=755)

/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)

securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)

tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)

tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)

tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)

cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)

pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)

cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)

cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)

cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)

cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)

cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)

cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)

cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)

cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)

cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)

systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=27,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=9540)

mqueue on /dev/mqueue type mqueue (rw,relatime)

debugfs on /sys/kernel/debug type debugfs (rw,relatime)

hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)

tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=50412k,mode=700,uid=1000,gid=1000)
[ousweb vagrant]$
 
 
 
 

Daniel Gil Jara

unread,
Feb 1, 2019, 10:34:59 AM2/1/19
to Vagrant
Hello, I've had the same issue some time ago. Debugging I've found that this was because vbguest additions were different from the actual VirtualBox expected guest additions. I force this to update always with the plugin vagrant-vbguest and the following two lines in the Vagrantfile configuration:

  config.vbguest.auto_update = true
  config.vbguest.no_remote = true

With above it worked always and didn't give this error never again.

Regards

Daniel Gil Jara

unread,
Feb 1, 2019, 10:42:02 AM2/1/19
to Vagrant
Also, I have the following lines at the first of Vagrantfile to ensure that the plugin is installed if previously don't:

# Install vagrant-hostmanager vagrant-vbguest
required_plugins = %w( vagrant-hostmanager vagrant-vbguest )
required_plugins.each do |plugin|
  system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
end

(modify as you need)

Regards

El viernes, 1 de febrero de 2019, 16:28:09 (UTC+1), Bill Torcaso escribió:

Bill Torcaso

unread,
Feb 1, 2019, 10:44:03 AM2/1/19
to vagra...@googlegroups.com

This solved the problem.  Many thanks!

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/S25pKhP_UmQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/2cf1c36a-e455-4442-a221-49329ad62cff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages