Objective
Install the virtual machine, set up a shared directory when the problem encountered, online search, follow the relevant tutorial operation or there is a problem, may be not clear enough to write, and then rewrite a copy according to their own understanding, and strive to be simple and clear, easy to understand.
Specific steps
1. Shut down the virtual machine (ignore this step if not started)
2. Insert the virtual machine CD-ROM into the VBox installation directory of Vboxguestadditions.iso
3. Start the virtual machine, mount the virtual CD drive, enter the CD-ROM directory, execute the shell script in the optical drive
[Email protected] wadeyu]# mkdir/mnt/cdrom[[email protected] wadeyu]# Mount/dev/cdrom/mnt/cdrom
The second red box displays OK, indicating that the virtual machine already supports shared directories.
4. Turn off the virtual machine, VBox set the shared directory
5. Start the virtual machine and see the directory as shown, indicating that sharing was successful
Problem
1. Hint that the kernel source code does not exist, follow the prompts to install (see the second red box)
2. Non-root user does not have permission to access the shared directory
User add shared directory user Group (note: Attempt to use change permission mode [Chmod-r O+rwx/media/sf_wwwroot], Discovery unsuccessful, possible virtual machine limit)
Postscript
It's easy to set up a shared directory by directly importing someone else's installed virtual machine. Wait until you start from scratch, found that it is not so! No matter what, only experience, you can know the difficult easy!
Resources
[1] How Linux systems in VirtualBox share folders with Windows
HTTP://JINGYAN.BAIDU.COM/ARTICLE/2FB0BA40541A5900F2EC5F07.HTML[2] Mount vboxguestadditions.isohttp:// Blog.chinaunix.net/uid-26610882-id-3390208.html
How Windows shares directories with VBox virtual machines