In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains how to share the files in CentOS under VirtualBox with the host computer. Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to share the files in CentOS under VirtualBox with the host computer.
This paper introduces how to mount the host folder in Linux under VirtualBox to realize the file sharing between the virtual machine and the host.
Environment: Oracle VM Virtualbox 4.0.10 + CentOS 6.0
1. Install VirtualBox Guest Addition under CentOS
Click "device"-"assign Optical Drive"-"Choose a virtual CS/DVD..." in the current virtual machine interface.
Open the installation folder of VirtualBox, default to "C:\ Program Files\ Oracle\ VirtualBox", and select "VBoxGuestAdditions.iso" to mount.
Open CentOS HyperTerminal and enter the following command to install VirtualBox Guest Addition
The code is as follows:
[root@Slyar ~] # mount / dev/cdrom / mnt
Mount: block device / dev/sr0 is write-protected, mounting read-only
[root@Slyar ~] # / mnt/VBoxLinuxAdditions.run
The first is to mount the CD to / mnt, and the second is to install it, waiting for the installation to be completed. (if you don't have an X desktop like me, then the last one may Failed, no effect.)
2. Configure the data space
Click "device"-"allocate data Space" in the current virtual machine interface, pop up the interface, and add a temporary allocation (fixed allocation is fine, it doesn't matter)
"data space location" is your shared folder. Remember the name of the data space by yourself. Do not check "read-only allocation" and "Auto-mount".
3. Restart the operating system
The code is as follows:
[root@Slyar ~] # reboot
4. Mount the shared data space
After starting the system, you can use the following command to mount the data space (assuming the data space name is slyar) to / mnt, where "- w" is writable, and can be changed to "- r" if you want to read-only.
The code is as follows:
[root@Slyar ~] # mount.vboxsf-w slyar / mnt
5. Unexpected circumstances
If there is an unexpected situation that cannot be mounted, you can also go directly to the following directory to use the shared space
The code is as follows:
[root@Slyar ~] # cd / media
[root@Slyar media] # ls-l
Total dosage 0
Drwxrwx--- 1 root vboxsf 0 July 15 15:13 sf_SLYAR
Where "sf_SLYAR" is the shared data space folder.
You can also try to remount the vboxsf module:
The code is as follows:
[root@Slyar ~] # modprobe vboxvsf
PS: resolve the "MBus base address uninitialized" error when starting CentOS under VirtualBox
The following error occurs when starting CentOS 5.5/CentOS 5.6/CentOS 6.0 under VirtualBox today
The code is as follows:
Piix4_smbus 0000VOG 07.0: SMBus base address uninitialized-upgrade BIOS or use force_addr=0xaddr
This error will not affect startup, but every restart there is a mistake is to look at the eye, check the data to find the reason:
CentOS loads the smbus module group at startup, but this module group does not exist in VirtualBox, so an error occurs.
Did not think of a good solution, just pull the blacklist:)
1. Check whether the i2c_piix4 module exists (usually the normal installation is already loaded, so it's better to make sure)
The code is as follows:
[root@localhost ~] # lsmod | grep i2c_piix4
I2c_piix4 11098 0
I2c_core 25799 1 i2c_piix4
2. Edit the blacklist file.
The code is as follows:
[root@localhost ~] # vim / etc/modprobe.d/blacklist.conf
3. Add the following statement to the last line of the blacklist: wq save exit
The code is as follows:
Blacklist i2c_piix4
4. Reboot restarts the system, and the error disappears.
At this point, I believe you have a deeper understanding of "how to share files in CentOS under VirtualBox with host hosts". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.