Silent Installation of the eG VM Agent on Linux VMs

To silently install the eG VM agent on Linux VMs, follow the broad steps outlined below:

  1. Creating silent mode script for eG VM agent installation
  2. Installing eG VM agent in silent mode

Each of these steps have been discussed elaborately below.

Creating a Silent Mode Script

For this, follow the procedure detailed below:

  1. Login to a target Linux VM.
  2. From the eG web site, download the zipped file that corresponds to the bit-rate of your Linux VM. In other words, if a 32-bit Liunux VM is the target, download the VmAgent_Linux.tar.gz file. On the other hand, download the VmAgent_Linux_x64.tar.gz if the target is a 64-bit Linux VM.
  3. Once the zipped file is downloaded to a local folder, go to the Shell prompt, switch to the directory to which the zipped file is downloaded, and issue the following command to unzip it:

    gunzip <Zipped_file_name>

    For instance, your command to unzip the zipped file downloaded to a 32-bit Linux VM will be:

    gunzip VmAgent_Linux.tar.gz

  4. The VmAgent_Linux.tar.gz file, when unzipped, extracts the eGVmAgent_Linux.tar file. Similarly, if the VmAgent_Linux_x64.tar.gz file is unzipped, the eGVmAgent_Linux_x64.tar file will be extracted.
  5. Now, proceed to untar the tar file. For that, from the directory to which the contents of the zip file were extracted, issue the following command:

    tar -xvf <Tar_File_Name>

    For instance, to untar the eGVmAgent_Linux.tar file, your command should be:

    tar -xvf eGVmAgent_Linux.tar

  6. The untarred 32-bit package will contain the following files:

    • eGvmagent_linux.tar file, which is the standard eG VM agent software for 32-bit Linux hosts

    • iVMAgent_linux.sh file, which is the accompanying script that drives the installation

    • setup.sh

    Similarly, the untarred 64-bit package will include the following:

    • eGvmagent_linux_x64.tar file, which is the standard eG VM agent software for 64-bit Linux hosts

    • iVMAgent_linux_x64.sh file, which is the accompanying script that drives the installation

    • setup.sh

  7. To install the eG VM agent, first grant execute permissions to the iVMAgent_linux.sh or the iVMAgent_linux_x64.sh scripts (as the case may be). For that, issue the following command at the prompt:

    chmod +x <Script_File_Name>

    For instance, your command can be:

    chmod +x iVMAgent_linux.sh

  8. Next, proceed to install the VM agent by running the iVMAgent_linux or the iVMAgent_linux_x64 script (as the case may be) .

  9. Once the eG VM agent is successfully installed, you will notice that a silent_install_vmagent script gets automatically created in the /opt/egvmagent/bin directory.

  10. Now, copy the silent_install_vmagent script to a temporary folder on the VM. To the same temporary folder, copy the iVMAgent_linux (or iVMAgent_linux_x64) and the eGvmagent_l inux.tar file (or the eGvmagent_linux_x64.tar file).

  11. Copy all three files in the temporary folder to any location on another Linux VM, where you want to install the eG VM agent in the silent mode.

  12. Log out of the original VM.

Installing the eG VM Agent on Another Linux VM in the Silent Mode

Follow the steps given below to install the eG VM Agent in the silent mode on another Linux VM:

  1. Login to the target Linux VM as root user.
  2. Open the silent_install_vmagent script in an Editor. The contents of a sample silent_install_vmagent script are depicted below:

    #!/bin/sh

    currentUser=`whoami`

    if [ "$currentUser" != "root" ]

    then

    echo "******************************************************************************"

    echo "This script can only be run by the root user. Exiting ..."

    echo "******************************************************************************"

    exit

    fi

     

    XMX="-Xmx512m"

    #Xmx to use for the agent

     

    eGuser=ksfeb2102

    #eG user - please make sure that the user account exists

     

    eGgroup=egurkha

    #eG user's group

    serviceaccount=no

    #whether the user we are going to create is a service account or a normal account

    eGInstallDir=/opt

    #eG install directory

     

    autoRestart=y

    #whether the VMagent should auto-restart

     

    licenseAcceptance=y

    #licenseAcceptance the license

     

    eGVMAgentPort=60001

    #eG VMAgent port

     

    count=`grep "^$eGgroup:" /etc/group | wc -l`

    if [ $count -eq 0 ]

    then

    if [ ! -f /usr/sbin/groupadd ]

    then

    echo "/usr/sbin/groupadd does not exist. User creation will fail! Exiting ..."

    exit 0

    fi

  3. The parameters that you may need to edit include the following:

    1. eGuser : Here, either provide the name of an existing user to the target host or that of a new user. If you provide the name of the new user, then the agent installer will automatically create a normal (by default) user account with that name.
    2. eGgroup : Specify the group to which the eG user belongs.
    3. serviceaccount : If the name of a new user is specified against eGuser, then the agent installer will automatically create a user account with that name. By default, the user account so created will only be a normal user account, and not a service account. Because a service account is more secure, administrators of high-security environments may prefer to use a service account for agent installation and operations, instead of a normal account. To create a service account with the eGusername specified, set this parameter to yes. To create only a normal user account, set this parameter to no.
    4. eGInstallDir : Specify the location on the target host in which the agent is to be installed.
    5. autoRestart : Whether the agent is to be auto-restarted or not upon system reboot; enter y to restart the agent, or n to not restart.
    6. licenseAcceptance: Whether to accept the terms and conditions of the eG license or not; enter y to accept the terms, or n to reject the same.
    7. eGVMAgentPort: Specify the port at which the eG VM agent listens. By default, this is port 60001.
  4. Once all the aforesaid parameters are configured with the values relevant to your VM agent installation, save the file.

    Note:

    Make sure that the eGuser account exists on the target VM before you run the silent_install_vmagent script.

  5. Provide execute permissions for the silent_install_vmagent script and run the script on the target VM. To grant execute permissions, issue the following command from the directory that holds the silent_install_vmagent script (say, \tmp): chmod +x silent_install_vmagent
  6. Upon successful execution of the script, the eG VM agent will be automatically installed and started on the host.