In this tutorial I will introduce some tips & tricks while using the phpvirtualbox. These tricks make phpvirtualbox functionality better & much more fruitful.
I do not issue any guarantee that this will work for you!
1 Preliminary Note
I assume that you have a pre-installed phpvirtualbox, in my case I do have installed phpvirtualbox on ubuntu14.04 as I mentioned in my previous tutorials.
2 Guest additions in guest virtual machine
In my case I have installed Ubuntu14.04 as guest in my phpvirtualbox & I wants to install the guest addition in guest ubuntu14.04 machine
apt-get install dkms build-essential linux-headers-$(uname -r)
Here mounting the VboxGuestAddition.iso is little tricky. At original you will not found any option to attach the VboxGuestAddition.iso in Guest OS.
At host machine you will find the iso at location /usr/share/virtualbox/VBoxGuestAdditions.iso Copy the file to the location /home/vbox/
cp /usr/share/virtualbox/VBoxGuestAdditions.iso /home/vbox
Further you can attach the .iso file to the machine as simple CD/Drive & then install the guest addition.
mount /dev/sr0 /media
Sometimes you get an error message
Installing the Window System drivers ...fail! (Could not find the X.Org or XFree86 Window System.)
Just ignore the message. It will successfully install the guest addition in your guest machine. Benefits of guest addition in guest virtual machines are:
- Networking issue resolved
- Mouse flickering issue resolved at RDP
- Display quality of RDP session improved.
From next time when you will try to install the guest addition you will find the option for the installation of the guest addition in VM under the tab Settings>Install Guest additions.
3 Mounting VBox shared folders
The easiest way to have a host folder auto mount is to select ‘Auto-mount’ from the VBox interface and reboot your appliance. You can check where it has been mounted with this command:
mount | grep vbox
If you wish to make the desired point as the mount point you can add the entry in the /etc/fstab
& add the entries like this
/media/vbox-share /desired/mount/point bind defaults,bind 0 0
The entries in my case were like this
/media/sf_iso /mnt/new bind defaults,bind 0 0
Reboot your machine & you have done.