Create custom image for cloud hosts

The LoadRunner Enterprise installation includes images for load generators for various cloud environments. This topic describes how to create custom images for those environments.

Amazon - Windows

This section describes how to create a custom image for Amazon on a Windows environment.

Step 1: Provision a Windows Server 2012 R2 instance

Launch a new instance from the cloud console. Use the latest Windows Server 2012 R2 Standard x64 image. Make sure the Shutdown behavior is set to Terminate. For details, see the AWS Documentation.

Note: Make sure .NET Framework 4.5 is enabled. For details, see https://technet.microsoft.com/en-us/library/dn482071.aspx.

Step 2: Install Load Generator Standalone

  1. Connect to the server using the Administrator account.

  2. Disable UAC (User Account Controls) and LUA (Limited User Account).

    1. Disable User Account Control (UAC) on the machine before installing Load Generator Standalone. For details, see the Microsoft documentation.

    2. Open HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA in the Registry Editor, and change the Value data for "EnableLUA" to "0".

  3. Install an LG SA (Load Generator Standalone) on the cloud machine in the default LRE Mode, and install Network Virtualization. The setup file is in the LoadRunner installation package's Standalone Applications folder.

    Note:  

    • Install LG SA in a non-default location, such as C:\LoadGenerator.

    • During installation, clear the Specify certificate option.

    • For a full installation release, installing LG SA means installing a full build (example, 2020).

    • For an upgrade or a remote installation release, installing LG SA means installing a full build and a remote installation, before configuring the load generators in Step 3 below.

Step 3: Configure the load generator machine

  1. For enhanced security we recommend changing the password for IUSR_METRO.

  2. Turn off firewalls using the following command:

    netsh advfirewall set allprofiles state off

  3. Disable IE Enhanced Security Configuration:

    1. Open the Server Manager on the machine.

    2. From the Local Server menu, set the IE Enhanced Security Configuration option to Off.

    3. Check the troubleshooting in the TruClient Help Center in case additional configuration is required.

  4. Configure Internet Explorer as follows:

    1. Switch the Administrator user with the IUSR_METRO user. Log out of the remote desktop session, and log on again with the IUSR_METRO user.

    2. Open Internet Explorer and configure the following:

      Action Description
      Disable compatibility view settings In Internet Explorer, select Tools > Compatibility View Settings, and clear both check boxes.
      Modify Security Settings

      In Internet Explorer, select Tools > Internet options, and open the Security tab.

      In the Internet security zone:

      • Reduce the security level to Medium.

      • Clear the Enable Protected Mode setting.

      In the Trusted sites zone:

      • Reduce the security level to Medium-low.

  5. Change the Temporary folder settings

    In System Properties > Environment Variables, change:

    • IUSR_METRO default path to C:\Temp.

    • System account temp folder to C:\Temp (by default it is C:\Windows\Temp).

  6. Switch IUSR_METRO with the Administrator user. Log out of the remote desktop session, and log on again with the Administrator user.

  7. Register the LGCloudAgent service using the following command:

    sc create LGCloudAgent binPath= "c:\Program Files (x86)\Micro Focus\Load Generator\bin\LGCloudAgent.exe" start= auto

  8. Configure Services to use the IUSR_METRO user account when launching processes (lr_bridge, mdrv, etc.)

    1. In a command prompt, change directory to <Load Generator installation folder>\launch_service\bin, and run the following commands:

      magentservice.exe -remove

      magentservice.exe -install iusr_metro <user password>

    2. Update the user information for the alagent service by performing the following:

      In a command prompt, change directory to <Load Generator installation folder>\al_agent\bin and run the following commands:

      alagentservice.exe -remove

      alagentservice.exe -install iusr_metro <user password>

  9. Change the startup type of the LoadRunnerAgent and RemoteManagementAgent service by running the following commands:

    sc config LoadRunnerAgent start= demand

    sc config remotemanagementagent start= demand

  10. Update the logon type for TruClient script access to IE local storage.

    1. Open the logon_user_config_file.cfg file from the <Load Generator installation folder>\launch_service\dat folder.

    2. Change the value of LogonType to "LOGON32_LOGON_INTERACTIVE" and save the file.

    3. Open the Services console and restart the LoadRunner Agent Service.

  11. Deny remote login from IUSR_METRO.

    1. Open the Local Users and Groups console by running lusrmgr.msc from a command prompt.

    2. Click the Administrators group, and make sure IUSR_METRO is listed there.

    3. Click the Remote Desktop Users group, and make sure only the Administrator user is listed there (not the Administrators group).

    4. Open the Local Security Policy console by running secpol.msc from a command prompt.

    5. Expand Local Policies, and select User Rights Assignment.

    6. Open Allow log on through Remote Desktop Services policy, and make sure only Remote Desktop Users are included in it.

Step 4: Prepare the image

  1. Delete all temp data created by downloading, unpacking, and installing the load generator installer.

  2. Run the EC2Config utility. Set the Administrator password to Random, and choose Shutdown with SysPrep.

    Note: Do not create an Amazon Machine Image (AMI) from a running instance. Doing so will results in:

    • Inability to obtain the Administrator password using the key pair.

    • Services not being started at the provision time; hence the load generator is not usable for running tests.

Step 5: Create an image from the instance

  1. Create an AMI from an Instance.

    • Set the Name according to LR-LRE_Load_Generator_<version>_<OS> template, e.g. LR-LRE_Load_Generator_2020_Win2012R2

    • Set the Description to ״LR LG, LRE Compatible״ and ״version{<version>}״ template, e.g. ״LR LG, LRE Compatible, version{2020}״

    • Select the Delete on Termination check box.

  2. Copy the image to all required regions.

Back to top

Amazon - Ubuntu

This section describes how to create a custom image for Amazon on Ubuntu.

Step 1: Provision an Ubuntu 16.04 x64 instance

Launch a new instance from the cloud console. Use the latest Ubuntu Server 16.04 x64 image. Make sure the Shutdown behavior is set to Terminate. For details, see the AWS Documentation.

Step 2: Install Load Generator Standalone

  1. Connect to the instance that you just created, signing in as ubuntu.

  2. Run the following command to update the image:

    sudo

    dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y install libc6-i386 lib32stdc++6 lib32ncurses5 libkrb5support0:i386 libkeyutils1:i386 gsoap:i386 mc libglib2.0-0:i386 libidn11:i386

  3. Install an LG SA (Load Generator Standalone) on the cloud machine, and install Network Virtualization. The setup file is in the LoadRunner installation package's Standalone Applications folder.

    During installation, accept all of the defaults. Skip the Certificate Installation step and the Load Generator startup.

    Note: Installing LG SA means installing a full build (the Linux installer is always a full installer).

  4. Insert the following lines into /etc/rc.local:

    export LD_LIBRARY_PATH=/opt/MF/MF_LoadGenerator/bin

    export PRODUCT_DIR=/opt/MF/MF_LoadGenerator

    export M_LROOT=/opt/MF/MF_LoadGenerator

    /opt/MF/MF_LoadGenerator/bin/LgCloudAgent

Step 3: Create an image from the instance

  1. Create an AMI from the instance.

    • Set the Name according to LR-LRE_Load_Generator_<version>_<OS> template, e.g. LR-LRE_Load_Generator_2020_Ubuntux64

    • Set the Description to ״LR LG, LRE Compatible״ and ״version{<version>}״ template, e.g. ״LR LG, LRE Compatible, version{2020}״

    • Select the Delete on Termination check box.

  2. Copy the AMI to all required regions.

Back to top