in Linux, 兴趣

VirtualBox Guest Additions install on Ubuntu and RHEL

Ubuntu is quite popular, just installed the Ubuntu 14.04 LTS in the VirtualBox 5.0.16, and I was trying to install the Guest additions to enable the mouse move in and out freely, copy and past bidirectional, seamless mode etc.
Various attempts to do so, failed many times, finally got the way, below was the methods I tried,
1, tried to install the Guest additions from the repositories. Failed.

sudo apt-get install virtualbox-guest-utils virtualbox-guest-x11 virtualbox-guest-dkms

The \”virtualbox-guest-x11\” failed to install, tried below commands and tried install again, still failed,

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get  virtualbox-guest-x11

2, tried \”System Settings…-> Display -> Resolution\”, still cannot work.
3, Download Page for virtualbox-guest-additions-iso_4.3.36-1ubuntu1.14.04.1_all.deb, and install, cannot work.

sudo dpkg -i virtualbox-guest-additions-iso_4.3.36-1ubuntu1.14.04.1_all.deb

4, install by Devices -> Insert Guest Addtions CD image, by run, it will build and install, successful, below is the pic,
\"InsertGuestAddions\"
Link as: http://askubuntu.com/questions/22743/how-do-i-install-guest-additions-in-a-virtualbox-vm/22745#22745
5, Last step, share folder between Windows folder to VirtualBox Ubuntu
After shared the folder \”Linux\” at VirtualBox manager, tried to access the folder under /media/sf_linux, it will return error that you don\’t have the permission to access…you must add yourself to the vboxsf group,

sudo adduser huilin vboxsf

huilin@huilin-VirtualBox:~$ id huilin
uid=1000(huilin) gid=1000(huilin) groups=1000(huilin),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare),125(vboxsf)

Now you can access the /media/sf_linux folder from Windows.
Link as: http://www.howtogeek.com/187703/how-to-access-folders-on-your-host-machine-from-an-ubuntu-virtual-machine-in-virtualbox/

Error in Virttualbox when mounting the shared folder in RHEL,

VirtualBox: mount.vboxsf: mounting failed with the error: No such device

The solution for me was to stop vboxadd and do a setup after that:

cd /opt/VBoxGuestAdditions-*/init  
sudo ./vboxadd setup

The result is as below,

[root@RH413 ~]# df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda2     ext4     29G  2.9G   25G  11% /
tmpfs        tmpfs    940M   76K  940M   1% /dev/shm
/dev/sda1     ext4    485M   37M  423M   8% /boot
/dev/sr0   iso9660    3.5G  3.5G     0 100% /var/ftp/dvd
[root@RH413 ~]# mount -t vboxsf share /home/rh413/
[root@RH413 ~]# ls /home/rh413/
FluffyMcAwesome-A-6.4.0-11.r19335.x86_64.rpm  foo-1.0.tar.gz
FluffyMcAwesome-B-6.4.0-11.r19335.x86_64.rpm  su.zip
[root@RH413 ~]# df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda2     ext4     29G  2.9G   25G  11% /
tmpfs        tmpfs    940M   76K  940M   1% /dev/shm
/dev/sda1     ext4    485M   37M  423M   8% /boot
/dev/sr0   iso9660    3.5G  3.5G     0 100% /var/ftp/dvd
share       vboxsf    120G  109G   11G  92% /home/rh413/
[root@RH413 ~]# 

 

Edit /etc/fstab, and add below line:

share /home/rh413 vboxsf defaults 0 0

Refer to this link:

http://stackoverflow.com/questions/28328775/virtualbox-mount-vboxsf-mounting-failed-with-the-error-no-such-device

 

 

1897total visits,3visits today

Write a Comment

Comment

20 − six =