# 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.

In this topic:

## 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 Stop. 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 OneLG 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 OneLG in a non-default location, such as `C:\OneLG`.

   - During installation, clear the Specify certificate option.

Step 3: Configure the load generator machine

1. Add the IUSR_METRO local user to the machine, and choose a password that meets your organization's security requirements.

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:\OneLG\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 "LoadRunner Remote Managementagent" 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 Stop. 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

## Azure - Windows

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

Step 1: Provision a Windows Server 2012 R2 virtual machine

In the Azure portal, navigate to Virtual machines and create a new virtual machine. Use the latest Windows Server 2012 R2 Standard x64 image. For details, see the Azure 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 OneLG 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 OneLG in a non-default location, such as `C:\OneLG`.

   - During installation, clear the Specify certificate option.

Step 3: Configure the load generator machine

1. Add the IUSR_METRO local user to the machine, and choose a password that meets your organization's security requirements.

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:\OneLG\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 "LoadRunner Remote Managementagent" 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.

12. Restart the virtual machine.

Step 4: Prepare the image

1. Connect to the server using the Administrator account and delete all temp data created by downloading, unpacking, and installing the load generator installer.

2. Run the System Preparation Tool using the Generalize and Shutdown options.

   1. Open the Command Prompt window as an administrator. Change the directory to `%windir%\system32\sysprep`, and then run `sysprep.exe`.

   2. In the System Preparation Tool dialog box, select Enter System Out-of-Box Experience (OOBE), and make sure that the Generalize check box is selected.

   3. In Shutdown Options, select Shutdown and then click OK.

   4. When Sysprep completes, it shuts down the virtual machine. Do not restart the VM.

Step 5: Create an image from the virtual machine

Note: The virtual machine must be in Stopped state before proceeding with this step.

1. Create an image from the virtual machine, and configure the following settings:

   - Set Image name according to the LR-LRE_Load_Generator_<version>_<OS> template. For example:

     LR-LRE_Load_Generator_2020_Win2012R2

   - Select the I've run Sysprep on the virtual machine check box. This will delete the virtual machine after the capture operation is completed.

2. Add a tag to the virtual machine with the following values:

   - Name: ImageVersion

   - Value: LR LG, LRE Compatible, version{<version>}

     For example:

     LR LG, LRE Compatible, version{2020}

3. The new image will be available in the VM images menu.

Back to top

## Azure - Ubuntu

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

Step 1: Provision an Ubuntu 16.04 x64 virtual machine

In the Azure portal, navigate to Virtual machines and create a new virtual machine. Use the latest Ubuntu Server 16.04 x64 image. For details, see the Azure Documentation.

Step 2: Install Load Generator Standalone

1. Connect to the virtual machine that you just created.

2. Run the following command to update the image:

   sudo apt-get update

   sudo apt-get upgrade

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:

   egrep '/([[:alnum:]]+:)?CustomData' /var/lib/waagent/ovf-env.xml | sed -re 's,.*<([[:alnum:]]

   +:)?CustomData>,,;s,</([[:alnum:]]+:)?CustomData>.*,,' | base64 -d > /var/lib/waagent/CustomData

   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

5. Run the following:

   sudo waagent -deprovision

6. Shut down the instance and verify that it has stopped.

Step 3: Create an image from the virtual machine

1. Create an image from the virtual machine, and configure the following settings:

   - Set Image name according to the LR-LRE_Load_Generator_<version>_<OS> template. For example:

     LR-LRE_Load_Generator_2020_Win2012R2

   - Select the I've run Sysprep on the virtual machine check box. This will delete the virtual machine after the capture operation is completed.

2. Add a tag to the virtual machine with the following values:

   - Name: ImageVersion

   - Value: LR LG, LRE Compatible, version{<version>}

     For example:

     LR LG, LRE Compatible, version{2020}

3. The new image will be available in the VM images menu.

Back to top

https://admhelp.microfocus.com LoadRunner Enterprise 8942
Tips to improve your search results... LoadRunner Enterprise Help Center LoadRunner Enterprise Help LR Enterprise Help 2020_SP2-SP3 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: