2014年3月14日 星期五

shared_folder_centos_virtualbox

src:
https://gist.github.com/larsar/1687725

notes:


------

shared_folder_centos_virtualbox.txt
123456789101112131415161718192021222324252627282930
# The VirtualBox documentation[1] for how to install guest additions
# for Linux on a virtual host is somewhat messy. So here is what
# I did to make it work.
# Install the packages required
yum update
yum install gcc kernel-devel make
reboot
# Click: Devices/Install Guest Additions...
# Mount the ISO image with the guest additions
mkdir /cdrom
mount /dev/cdrom /cdrom
# Install guest additions
/cdrom/VBoxLinuxAdditions.run
# Share a folder from the VirtualBox control panel, giving it a share name.
ls /media/sf_<share_name>
# You could always mount the directory yourself as well
mkdir /a_folder_name
mount -t vboxsf the_share_name /a_folder_name
[1] http://www.virtualbox.org/manual/ch04.html

I'm running a fresh installation of CentOS 6 and running ./VBoxLinuxAdditions.run fails at:
Building the main Guest Additions module [FAILED]
Also, clicking Devices/Install Guest Additions apparently has no effect. The shared folder does not appear in /dev or /media
Any ideas?

@aderowbotham, make sure you update.
I ignored the part about the update since I did so a few days earlier and within that time span there was a kernel-update so I got headers for a different kernel and received the same error as you. Updating, then compiling the additions worked for me.

Sorry this might be a bit of a lame question but which ISO should i mount after installing guest additions?

Thanks! That worked like a charm!

Great Tutorial

@TravisPaul, update works for me, but can you brief why a updating is necessary?
 Please sign in to comment on this gist.

沒有留言:

張貼留言