Skip to content

Instantly share code, notes, and snippets.

@xiris
Last active March 10, 2017 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiris/e713c73ddaa29ec3c6f89d53a8d24db0 to your computer and use it in GitHub Desktop.
Save xiris/e713c73ddaa29ec3c6f89d53a8d24db0 to your computer and use it in GitHub Desktop.
Vagrant shared hosts problem

Fixing the problems with shared hosts

  • Vagrant: 1.9.2
  • Virtualbox: 5.1.2

ON GUEST (vagrant)

Installing basic packages

sudo apt-get install virtualbox-guest-utils virtualbox-guest-x11 virtualbox-guest-dkms

Setup xorg configs (just if needed)

sudo vim /etc/X11/xorg.conf

Download and setup the Guest Additions related to Virtualbox version

sudo wget -c http://download.virtualbox.org/virtualbox/5.1.2/VBoxGuestAdditions_5.1.2.iso
sudo mount VBoxGuestAdditions_5.1.2.iso -o loop /mnt
cd /mnt
sudo sh VBoxLinuxAdditions.run --nox11

On HOST

vagrant plugin install vagrant-vbguest

Easier way :D

open Vagrant file and change the sync type to nfs Eg.:

config.vm.synced_folder ".", "/vagrant", type: "nfs"
#Example xorg.conf from Ubuntu
Section "Device"
Identifier "Configured Video Device"
Driver "vboxvideo"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection
Section "InputDevice"
Identifier "vboxmouse"
Driver "vboxmouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen" 0 0
InputDevice "vboxmouse"
EndSection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment