A boring article is usually a story on my blog.

Vagrant is a create commmand line tool of Virtualbox to build a development environment for developers. However, someday, it was abruptly stopped working with one of my VirtualBox machine - terry - development. OMG, it was the development environment for mostly my works.


How worst was that situations?

  • Shared folders set on Vargrantfile not working.
  • Cannot connect the private IP was set on the Guest OS.
  • DNS not working on Guest OS

I tried many ways I found on the Internet, still not figuring it out, a rescue mission begins.

My plan is to set a shared folder, and then backup everything I need and then put them in the shared folder.




Go VirtualBox GUI, click Settings, click Shared Folders.



Choose a Folder path, in this case, I choose D:\terrylin\c and name it with c



So the settings look like the screenshot.


Fortunately, I can log in to my VirtualBox machine with username vagrant and password vargrant.

Change my role to root, type in the follwing command to mount the shared folder.

mount -t vboxsf [-o OPTIONS] sharename mountpoint


Create a new directory for mounting the share folder. In this case, I create a directory called c in home.

mkdir /home/c

Use the following command to mount the share folder. In this case, c is the name I set in Shared Folders settings in VirutalBox GUI.

mount -t vboxsf c /home/c


Backup my MySQL databases into a sql file, and put it in the shared folder.

mysqldump -root -p --all-databases > /home/c/all.sql

After a few minutes, I can see it in my Windows successfully.


Last modified: July 31, 2019



Write a Reply or Comment

Your email address will not be published.