Guest Addons too old to make work the "share folders" function

If the VM mongod-m103 is used under a very new version of virtualbox (in my case v6.0.10), the “shared folders” in the VM function can fail.
To solve it we need to update the VirtualBox Guest Addons on the virtual machine. I’m unable to do it automatically, so I used a manual method:

  1. Stop the virtual machine to add a CD-ROM and then mount the .ISO of the guest addons (in my case the VBoxGuestAdditions_6.0.10.iso).

    $ vagrant halt

  2. Open the virtualbox X front-end

    $ virtualbox &

  3. Edit the “mongod-m103” machine entering on Config | Storage to add a new “storage connection” for the existing storage controller. Add the “optic drive”. You can now select the previosly downloaded Guest Addons ISO related to your vbox version by pressing the “select disk” option.

  4. Start the VM

    $ vagrant up
    $ vagrant ssh

  5. Mount the guest addon CD

    $ sudo -i
    # mkdir /mnt/cd
    # mount -t auto -o ro /dev/cdrom /mnt/cd

  6. Execute the Guest-Addons installer/updater

    # cd /mnt/cd
    # ./

  7. If you want: Undo the mount, extract the cd-rom from vvirtualbox and remove the optical drive added to the machine.

  8. Reboot the virtual machine

    # reboot

1 Like