Building Professional Web Hosting Solution
<< Linux Basic Setup and Configuration Course
>> Post Linux OS Setup Initial Steps Section
- Understanding Root Account Privileges Methods
- Creating and Adding Local Users to Sudoers List
- Installing Linux Virtual Machine Guest Additions
- Cloning Virtual Machines using VM Snapshot
Just like any other physical machine, Installing Linux Virtual Machine Guest Additions can be very helpful to get optimal performance from your VM. I will show you how to install Linux drivers for either VirtualBox or VMware Station VMs. Besides, if you are using ESXi, Proxmox, or even Hyper-V, the concept is the same, you need to load the ISO image file into the Virtual CD-ROM device, mount the ISO image, and install the drivers. You don’t need the following procedure if you are using Public VPS.
Objectives:
1. Debian Base – Install VirtualBox Additions
2. Red Hat Base – Installing VirtualBox Additions
3. Debian Base – Installing VMware Open VM Tools
4. Red Hat Base – Installing VMware Open VM Tools
5. Debian or Red Hat Base – Installing VMware Tools
Prerequisites:
A. Basic Debian or Ubuntu System Knowledge
B. Login as Root or use a User with Root Privilege
Table of Contents
Debian Base – Installing VirtualBox Additions
Like any other physical machine, VMs require drivers as well to function properly. Debian and Ubuntu might install DKMS Package and Virtualbox Additions from their Repo during OS setup, however, if you would like to re-install the latest Virtualbox Additions that comes with the latest VirtualBox version, or if you have updated your OS kernel, then follow the instructions below:
Run the following steps (1 to 9)
1. Install DKMS (Dynamic Kernel Virtual Support)
apt-get update && apt-get install dkms build-essential
2. Install Latest Generic Kernel Image
apt-get install linux-image-`uname -r` linux-headers-$(uname -r) linux-headers-`uname -r`
Note: If you find kernel updates, install them and reboot before installing drivers. If it says Kernel is already the newest version, no need to reboot.
3. At the running Template VM Window, Click Devices and choose ” Install Guest Additions”
4. Make Directory for the CD-ROM
mkdir /mnt/cdrom
5. Mount the VMware Tools
mount /dev/cdrom /mnt/cdrom
6. Move into the CD-ROM
cd /mnt/cdrom
7. Make sure you mounted the proper ISO file
ls -hal
You should see something similar to the following
[...]
-r-xr-xr-x 1 root root 7.2M Sep 8 04:06 VBoxLinuxAdditions.run
[...]
8. Run the Installation Script
sh ./VBoxLinuxAdditions.run
Answer the questions. I usually answer Yes to all of them.
9. Reboot the System
reboot
Red Hat Base – Installing VirtualBox Additions
Like any other physical machine, VMs require drivers as well to function properly.
Run the following steps (1 to 13)
1. Import the GPG keys
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
2. Install Updates
yum update
3. Install Development Tools
yum groupinstall 'Development Tools'
4. Install Dynamic Kernel Module Support
yum install dkms gcc make kernel-devel
5. Check for kernel Updates
yum install kernel*
6. Reboot the System
reboot
7. Load Guest Additions ISO Image
At the running Template VM Window, Click Devices and choose ” Install Guest Additions”
8. Make Directory for the CD-ROM
mkdir /mnt/cdrom
9. Mount the VMware Tools
mount /dev/cdrom /mnt/cdrom
10. Move into the CD-ROM
cd /mnt/cdrom
11. Make sure you mounted the proper ISO file
ls -hal
You should see something similar to the following
[...]
-r-xr-xr-x 1 root root 7.2M Sep 8 04:06 VBoxLinuxAdditions.run
[...]
12. Run the Installation Script
sh ./VBoxLinuxAdditions.run
Note: If everything goes fine, you should see all OK output. In case one of the Modules failed, look for a solution online and hopefully at your time of installing, there will be an update to fix the bug.
13. Reboot the system
reboot
Debian Base – Installing VMware Open VM Tools
Open VM Tools is more recommended when you use VMware, especially if you are using headless server.
Open VM Tools is the open source implementation of VMware Tools and consist of a suite of virtualization utilities that improves the functionality, administration, and management of virtual machines on VMware hypervisors. VMware recommends using the Open VM Tools redistributed by the operating system vendors. For additional information, see knowledge base article 2073803. Source http://partnerweb.vmware.com/GOSIG/Debian_8.html
Run the following steps (1 to 3)
1. Install Latest Generic Kernel Image
apt-get update && apt-get install linux-image-`uname -r` linux-headers-$(uname -r) linux-headers-`uname -r`
Note: If the kernel got updated, it’s recommended to reboot before installing drivers. If it says Kernel is already the newest version, no need to reboot.
2. Install Open VM Tools Drivers Package
apt-get install open-vm-tools
Press Enter with [default=N] as answer to all questions asked.
3. Reboot the System
reboot
Red Hat Base – Installing VMware Open VM Tools
Open VM Tools is more recommended when you use VMware, especially if you are using headless server.
Open VM Tools is the open source implementation of VMware Tools and consist of a suite of virtualization utilities that improves the functionality, administration, and management of virtual machines on VMware hypervisors. VMware recommends using the Open VM Tools redistributed by the operating system vendors.
Run the following steps (1 to 8)
1. Import the GPG keys
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
2. Install Updates
yum update
3. Install Development Tools
yum groupinstall 'Development Tools'
4. Install Dynamic Kernel Module Support
yum install dkms gcc make kernel-devel
5. Check for kernel Updates
yum install kernel*
6. Reboot the System
reboot
7. Install Open VM Tools Drivers Package
yum install open-vm-tools
8. Reboot the System
reboot
Debian or Red Hat Base – Installing VMware Tools
Again, you don’t need VMware tools if you have installed Open VM Tools, but if Open VM Tools did not work as it should be, then try to install VMware Tools. As far as I know, Open VM tools would be enough for servers. You will probably need VMware Tools if you use GUI Desktop version of Linux, however, install Open VM Tools first then come back and install VMware Tools.
Run the following steps (1 to 11)
1.Load VMware Tools ISO Image
At the running Template VM, click VM and choose ” Install VMware Tools”
2. Make Directory for the CD-ROM
mkdir /mnt/cdrom
3. Mount the VMware Tools
mount /dev/cdrom /mnt/cdrom
4. Move into the CD-ROM
cd /mnt/cdrom
5. Make sure you mounted the proper ISO file
ls -hal
You should see something similar to the following
manifest.txt VMwareTools-9.2.0-799703.tar.gz
6. Move into /tmp folder
cd /tmp/
7. Un TAR the VMware tools in /tmp
tar zxf /mnt/cdrom/VMwareTools*
8. Move into VMware tools Folder
cd vmware-tools-distrib/
9. Run the Install Script
./vmware-install.pl
Answer all questions by picking the default answer for each question – If Yes keep it Yes and Hit Enter, same thing goes to NO as well, I usually keep hitting Enter till the process finishes.
Note: keep in mind that when ever the VM or the system is upgraded to newer kernel, you need to re-install the drivers again for either VirtualBox or VMware Station. When you start cloning VMs later on, snapshot the Cloned VM before any system update, upgrade, or driver update.
10. Reboot the System
reboot
Subject Related
By | Oracle Docs | VirtualBox Docs | Ask Ubuntu | For CentOS
Building Professional Web Hosting Solution
<< Linux Basic Setup and Configuration Course
>> Post Linux OS Setup Initial Steps Section
- Understanding Root Account Privileges Methods
- Creating and Adding Local Users to Sudoers List
- Installing Linux Virtual Machine Guest Additions
- Cloning Virtual Machines using VM Snapshot
LEAVE A COMMENT