Troubleshooting

If the Virtual Machine Status test, Virtual Machine Details test, and all the “inside view” tests for a Microsoft Virtual server fail to run, then it could be owing to the inability of the eG agent to auto-discover the IP addresses of the VMs on the Virtual Server and their state. This can be due to any of the following reasons:

  1. Typically, the eG agent runs scripts on the virtual server and VMs to discover the IP addresses of the VMs. If the Virtual Servers and the VMs have been configured to disallow the execution of scripts, then the eG agent’s scripts will not execute, thereby resulting in the failure of VM discovery.

    To check whether scripts can execute on the virtual server and VMs, do the following:

    • Login to the target Microsoft Virtual Server host as the user whose credentials have been passed to the VsGuest test, VsGuestStatus test, and the “inside view” tests.
    • Go to the command prompt.
    • Move to the <EG_AGENT_INSTALL_DIR>\lib directory.
    • The eG agent runs a script named guestinfo.vbs in the <EG_AGENT_INSTALL_DIR>\lib directory, which reports the names of the VMs on the virtual server, the state of each VM, and the operating system of the VMs. To execute this script, issue the following command at the command prompt:

      cscript guestinfo.vbs

    • If this script executes smoothly, then it will return the names of the VMs, their state, and their operating system (OS). A sample query result is given below:

      Machine Name:vm2#State:5#OS:Windowsr XP Professional Service Pack 2

    • On the other hand, if the query returns an error as displayed below, then it indicates a problem in script execution.

      The name of the guest OS could not be retrieved

    • To verify whether the problem is because the virtual server does not allow script execution, first, open the Microsoft Virtual Server Administration Website using the menu sequence depicted by Figure 2.

      guestinfonotrunning1-final

      Figure 2 : Opening the Virtual server Administration Website

    • When Figure 3 appears, click on the Master Status option in the left panel to view the VMs configured on the Virtual server and their current state in the right panel.

      guestinfonotrunning2

      Figure 3 : Viewing the names and state of VMs

    • Make sure that all listed VMs are in an Off state. If not, right-click on every VM, and pick the Turn Off option from the shortcut menu.
    • Then, click on the Server Properties option from the Virtual Server section in the left panel. Figure 4 then appears.

      guestinfonotrunning3

      Figure 4 : The Server Properties

    • In the Properties section in the right panel of Figure 4, look for the Virtual Server scripts parameter. If it is set to Scripts disabled, then it indicates that no scripts can be executed on the virtual server. To enable script execution, click on the Virtual Server scripts link in the right panel of Figure 4.
    • In the Virtual Server Settings section of Figure 5 that appears, click on the Enable scripts attached to this server and Enable scripts attached to the virtual machines running on this server check boxes to enable script execution on the virtual server and the VMs.
    • Finally, click the ok button in Figure 5.

      guestinfonotrunning4

      Figure 5 : Enabling script execution

    • The status of the Virtual Server scripts parameter then changes to Scripts enabled (see Figure 6).

      guestinfonotrunning5

      Figure 6 : Change in the status of the Virtual Server scripts flag

    • Once this is done, return to the command prompt, and once again try to execute the guestinfo.vbs script from the <EG_INSTALL_DIR>\lib directory.
    • If the error persists, then proceed to check if this is a permission issue.
  2. The guestinfo.vbs script is used by the VsGuest test, VsGuestStatus test, and all “inside view” tests for VM discovery. Typically, these tests should be configured with the credentials of a user who has access to all the VMs on the virtual server. To check whether the configured user indeed has the required privileges, follow the steps given below:

    • Login to the Microsoft Virtual Server Administration Web Site, and click on the Server Properties link in the right panel of the web site.
    • Figure 7 appears. In the Properties section in the right panel of Figure 7, click on the Virtual Server security link. Figure 20 then appears.

      guestinfonotrunning6

      Figure 7 : Checking for user privileges

    • In the Virtual Server Security Properties section of Figure 20, you will find a Permission entry for every user who is allowed access to the virtual server, and the type of access he/she is entitled to. Scan the permission entries to determine whether the user who has been configured to run the VsGuest test, VsGuestStatus test, and all the “inside view” tests (i.e., the Vsg tests), is allowed Full access. If the user name you are looking for is not available in the page depicted by Figure 20, then it indicates that all the above-mentioned tests have been run by a user with “insufficient access permissions”. To address this issue, you have to do either of the following;

      • Modify the test configuration, so that all the above-mentioned tests are configured with the credentials of any other user in Figure 20 with Full access;
      • Grant Full access to the user, using whose credentials the tests are already being executed – i.e., add a Permission entry for the user. To achieve this, simply click on the Add Entry button in Figure 20, provide the name of the user against User or Group, set Type to Access, and then pick the Full check box against Permissions (see Figure 21). Finally, click the ok button in Figure 21.

        addpermentry

        Figure 8 : Adding a Permission entry

    • Once the above steps are followed, the guestinfo.vbs script should execute without a glitch.
  3. While the eG agent that monitors the virtual server uses the guestinfo.vbs script to determine the state and OS of the VMs, it uses another script named Ipaddress.vbs to extract the IP address of the VMs. Typically, the Ipaddress.vbs script, upon execution, returns the names of the configuration files that correspond to the powered-on VMs on the virtual server. Upon receipt of these details, the eG agent automatically opens each of the configuration files that this script returns, reads the host names of the VMs from the files, and runs an nslookup on each name to determine the IP address of the VMs. However, if your DNS server is improperly configured, then nslookup will not be able to resolve the host name to IP address mappings. Therefore, to check whether the VM discovery failed due to an DNS error, follow the steps given below:

    • Go to the command prompt, and once again switch to the <EG_AGENT_INSTALL_DIR>\lib directory.
    • Next, execute the command: cscript Ipaddress.vbs.
    • The command will return a list of files named in the format <VMName>.vmc. For instance, if the name of a powered-on VM is vm2, then the name of its corresponding configuration file will be: vm2.vmc.
    • Open any of the configuration files, and search for the tag <computer_name> in them.

      ipaddressnotrunning2

      Figure 9 : Searching for computer_name

  4. Once the computer_name tag is found, copy the host name that is enclosed within the tags: <computer_name> </computer_name>.

    ipaddressnotrunning3

    Figure 10 : Determining the host name of the VM

  5. Close the file, and return to the command prompt.
  6. Issue the command: nslookup <VMHostName>. For instance, for the host name, the command will be: nslookup vitxp2.CHN.EGURKHA.COM
  7. If this command returns an IP address, it indicates that the DNS server is functioning properly. If the command returns an error, it could indicate an issue with the DNS configuration.