Opened 7 years ago
Last modified 7 years ago
#17639 new defect
synced folder not working (Ubuntu 16.04 hosting debian/stretch64 9.4.0 )
Reported by: | axd | Owned by: | |
---|---|---|---|
Component: | guest additions | Version: | VirtualBox 5.2.8 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | Linux |
Description
When setting up a VM via Vagrant 2.0.1 using VirtualBox 5.2.8 and guest additions 5.2.8, touching a file in the default synced folder /vagrant does not make that file appear on the host side.
a similar test works fine for a guest of type "ubuntu/xenial64 v20180215.0.0".
how to reproduce: create following Vagrantfile (also attached):
Vagrant.configure("2") do |config| config.vm.box = "debian/stretch64" # or generic/debian9 config.vm.box_version = "9.4.0" config.ssh.insert_key = false config.vm.network "private_network", ip: "192.168.33.10" end
and the run following script from the hos:
#!/usr/bin/env bash # to run from tools/vagrant/ set -x set -e set -u GUEST=${1:-"default"} #$1 # name from `vagrant status` export VERSION=5.2.8 # must be equal to the VirtualBox version! export URL="http://download.virtualbox.org/virtualbox/"$VERSION"/VBoxGuestAdditions_"$VERSION".iso" time vagrant ssh $GUEST << HERE set -e set -x sudo bash apt-get update apt-get install -y dkms build-essential apt-get install -y linux-headers-amd64 linux-headers-4.9.0-4-amd64 apt-get install -y module-assistant cd /opt/ wget -c $URL -O vb.iso mount vb.iso -o loop /mnt cd /mnt/ sh ./VBoxLinuxAdditions.run --nox11 cd /opt sudo rm *.iso lsmod | grep vboxguest || echo "*** something went wrong while attempting to install the guest additions" HERE
touch a file in /vagrant
observe that the file does not appear in the host location.
Attachments (2)
Change History (4)
by , 7 years ago
Attachment: | Vagrantfile added |
---|
by , 7 years ago
Attachment: | install_guest_additions.sh added |
---|
comment:2 by , 7 years ago
related: when attempting to build a VM that included extra synced directories (defined in Vagrantfile), I get:
Vagrant was unable to mount VirtualBox shared folders. This is usually because the filesystem "vboxsf" is not available. This filesystem is made available via the VirtualBox Guest Additions and kernel module. Please verify that these guest additions are properly installed in the guest. This is not a bug in Vagrant and is usually caused by a faulty Vagrant box. For context, the command attempted was: mount -t vboxsf -o uid=1000,gid=1000 home_vagrant_lynx /home/vagrant/lynx The error output from the command was: mount: unknown filesystem type 'vboxsf'
this is due to Guest Additions not having been added.
the workaround seems to be to
- disable the extra synced folders (in Vagrantfile)
- apply the guest additions
- re-enable the extra synced folders
problematic when running with the latest "debian/stretch64" and with or without specifying "box_version = "9.4.0""; logging in on such boxes gives
but we made an earlier custom box that was based on a (then latest) "debian/stretch64" (without specifying a version) but where syncing works; that box reports
it looks like 4.9.82-1+deb9u3 is the culprit?
trying 9.3.0 or 9.2.0 (from https://app.vagrantup.com/debian/boxes/stretch64) does not solve the problem either
this is smelling like an issue with guest additions 5.2.8? I didn't attempt to install those versions, sorry...