Create custom image for load generators on the cloud

The Performance Center 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 PC 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, 12.55 or 12.60).

    • For a patch installation release, installing LG SA means installing a full build and a patch, 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-PC_Load_Generator_<version>_<OS> template, e.g. LR-PC_Load_Generator_12.60_Win2012R2

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

    • Select the Delete on Termination check box.

  2. Copy the image to all required regions. Ensure each new image has the correct tags and permissions set after it reaches the active state.

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-PC_Load_Generator_<version>_<OS> template, e.g. LR-PC_Load_Generator_12.60_Ubuntux64

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

    • Select the Delete on Termination check box.

  2. Copy the AMI to all required regions. Make sure to copy all tags and permissions to each new image.

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 (classic) and create a new virtual machine. Use the latest Windows Server 2012 R2 Standard x64 image, and make sure that you set the deployment model to "Classic". 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 an LG SA (Load Generator Standalone) on the cloud machine in the default PC 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 Windows load generators:

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

    • For a patch installation release, installing LG SA means installing a full build and a patch, 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.

  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.

  3. You must create an SSL certificate in order to upload to Azure.

    1. Install the prerequisite software.

    2. Set up the OpenSSL environment.

      1. Run the following commands:

        set OPENSSL_CONF=C:\OpenSSL-Win32\bin\openssl.cfg

        cd C:\OpenSSL-Win32\bin

        openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout myazurekey.pem -out myazurekey.pem

      2. Enter the required information. When prompted, press Enter to confirm each operation.

    3. Create the certificate.

      Run the following command:

      openssl x509 -inform PEM -in myazurekey.pem -outform DER -out myazurekey.cer.

      The myazurekey.cer file is created in the C:\OpenSSL-Win32\bin folder.

    4. Upload the certificate to the Azure machine.

      Use the Azure Console > Settings > Manage Certificates view to upload the myazurekey.cer file to Azure.

    5. Add the certificate to Performance Center.

      1. Since Performance Center expects the certificate in Personal Information Exchange (.pfx) format, run the following command:

        openssl pkcs12 -export -out myazurekey.pfx -inkey myazurekey.key -in myazurekey.pem

      2. In Performance Center Administration, select Configuration > Cloud.

      3. In the Accounts tab, click Add Cloud Account, and enter a name for the cloud account.

      4. Select Microsoft Azure as the provider, and specify the myazurekey.pfx file as the certificate file. For details, see Adding a cloud account.

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-PC_Load_Generator_<version>_<OS> template. For example:

      LR-PC_Load_Generator_12.60_Win2012R2

    • Set Image label to LR LG, PC Compatible and the version{<version>} template. For example:

      LR LG, PC Compatible, version{12.60}

    • 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. The new image will be available in the VM images (classic) 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 (classic) 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:

    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: Prepare the image

You must create an SSL certificate in order to upload to Azure.

  1. Install the prerequisite software.

  2. Set up the OpenSSL environment.

    1. Run the following commands:

      set OPENSSL_CONF=C:\OpenSSL-Win32\bin\openssl.cfg

      cd C:\OpenSSL-Win32\bin

      openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout myazurekey.pem -out myazurekey.pem

    2. Enter the required information. When prompted, press Enter to confirm each operation.

  3. Create the certificate.

    Run the following command:

    openssl x509 -inform PEM -in myazurekey.pem -outform DER -out myazurekey.cer.

    The myazurekey.cer file is created in the C:\OpenSSL-Win32\bin folder.

  4. Upload the certificate to the Azure machine.

    Use the Azure Console > Settings > Manage Certificates view to upload the myazurekey.cer file to Azure.

  5. Add the certificate to Performance Center.

    1. Since Performance Center expects the certificate in Personal Information Exchange (.pfx) format, run the following command:

      openssl pkcs12 -export -out myazurekey.pfx -inkey myazurekey.key -in myazurekey.pem

    2. In Performance Center Administration, select Configuration > Cloud.

    3. In the Accounts tab, click Add Cloud Account, and enter a name for the cloud account.

    4. Select Microsoft Azure as the provider, and specify the myazurekey.pfx file as the certificate file. For details, see Adding a cloud account.

Step 4: 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-PC_Load_Generator_<version>_<OS> template. For example:

      LR-PC_Load_Generator_12.60_Win2012R2

    • Set Image label to LR LG, PC Compatible and the version{<version>} template. For example:

      LR LG, PC Compatible, version{12.60}

    • 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. The new image will be available in the VM images (classic) menu.

Back to top