Chapter 1. Overview

VM Guest Customization Options

Prerequisites

Escape Characters

Status Codes

Chapter 2. Executing VIX Scripts on Guest VMs

Executing VIX Scripts in Cisco UCS Director

Examples with Output Display Option Enabled

Executing a Single-Line Windows Command

Executing a Multiline Windows Command

Executing a Windows Command with Error Codes Specified

Executing a Single-Line Linux Command

Examples with Output Display Option Disabled

Executing A Single-Line Windows Command

Executing a Multiline Windows Command

Executing a Single-Line Linux Command

Executing VIX Scripts Using Rest APIs

Executing a Windows Command Using the userAPIExecuteVIXScript API

Executing a Linux Command Using the userAPIExecuteVIXScript API

Executing a Windows Command Using EXECUTE_VIX_SCRIPT

Executing a Linux Command Using the EXECUTE_VIX_SCRIPT API

Executing Windows Command Using userAPIExecuteVIXScriptWithOutput

Executing a Linux Command Using the userAPIExecuteVIXScriptWithOutput API

Chapter 3. Executing Commands through the Execute VM Command Task

Execute VM Command Task

Execute VM Command Task Examples

Executing a Windows Command at PowerShell

Executing a Windows Command at Command Prompt

Executing a Linux Command at Command Prompt

Chapter 4. Troubleshooting

Debugging VIX Commands

Escaping Spaces in a Windows Command

Preface

Audience

Conventions

Related Documentation

Documentation Feedback

Obtaining Documentation and Submitting a Service Request

Copyright Page

Chapter 1. Overview

This chapter contains the following sections:

- VM Guest Customization Options

- Prerequisites

- Escape Characters

- Status Codes

VM Guest Customization Options

To customize guest operating systems on a VM, Cisco UCS Director provides you the following options:

- The Execute VIX Scripts task and the Execute VM Commands task from the Cisco UCS Director library tasks, which help execute VIX scripts or commands on the VM.

- The " userAPIExecuteVIXScript" API and the "EXECUTE_VIX_SCRIPT" API, which help execute VIX scripts on the VM.

Prerequisites

Before you consider customizing your guest operating systems through Cisco UCS Director, read through the following prerequisites:

- Install the latest VMware tools on the vCenter.

- Power on the VM that has the guest operating system installed.

- Make sure the latest VMware tools are installed and running on the guest VM.

- Obtain the administrator credentials for the guest VM.

- Make sure the ESX/ESXi host is reachable from UCS Director.

Escape Characters

An escape sequence is a backslash (\) followed by a character. Escape characters are used to specify actions such as inserting a new line and a tab. The following table lists the Java escape sequences:

Escape Sequence

Inserts

\t

Tab

\b

Backspace

\n

New line

\r

Carriage return

\f

Formfeed

\'

Single quotation mark

\"

Double quotation mark

\\

Backslash

\$

Dollar variable

\|

Pipe to send output of one command to other in text

\+

Plus character

\^

Caret character

\\&

Ampersand character

When an escape sequence is encountered in a command, the compiler interprets it accordingly. For example, to use quotes within quotes, use the escape sequence (\") on the interior quotes. To print SQL instance name is "ucsd_instance1", enter the command as follows:

echo "SQL instance name is \"ucsd_instance1\""

If the command contains a backslash (\), add one more '\' character as prefix to the '\' character to send the correct command to the VM. If the command includes a UCSD variable (${variable}), use four backslashes '\\\\' instead of two.

Examples:

C:\\WINDOWS\\system32\\cmd.exe mkdir C:\\test1                    // two backslashes

C:\\\\sqlinstall\\\\install.cmd ${SQL_INSTANCE_NAME}                                // four backslashes,
// as UCS Director variables are used in the command

Status Codes

The following table lists some of the VIX status codes:

Code

Description

0

Command successfully executed

1

Unknown error

127

Exception thrown – Command not found

9009

Exception thrown - Not recognized as an operable program or command

3014

Insufficient permissions in host operating system

3015

Authentication failure or insufficient permissions in guest operating system

For a complete list of VIX status codes, refer to VIX Error Codes documentation on the VMware Support site.

After execution of commands, you can check the Cisco UCS Director workflow logs to see whether the VIX script has successfully executed the command. On successful execution, the workflow log shows the status code as 0. For a failed task or passing of irrelevant commands, the VIX script shows a status code other than 0.

Note

In the Cisco UCS Director workflow logs, you see that the ERROR_STATUS_MESSAGE is empty when EXIT_STATUS_CODE = 0 and EXIT_STATUS_CODE = 1. Other Exit Status Codes, however, display proper error messages.

After the task is completed on the VM, you can verify the status code in the VM as well. For a Linux VM, verify the status code by entering the command echo $?. For a Windows VM, verify the status code by entering echo %ERRORLEVEL%.

Chapter 2. Executing VIX Scripts on Guest VMs

This chapter contains the following sections:

- Executing VIX Scripts in Cisco UCS Director

- Examples with Output Display Option Enabled

- Examples with Output Display Option Disabled

- Executing VIX Scripts Using Rest APIs

Executing VIX Scripts in Cisco UCS Director

A VIX script executes Linux and Windows commands on a Guest VM. Cisco UCS Director provides the following methods to execute VIX scripts:

- The Execute VIX Scripts task, which executes the Linux or Windows command on a Guest OS.

- The userAPIExecuteVIXScript API (JSON based) and the EXECUTE_VIX_SCRIPT API (XML based)

Note

However, the Rest APIs have the following limitations:

- The response displays only the status code. The response does not display the output of the valid command.

- To view error messages, you must use the userAPIExecuteVIXScriptWithOutput command.

Examples with Output Display Option Enabled

The Output Display option is available in the Execute VIX Script task. You can choose to enable the Output Display option whenever you use the Execute VIX Scripts task.

When the Output Display option is enabled for running Windows commands on a VM, a batch file and an output file are created in the /opt/infra/vix_temp_files directory. The batch file contains the command to be executed on the selected VM. After the command is executed on the VM, an output file is created. The output file contains the status code of the batch file execution.

When the Output Display option is enabled for running Linux commands on a VM, just an output file is created. The output file captures the status code of the batch file execution.

The following examples illustrate how you can use the Execute VIX Script Task for running commands on Windows and Linux VMs, with the Output Display option enabled.

- Executing a Single-Line Windows Command

- Executing a Multiline Windows Command

- Executing a Windows Command with Error Codes Specified

- Executing a Single-Line Linux Command

Executing a Single-Line Windows Command

In this example, we execute a single-line Windows command using the Execute VIX Script task, with the Output Display option enabled. When the Output Display option is enabled for running Windows commands on a VM, a batch file is created. The batch file contains the command to be executed on the selected VM. An output file captures the status code of the batch execution.

Enter the following information in the Execute VIX Scripts task available on the UCS Director appliance:

1. Select the VM where you want to run the VIX script.

2. Enter the administrator credentials of the VM.

3. Enter the following sample Windows command in the Script box:

C:\\WINDOWS\\system32\\cmd.exe mkdir C:\\test_Dir_9867

4. Check the Output Display box.

After executing the task, you see the following information in the log:

Service Request ID: 536

Mar 21, 2016 10:03:00 UTC Request Submitted

Mar 21, 2016 10:03:03 UTC Executing workflow item number 1

Mar 21, 2016 10:03:03 UTC Completed workflow item number 0, with status completed

Mar 21, 2016 10:03:09 UTC Executing workflow item number 2

Mar 21, 2016 10:03:00 UTC Trigger context executeWorkflowStep called

Mar 21, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Mar 21, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Mar 21, 2016 10:03:13 UTC  [VIXActionHandler] - account details VMName : Win_2k12 , Host: 172.31.234.46, OS Type: microsoft windows server 2012 (64-bit), ExitCode :0

Mar 21, 2016 10:03:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully in 3 seconds

Mar 21, 2016 10:03:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Mar 21, 2016 10:03:13 UTC [Local Input: Select VM = 3312)

Mar 21, 2016 10:03:13 UTC [Local Input: Credential type = Login]

Mar 21, 2016 10:03:13 UTC [Local Input: Login =  administrator]

Mar 21, 2016 10:03:13 UTC [Local Input: Password = "masked-value")

Mar 21, 2016 10:03:13 UTC [Local Input: Script - C:\\WINDOWS\\system32\\cmd.exe mkdir C:\\test_Dir_9867]

Mar 21, 2016 10:03:13 UTC [Local Input: Undo Script =  ]

Mar 21, 2016 10:03:13 UTC (Local Input: Error Codes = ]

Mar 21, 2016 10:03:13 UTC [Local Input: Output display = true]

Mar 21, 2016 10:03:13 UTC (Output: EXIT_STATUS_CODE = 0]

Mar 21, 2016 10:03:13 UTC (Output: ERROR_STATUS_MESSAGE = ]

Mar 21, 2016 10:03:13 UTC Completed workflow item number 1, with status completed

As seen in the log, the script returns status code 0, which means that the task has been executed successfully.

A batch file is created in the following location:

/opt/infra/vix_temp_files/vixbatch-03_21_2016_10_03_09_835.bat

The content of the batch file is as follows:

@echo off
mkdir C:\\test_Dir_9867
echo status_code: %ERRORLEVEL%

The output file is created in the following location:

/opt/infra/vix_temp_files/vixoutput-03_21_2016_10_03_09_835.txt

The content of the output file is as follows:

status_code: 0

Executing a Multiline Windows Command

In this example, we execute a multiline Windows command using the Execute VIX Script task, with the Output Display option enabled. When the Output Display option is enabled for running Windows commands on a VM, a batch file is created. The batch file contains the command to be executed on the selected VM. An output file captures the status code of the batch file execution.

Enter the following information in the Execute VIX Scripts task available on the UCS Director appliance:

1. Select the VM where you want to run the VIX script.

2. Enter the administrator credentials of the VM.

3. Enter the following sample Windows command in the Script box:

C:\\Windows\\system32\\cmd.exe echo 1sttt file > c:\\One1.txt && echo 2nddd file >
c:\\Three.txt

Note

Use "&&" for multiline commands. Multiline commands do not support "&."

4. Check the Output Display option.

After executing the task, you see the following information in the SR log:

Apr 06, 2016 12:06:00 UTC Request Submitted

Apr 06, 2016 12:06:03 UTC Executing workflow item number 1

Apr 06, 2016 12:06:03 UTC Completed workflow item number 0, with status completed

Apr 06, 2016 12:06:09 UTC Executing workflow item number 2

Apr 06, 2016 12:06:00 UTC Trigger context executeWorkflowStep called

Apr 06, 2016 12:06:09 UTC Executing custom action VIX2008 (Execute VIX Script)

Apr 06, 2016 12:06:09 UTC Executing custom action VIX2008 (Execute VIX Script)

Apr 06, 2016 12:06:13 UTC  [VIXActionHandler] - account details VMName : vm-DEF-SR119 , Host: 172.31.234.85, OS Type: microsoft windows server 2012 (64-bit), ExitCode :0

Apr 06, 2016 12:06:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully in 3 seconds

Apr 06, 2016 12:06:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Apr 06, 2016 12:06:13 UTC [Local Input: Select VM = 392)

Apr 06, 2016 12:06:13 UTC [Local Input: Credential type = Login]

Apr 06, 2016 12:06:13 UTC [Local Input: Login =  administrator]

Apr 06, 2016 12:06:13 UTC [Local Input: Password = "masked-value")

Apr 06, 2016 12:06:13 UTC [Local Input: Script - C:\\WINDOWS\\system32\\cmd.exe /c fsutil file x.txt | echo.hi > C:\\util.txt]

Apr 06, 2016 12:06:13 UTC [Local Input: Undo Script =  ]

Apr 06, 2016 12:06:13 UTC (Local Input: Error Codes = ]

Apr 06, 2016 12:06:13 UTC [Local Input: Output display = true]

Apr 06, 2016 12:06:13 UTC (Output: EXIT_STATUS_CODE = 0]

Apr 06, 2016 12:06:13 UTC (Output: ERROR_STATUS_MESSAGE = ]

Apr 06, 2016 12:06:13 UTC Completed workflow item number 1, with status completed

Apr 06, 2016 12:06:13 UTC Completed workflow item number 3

Apr 06, 2016 12:06:13 UTC Completed workflow item number 2, with status completed

As seen in the log, the script returns status code 0, which means that the task has been executed successfully.

A batch file is created in the following location:

/opt/infra/vix_temp_files/vixbatch-04_07_2016_02_01_34_231.bat

The content of the batch file is as follows:

@echo off
echo 1sttt file > c:\\One1.txt && echo 2nddd file > c:\\Three.txt
echo status_code: %ERRORLEVEL%

The output file is created in the following location:

/opt/infra/vix_temp_files/vixoutput-04_07_2016_02_01_34_231.txt

The content of the output file is as follows:

status_code: 0

Executing a Windows Command with Error Codes Specified

In this example, we execute a single-line Windows command using the Execute VIX Script task, with the Output Display option enabled and an error code specified. When the Output Display option is enabled for running Windows commands on a VM, a batch file is created. The batch file contains the command to be executed on the selected VM. An output file captures the status code of the batch file execution.

Enter the following information in the Execute VIX Scripts task available on the UCS Director appliance:

1. Select the VM where you want to run the VIX script.

2. Enter the administrator credentials of the VM.

3. Enter the following invalid Windows command in the Script box:

C:\\WINDOWS\\system32\\cmd.exe mkkdir C:\\test_error_code

4. Enter the error code "9009" in the Error Codes box.

5. Check the Output Display box.

As the user has passed an invalid command and specified the error code (9009), the task checks against the user-provided error code and fails the task.

Service Request ID: 486

Apr 21, 2016 09:05:00 UTC Request Submitted

Apr 21, 2016 09:05:03 UTC Executing workflow item number 1

Apr 21, 2016 09:05:03 UTC Completed workflow item number 0, with status completed

Apr 21, 2016 09:05:09 UTC Executing workflow item number 2

Apr 21, 2016 09:05:00 UTC Trigger context executeWorkflowStep called

Apr 21, 2016 09:05:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 21, 2016 09:05:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 21, 2016 09:05:13 UTC  [VIXActionHandler] - account details VMName : Win_2k12 , Host: 172.31.234.46, OS Type: microsoft windows server 2012 (64-bit), ExitCode :0

Apr 21, 2016 09:05:13 UTC Action Execute VIX Script: Task failed with Error Code: 9009 and status message: "mkkdir"
not recognized as an internal or external command, operable program or batch file

Apr 21, 2016 09:05:13 UTC Task: (vix_script (Execute VIX Script) failed with error - Task failed with Error Code: 9009 and status message: 'mkkdir'
not recognized as an internal or external command, operable program or batch file. , selectedContext=<None>

Apr 21, 2016 09:05:13 UTC Task#1 (vix_script (Execute VIX Script)) failed after 6 seconds

Apr 21, 2016 09:05:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Apr 21, 2016 09:05:13 UTC [Local Input: Select VM = 3312)

Apr 21, 2016 09:05:13 UTC [Local Input: Credential type = Login]

Apr 21, 2016 09:05:13 UTC [Local Input: Login =  administrator]

Apr 21, 2016 09:05:13 UTC [Local Input: Password = "masked-value")

Apr 21, 2016 09:05:13 UTC [Local Input: Script - C:\\WINDOWS\\system32\\cmd.exe mkdir C:\\test_error_code]

Apr 21, 2016 09:05:13 UTC [Local Input: Undo Script =  ]

Apr 21, 2016 09:05:13 UTC (Local Input: Error Codes = 9009]

Apr 21, 2016 09:05:13 UTC [Local Input: Output display = true]

Apr 21, 2016 09:05:13 UTC (Output: EXIT_STATUS_CODE = 9009]

Apr 21, 2016 09:05:13 UTC (Output: ERROR_STATUS_MESSAGE = 'mkkdir' not recognized as an internal or external command, operable program or batch file.]

Apr 21, 2016 09:05:13 UTC Completed workflow item number 1, with status failed

As seen in the log, the script returns status code 9009, which was the value provided in the Error Code field.

If the command is invalid, but the error code is not provided, the task does not check the guest error code against the user field error code. So the task is shown as successful. The task returns an appropriate guest error code as follows:

Service Request ID: 523

Apr 21, 2016 10:05:00 UTC Request Submitted

Apr 21, 2016 10:05:03 UTC Executing workflow item number 1

Apr 21, 2016 10:05:03 UTC Completed workflow item number 0, with status completed

Apr 21, 2016 10:05:09 UTC Executing workflow item number 2

Apr 21, 2016 10:05:00 UTC Trigger context executeWorkflowStep called

Apr 21, 2016 10:05:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 21, 2016 10:05:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 21, 2016 10:05:13 UTC  [VIXActionHandler] - account details VMName : Win_2k12 , Host: 172.31.234.46, OS Type: microsoft windows server 2012 (64-bit), ExitCode :0

Apr 21, 2016 10:05:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully after 3 seconds

Apr 21, 2016 10:05:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Apr 21, 2016 10:05:13 UTC [Local Input: Select VM = 3312)

Apr 21, 2016 10:05:13 UTC [Local Input: Credential type = Login]

Apr 21, 2016 10:05:13 UTC [Local Input: Login =  administrator]

Apr 21, 2016 10:05:13 UTC [Local Input: Password = "masked-value")

Apr 21, 2016 10:05:13 UTC [Local Input: Script - C:\\WINDOWS\\system32\\cmd.exe mkkdir C:\\test_error_code]

Apr 21, 2016 10:05:13 UTC [Local Input: Undo Script =  ]

Apr 21, 2016 10:05:13 UTC (Local Input: Error Codes = ]

Apr 21, 2016 10:05:13 UTC [Local Input: Output display = true]

Apr 21, 2016 10:05:13 UTC (Output: EXIT_STATUS_CODE = 9009]

Apr 21, 2016 10:05:13 UTC (Output: ERROR_STATUS_MESSAGE = 'mkkdir' is not recognized as an internal or external command, operable program or batch file.]

Apr 21, 2016 10:05:13 UTC Completed workflow item number 1, with status completed

Executing a Single-Line Linux Command

In this example, we execute a single-line Linux command using the Execute VIX Script task, with the Output Display option enabled. When the Output Display option is enabled for running Linux commands on a VM, an output file is created. The output file captures the status code of the batch execution.

Enter the following information in the Execute VIX Scripts task available on the UCS Director appliance:

1. Select the VM where you want to run the VIX script.

2. Enter the administrator credentials of the VM.

3. Enter the following sample Linux command in the Script box:

/bin/mkdir /tmp/testdir

4. Check the Output Display box.

After executing the task, you see the following information in the SR log:

Apr 22, 2016 12:06:00 UTC Request Submitted

Apr 22, 2016 12:06:03 UTC Executing workflow item number 1

Apr 22, 2016 12:06:03 UTC Completed workflow item number 0, with status completed

Apr 22, 2016 12:06:09 UTC Executing workflow item number 2

Apr 22, 2016 12:06:00 UTC Trigger context executeWorkflowStep called

Apr 22, 2016 12:06:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 22, 2016 12:06:09 UTC Executing custom action Vix_script (Execute VIX Script)

Apr 22, 2016 12:06:13 UTC  [VIXActionHandler] - account details VMName : vm-DEF-SR119 , Host: 172.31.234.85, OS Type: red hat enterprise linux 4(32-bit), ExitCode :0

Apr 22, 2016 12:06:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully in 4 seconds

Apr 22, 2016 12:06:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Apr 22, 2016 12:06:13 UTC [Local Input: Select VM = 9801)

Apr 22, 2016 12:06:13 UTC [Local Input: Credential type = Login]

Apr 22, 2016 12:06:13 UTC [Local Input: Login =  administrator]

Apr 22, 2016 12:06:13 UTC [Local Input: Password = "masked-value")

Apr 22, 2016 12:06:13 UTC [Local Input: Script - /bin/mkdir /tmp/testdir]

Apr 22, 2016 12:06:13 UTC [Local Input: Undo Script =  ]

Apr 22, 2016 12:06:13 UTC (Local Input: Error Codes = ]

Apr 22, 2016 12:06:13 UTC [Local Input: Output display = true]

Apr 22, 2016 12:06:13 UTC (Output: EXIT_STATUS_CODE = 0]

Apr 22, 2016 12:06:13 UTC (Output: ERROR_STATUS_MESSAGE = ]

Apr 22, 2016 12:06:13 UTC Completed workflow item number 1, with status completed

As seen in the log, the script returns status code 0, which means that the task has been executed successfully.

Unlike Windows, a separate shell script is not created. Only an output file is created. The output file is created in the following location:

/opt/infra/vix_temp_files/vixoutput-04_07_2016_10_03_09_835.txt

The content of the output file is as follows:

status_code: 0

Examples with Output Display Option Disabled

When the Output Display option in the Execute VIX Scripts task is unchecked, the commands are directly executed on the Windows or Linux VM. A batch file or an output file is not created.

The following examples illustrate how you can use the Execute VIX Script Task for running commands on Windows and Linux VMs, with Output Display option not enabled.

- Executing A Single-Line Windows Command

- Executing a Multiline Windows Command

- Executing a Single-Line Linux Command

Executing A Single-Line Windows Command

In this example, we execute a single-line Windows command using the Execute VIX Script task, with the Output Display option disabled. When the Output Display option is unchecked, the Windows command is directly executed on the VM. A Batch file or an output file is not created.

Enter the following information in the Execute VIX Scripts task available on the UCS Director appliance:

1. Select the VM where you want to run the VIX script.

2. Enter the administrator credentials of the VM.

3. Enter the following sample Windows command in the Script box:

C:\\WINDOWS\\system32\\cmd.exe /c mkdir C:\\test_Dir_1234

4. Clear the Output Display box, if it is checked.

After executing the task, you see the following information in the log:

Service Request ID: 458

Mar 21, 2016 10:03:00 UTC Request Submitted

Mar 21, 2016 10:03:03 UTC Executing workflow item number 1

Mar 21, 2016 10:03:03 UTC Completed workflow item number 0, with status completed

Mar 21, 2016 10:03:09 UTC Executing workflow item number 2

Mar 21, 2016 10:03:00 UTC Trigger context executeWorkflowStep called

Mar 21, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Mar 21, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Mar 21, 2016 10:03:13 UTC  [VIXActionHandler] - account details VMName : Win_2k12 , Host: 172.31.234.46, OS Type: microsoft windows server 2012 (64-bit), ExitCode :0

Mar 21, 2016 10:03:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully in 3 seconds

Mar 21, 2016 10:03:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Mar 21, 2016 10:03:13 UTC [Local Input: Select VM = 3312)

Mar 21, 2016 10:03:13 UTC [Local Input: Credential type = Login]

Mar 21, 2016 10:03:13 UTC [Local Input: Login =  administrator]

Mar 21, 2016 10:03:13 UTC [Local Input: Password = "masked-value")

Mar 21, 2016 10:03:13 UTC [Local Input: Script - C:\\WINDOWS\\system32\\cmd.exe /c mkdir C:\\test_Dir_1234]

Mar 21, 2016 10:03:13 UTC [Local Input: Undo Script =  ]

Mar 21, 2016 10:03:13 UTC (Local Input: Error Codes = ]

Mar 21, 2016 10:03:13 UTC [Local Input: Output display = true]

Mar 21, 2016 10:03:13 UTC (Output: EXIT_STATUS_CODE = 0]

Mar 21, 2016 10:03:13 UTC (Output: ERROR_STATUS_MESSAGE = ]

Mar 21, 2016 10:03:13 UTC Completed workflow item number 1, with status completed

Mar 21, 2016 10:03:13 UTC Completed workflow item number 3

Mar 21, 2016 10:03:13 UTC Completed workflow item number 2, with status completed

As seen in the log, the command is executed directly on the VM.

Executing a Multiline Windows Command

In this example, we execute a multiline Windows command using the Execute VIX Script task, with the Output Display option disabled. When the Output Display option is unchecked, the multiline Windows command is directly executed on the VM. A Batch file or an output file is not created.

Enter the following information in the Execute VIX Scripts task available on the UCS Director appliance:

1. Select the VM where you want to run the VIX script.

2. Enter the administrator credentials of the VM.

3. Enter the following sample Windows command in the Script box:

C:\\WINDOWS\\system32\\cmd.exe /c mkdir C:\\testfolder_line1  &&
C:\\WINDOWS\\system32\\cmd.exe /c mkdir C:\\testfolder_line2

4. Clear the Output Display option, if it is checked.

After executing the task, you see the following information in the log:

Service Request ID: 448

Mar 21, 2016 10:03:00 UTC Request Submitted

Mar 21, 2016 10:03:03 UTC Executing workflow item number 1

Mar 21, 2016 10:03:03 UTC Completed workflow item number 0, with status completed

Mar 21, 2016 10:03:09 UTC Executing workflow item number 2

Mar 21, 2016 10:03:00 UTC Trigger context executeWorkflowStep called

Mar 21, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Mar 21, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Mar 21, 2016 10:03:13 UTC  [VIXActionHandler] - account details VMName : Win_2k12 , Host: 172.31.234.46, OS Type: microsoft windows server 2012 (64-bit), ExitCode :0

Mar 21, 2016 10:03:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully in 3 seconds

Mar 21, 2016 10:03:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Mar 21, 2016 10:03:13 UTC [Local Input: Select VM = 3312)

Mar 21, 2016 10:03:13 UTC [Local Input: Credential type = Login]

Mar 21, 2016 10:03:13 UTC [Local Input: Login =  administrator]

Mar 21, 2016 10:03:13 UTC [Local Input: Password = "masked-value")

Mar 21, 2016 10:03:13 UTC [Local Input: Script - C:\\WINDOWS\\system32\\cmd.exe /c mkdir C:\\testfolder_line1  &&
C:\\WINDOWS\\system32\\cmd.exe /c mkdir C:\\testfolder_line2
]

Mar 21, 2016 10:03:13 UTC [Local Input: Undo Script =  ]

Mar 21, 2016 10:03:13 UTC (Local Input: Error Codes = ]

Mar 21, 2016 10:03:13 UTC [Local Input: Output display = true]

Mar 21, 2016 10:03:13 UTC (Output: EXIT_STATUS_CODE = 0]

Mar 21, 2016 10:03:13 UTC (Output: ERROR_STATUS_MESSAGE = ]

Mar 21, 2016 10:03:13 UTC Completed workflow item number 1, with status completed

Mar 21, 2016 10:03:13 UTC Completed workflow item number 3

Mar 21, 2016 10:03:13 UTC Completed workflow item number 2, with status completed

As seen in the log, the command is executed directly on the VM.

Executing a Single-Line Linux Command

In this example, we execute a single-line Linux command using the Execute VIX Script task, with the Output Display option disabled. When the Output Display option is disabled, the Linux command is directly executed on the VM. No output file is created.

Enter the following information in the Execute VIX Scripts task available on the UCS Director appliance:

1. Select the VM where you want to run the VIX script.

2. Enter the administrator credentials of the VM.

3. Enter the following sample Linux command in the Script box:

/bin/mkdir /tmp/testdir1

4. Uncheck the Output Display option, if it has been checked.

After executing the task, you see the following information in the SR log:

Apr 22, 2016 12:06:00 UTC Request Submitted

Apr 22, 2016 12:06:03 UTC Executing workflow item number 1

Apr 22, 2016 12:06:03 UTC Completed workflow item number 0, with status completed

Apr 22, 2016 12:06:09 UTC Executing workflow item number 2

Apr 22, 2016 12:06:00 UTC Trigger context executeWorkflowStep called

Apr 22, 2016 12:06:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 22, 2016 12:06:09 UTC Executing custom action Vix_script (Execute VIX Script)

Apr 22, 2016 12:06:13 UTC  [VIXActionHandler] - account details VMName : vm-DEF-SR119 , Host: 172.31.234.85, OS Type: red hat enterprise linux 4(32-bit), ExitCode :0

Apr 22, 2016 12:06:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully in 4 seconds

Apr 22, 2016 12:06:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Apr 22, 2016 12:06:13 UTC [Local Input: Select VM = 9801)

Apr 22, 2016 12:06:13 UTC [Local Input: Credential type = Login]

Apr 22, 2016 12:06:13 UTC [Local Input: Login =  administrator]

Apr 22, 2016 12:06:13 UTC [Local Input: Password = "masked-value")

Apr 22, 2016 12:06:13 UTC [Local Input: Script - /bin/mkdir /tmp/testdir1]

Apr 22, 2016 12:06:13 UTC [Local Input: Undo Script =  ]

Apr 22, 2016 12:06:13 UTC (Local Input: Error Codes = ]

Apr 22, 2016 12:06:13 UTC [Local Input: Output display = true]

Apr 22, 2016 12:06:13 UTC (Output: EXIT_STATUS_CODE = 0]

Apr 22, 2016 12:06:13 UTC (Output: ERROR_STATUS_MESSAGE = ]

Apr 22, 2016 12:06:13 UTC Completed workflow item number 1, with status completed

As seen in the log, the Linux command is executed directly on the VM.

Executing VIX Scripts Using Rest APIs

The following examples illustrate how you can execute Linux or Windows commands on a VM using the following REST APIs:

- userAPIExecuteVIXScript

- EXECUTE_VIX_SCRIPT

- userAPIExecuteVIXScriptWithOutput

- Executing a Windows Command Using the userAPIExecuteVIXScript API

- Executing a Linux Command Using the userAPIExecuteVIXScript API

- Executing a Windows Command Using EXECUTE_VIX_SCRIPT

- Executing a Linux Command Using the EXECUTE_VIX_SCRIPT API

- Executing Windows Command Using userAPIExecuteVIXScriptWithOutput

- Executing a Linux Command Using the userAPIExecuteVIXScriptWithOutput API

Executing a Windows Command Using the userAPIExecuteVIXScript API

In this example, we execute a Windows command using the userAPIExecuteVIXScript API task. The limitation of this API is that the response shows only the status code, and not the output message.

Enter the following information in the userAPIExecuteVIXScript API task available on the UCS Director appliance:

1. Select the VM where you want to run the VIX script.

2. Enter the administrator credentials of the VM.

3. Click the Generate URL button and enter the following parameters:

/app/api/rest?formatType=json&opName=genericvm:userAPIExecuteVIXScript&opData=
{param0:642,param1:"administrator",param2:"cloupia345",param3:"C:\\WINDOWS\\system32\\cmd.exe mkdir C:\\test_Dir"}

Note

- Here param0 is the VM ID, param1 and param2 provide the administrator credentials for the VM, and param3 is the Windows command.

- Use four backslashes in this API command if the command contains '\'. Verify the script in the service request (SR) logs.

4. Click the Execute REST API button.

When the command is valid, you see the following response:

{ "serviceResult":126, "serviceError":null, "serviceName":"InfraMgr", "opName":"genericvm:userAPIExecuteVIXScript" }

If the command has been executed successfully, you see the following information in the SR log:

Service Request ID: 445

Apr 19, 2016 10:03:00 UTC Request Submitted

Apr 19, 2016 10:03:03 UTC Executing workflow item number 1

Apr 19, 2016 10:03:03 UTC Completed workflow item number 0, with status completed

Apr 19, 2016 10:03:09 UTC Executing workflow item number 2

Apr 19, 2016 10:03:00 UTC Trigger context executeWorkflowStep called

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:13 UTC  [VIXActionHandler] - account details VMName : Win_2k12 , Host: 172.31.234.46, OS Type: microsoft windows server 2012 (64-bit), ExitCode :0

Apr 19, 2016 10:03:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully in 6 seconds

Apr 19, 2016 10:03:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Apr 19, 2016 10:03:13 UTC [Local Input: Select VM = 642)

Apr 19, 2016 10:03:13 UTC [Local Input: Credential type = Login]

Apr 19, 2016 10:03:13 UTC [Local Input: Login =  administrator]

Apr 19, 2016 10:03:13 UTC [Local Input: Password = "masked-value")

Apr 19, 2016 10:03:13 UTC [Local Input: Script - C:\\WINDOWS\\system32\\cmd.exe mkdir C:\\test_Dir]

Apr 19, 2016 10:03:13 UTC [Local Input: Undo Script =  ]

Apr 19, 2016 10:03:13 UTC (Local Input: Error Codes = ]

Apr 19, 2016 10:03:13 UTC [Local Input: Output display = true]

Apr 19, 2016 10:03:13 UTC (Output: EXIT_STATUS_CODE = 0]

Apr 19, 2016 10:03:13 UTC (Output: ERROR_STATUS_MESSAGE = ]

Apr 19, 2016 10:03:13 UTC Completed workflow item number 1, with status completed

As seen in the log, the script returns status code 0, which means that the task has been executed successfully.

If the command is invalid (for example you provide an incorrect command: C:\\WINDOWS\\system32\\cmd.exe testxml), the status code returns an appropriate error code in the SR log:

Service Request ID: 445

Apr 19, 2016 10:03:00 UTC Request Submitted

Apr 19, 2016 10:03:03 UTC Executing workflow item number 1

Apr 19, 2016 10:03:03 UTC Completed workflow item number 0, with status completed

Apr 19, 2016 10:03:09 UTC Executing workflow item number 2

Apr 19, 2016 10:03:00 UTC Trigger context executeWorkflowStep called

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:13 UTC  [VIXActionHandler] - account details VMName : Win_2k12 , Host: 172.31.234.46, OS Type: microsoft windows server 2012 (64-bit), ExitCode :0

Apr 19, 2016 10:03:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully after 6 seconds

Apr 19, 2016 10:03:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Apr 19, 2016 10:03:13 UTC [Local Input: Select VM = 642)

Apr 19, 2016 10:03:13 UTC [Local Input: Credential type = Login]

Apr 19, 2016 10:03:13 UTC [Local Input: Login =  administrator]

Apr 19, 2016 10:03:13 UTC [Local Input: Password = "masked-value")

Apr 19, 2016 10:03:13 UTC [Local Input: Script - C:\\WINDOWS\\system32\\cmd.exe testxml]

Apr 19, 2016 10:03:13 UTC [Local Input: Undo Script =  ]

Apr 19, 2016 10:03:13 UTC (Local Input: Error Codes = ]

Apr 19, 2016 10:03:13 UTC [Local Input: Output display = true]

Apr 19, 2016 10:03:13 UTC (Output: EXIT_STATUS_CODE = 9009]

Apr 19, 2016 10:03:13 UTC (Output: ERROR_STATUS_MESSAGE = 'testxml' is not recognized as an internal or external command, operable program or batch file.]

Apr 19, 2016 10:03:13 UTC Completed workflow item number 1, with status completed

Here the status code 1 means an unknown error.

Executing a Linux Command Using the userAPIExecuteVIXScript API

In this example, we execute a Linux command using the userAPIExecuteVIXScript API task. The limitation of this API is that the response shows only the status code, and not the output message.

Enter the following information in the userAPIExecuteVIXScript API task available on the UCS Director appliance:

1. Select the VM where you want to run the VIX script.

2. Enter the administrator credentials of the VM.

3. Click the Generate URL button and enter the following parameters:

/app/api/rest?formatType=json&opName=genericvm:userAPIExecuteVIXScript&opData=
{param0:279,param1:"root",param2:"cloupia345",param3:"/bin/mkdir /temp/test1"}

Note

Here param0 is the VM ID, param1 and param2 provide the root credentials for the VM, and param3 is the Linux command.

4. Click the Execute REST API button.

When the command is valid, you see the following response:

{ "serviceResult":81, "serviceError":null, "serviceName":"InfraMgr", "opName":"genericvm:userAPIExecuteVIXScript" }

If the command has been executed successfully, you see the following information in the SR log:

Service Request ID: 495

Apr 19, 2016 10:03:00 UTC Request Submitted

Apr 19, 2016 10:03:03 UTC Executing workflow item number 1

Apr 19, 2016 10:03:03 UTC Completed workflow item number 0, with status completed

Apr 19, 2016 10:03:09 UTC Executing workflow item number 2

Apr 19, 2016 10:03:00 UTC Trigger context executeWorkflowStep called

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:13 UTC  [VIXActionHandler] - account details VMName :SDK-VIX, Host :172.29.110.75 , OS Type :red hat enterprise linux 5 (64-bit), ExitCode :0

Apr 19, 2016 10:03:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully in 6 seconds

Apr 19, 2016 10:03:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Apr 19, 2016 10:03:13 UTC [Local Input: Select VM = 279)

Apr 19, 2016 10:03:13 UTC [Local Input: Credential type = Login]

Apr 19, 2016 10:03:13 UTC [Local Input: Login =  administrator]

Apr 19, 2016 10:03:13 UTC [Local Input: Password = "masked-value")

Apr 19, 2016 10:03:13 UTC [Local Input: Script - /bin/mkdir /temp/test1]

Apr 19, 2016 10:03:13 UTC [Local Input: Undo Script =  ]

Apr 19, 2016 10:03:13 UTC (Local Input: Error Codes = ]

Apr 19, 2016 10:03:13 UTC [Local Input: Output display = true]

Apr 19, 2016 10:03:13 UTC (Output: EXIT_STATUS_CODE = 0]

Apr 19, 2016 10:03:13 UTC (Output: ERROR_STATUS_MESSAGE = ]

Apr 19, 2016 10:03:13 UTC Completed workflow item number 1, with status completed

As seen in the log, the script returns status code 0, which means that the task has been executed successfully.

If the command is invalid (for example you provide an incorrect command: ///abcd/test/123), the status code returns an appropriate error code in the SR log:

Service Request ID: 495

Apr 19, 2016 10:03:00 UTC Request Submitted

Apr 19, 2016 10:03:03 UTC Executing workflow item number 1

Apr 19, 2016 10:03:03 UTC Completed workflow item number 0, with status completed

Apr 19, 2016 10:03:09 UTC Executing workflow item number 2

Apr 19, 2016 10:03:00 UTC Trigger context executeWorkflowStep called

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:13 UTC  [VIXActionHandler] - account details VMName :SDK-VIX, Host :172.29.110.75 , OS Type :red hat enterprise linux 5 (64-bit), ExitCode :0

Apr 19, 2016 10:03:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully in 3 seconds

Apr 19, 2016 10:03:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Apr 19, 2016 10:03:13 UTC [Local Input: Select VM = 279)

Apr 19, 2016 10:03:13 UTC [Local Input: Credential type = Login]

Apr 19, 2016 10:03:13 UTC [Local Input: Login =  administrator]

Apr 19, 2016 10:03:13 UTC [Local Input: Password = "masked-value")

Apr 19, 2016 10:03:13 UTC [Local Input: Script - ///abcd/test/123]

Apr 19, 2016 10:03:13 UTC [Local Input: Undo Script =  ]

Apr 19, 2016 10:03:13 UTC (Local Input: Error Codes = ]

Apr 19, 2016 10:03:13 UTC [Local Input: Output display = true]

Apr 19, 2016 10:03:13 UTC (Output: EXIT_STATUS_CODE = 9009]

Apr 19, 2016 10:03:13 UTC (Output: ERROR_STATUS_MESSAGE = 'abcd/test/123' is not recognized as an internal or external command, operable program or batch file.]

Apr 19, 2016 10:03:13 UTC Completed workflow item number 1, with status completed

Here the status code 1 means an unknown error.

Executing a Windows Command Using EXECUTE_VIX_SCRIPT

In this example, we execute a Windows command using the EXECUTE_VIX_SCRIPT API task. The limitation of this API is that the response shows only the status code, and not the output message.

Enter the following information in the EXECUTE_VIX_SCRIPT API task available on the UCS Director appliance:

1. Select the VM where you want to run the VIX script.

2. Enter the administrator credentials of the VM.

3. Enter the following sample Windows command in the Script box:

C:\\WINDOWS\\system32\\cmd.exe mkdir C:\\test_xml_api

4. Click the Execute REST API button.

When the command is valid, you see the following response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cuicOperationResponse>
<Log>
<Messages>1</Messages>
<Message>
<TimeStamp>2016-04-26 08:11:26.864</TimeStamp>
<Severity>INFO</Severity>
<Text>[VIXActionHandler] - account details VMName :SDK-VIX, Host :172.29.110.75 , OS Type :microsoft windows server 2008 r2 (64-bit), ExitCode:0</Text>
</Message>
</Log>
<operationStatus>0</operationStatus>
<response>
<ExecuteVIXScriptResponse>
<EXIT_STATUS_CODE>0</EXIT_STATUS_CODE>
</ExecuteVIXScriptResponse>
</response>
<responsemap>
<entry>
<key>ERROR_STATUS_CODE</key>
<value>0</value>
</entry>
</responsemap>
</cuicOperationResponse>

As seen in the response, the status code returns 0, which means the command has been executed successfully.

If the command is invalid (for example you provide an incorrect command: C:\\WINDOWS\\system32\\cmd.exe testxml), the status code returns an appropriate error code in the Response field:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cuicOperationResponse>
<Log>
<Messages>1</Messages>
<Message>
<TimeStamp>2016-04-26 03:12:29.864</TimeStamp>
<Severity>INFO</Severity>
<Text>[VIXActionHandler] - account details VMName :SDK-VIX, Host :172.29.110.75 , OS Type :red hat enterprise linux 5 (64-bit), ExitCode:0</Text>
</Message>
</Log>
<operationStatus>0</operationStatus>
<response>
<ExecuteVIXScriptResponse>
<EXIT_STATUS_CODE>9009</EXIT_STATUS_CODE>
<ERROR_STATUS_MESSAGE>"testxml" is not recognized as an internal or external command, operable program or batch file.</ERROR_STATUS_MESSAGE>
</ExecuteVIXScriptResponse>
</response>
<responsemap>
<entry>
<key>ERROR_STATUS_CODE</key>
<value>0</value>
</entry>
<entry>
<key>ERROR_STATUS_MESSAGE</key>
<value></value>
</entry>
</responsemap>
</cuicOperationResponse>

Here the status code 1 means an unknown error.

Executing a Linux Command Using the EXECUTE_VIX_SCRIPT API

In this example, we execute a Linux command using the EXECUTE_VIX_SCRIPT API task. The limitation of this API is that the response shows only the status code, and not the output message.

Enter the following information in the EXECUTE_VIX_SCRIPT API task available on the UCS Director appliance:

1. Select the VM where you want to run the VIX script.

2. Enter the administrator credentials of the VM.

3. Enter the following sample Linux command in the Script box:

/bin/date

4. Click the Execute REST API button.

When the command is valid, you see the following response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cuicOperationResponse>
<Log>
<Messages>1</Messages>
<Message>
<TimeStamp>2016-04-26 03:11:26.864</TimeStamp>
<Severity>INFO</Severity>
<Text>[VIXActionHandler] - account details VMName :SDK-VIX, Host :172.29.110.75 , OS Type :red hat enterprise linux 5 (64-bit), ExitCode:0</Text>
</Message>
</Log>
<operationStatus>0</operationStatus>
<response>
<ExecuteVIXScriptResponse>
<EXIT_STATUS_CODE>0</EXIT_STATUS_CODE>
<ERROR_STATUS_MESSAGE></ERROR_STATUS_MESSAGE>
</ExecuteVIXScriptResponse>
</response>
<responsemap>
<entry>
<key>ERROR_STATUS_CODE</key>
<value>0</value>
</entry>
<entry>
<key>ERROR_STATUS_MESSAGE</key>
<value></value>
</entry>
</responsemap>
</cuicOperationResponse>

As seen in the response, the status code returns 0, which means the command has been executed successfully.

If the command is invalid, the status code returns an appropriate error code in the Response field:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cuicOperationResponse>
<Log>
<Messages>1</Messages>
<Message>
<TimeStamp>2016-04-26 03:11:26.864</TimeStamp>
<Severity>INFO</Severity>
<Text>[VIXActionHandler] - account details VMName :SDK-VIX, Host :172.29.110.75 , OS Type :red hat enterprise linux 5 (64-bit), ExitCode:0</Text>
</Message>
</Log>
<operationStatus>0</operationStatus>
<response>
<ExecuteVIXScriptResponse>
<EXIT_STATUS_CODE>1</EXIT_STATUS_CODE>
<ERROR_STATUS_MESSAGE></ERROR_STATUS_MESSAGE>
</ExecuteVIXScriptResponse>
</response>
<responsemap>
<entry>
<key>ERROR_STATUS_CODE</key>
<value>0</value>
</entry>
<entry>
<key>ERROR_STATUS_MESSAGE</key>
<value></value>
</entry>
</responsemap>
</cuicOperationResponse>

Here 1 means an unknown error.

Executing Windows Command Using userAPIExecuteVIXScriptWithOutput

In this example, we execute a Windows command using the userAPIExecuteVIXScriptWithOutput API.

When you execute a Windows command using the userAPIExecuteVIXScriptWithOutput API, the API creates

- An output file (the file extension is .txt) in the file path location, /opt/infra/vix_temp_files.

- An Input/Output report that lists the input parameters and output variables for the workflow task.

- A batch file (the file extension is .bat) to verify the batch command (only for Windows VM).

Enter the following information in the userAPIExecuteVIXScriptWithOutput API task available on the UCS Director appliance:

1. Select the VM where you want to run the VIX script.

2. Enter the administrator credentials of the VM.

3. Click the Generate URL button and enter the following parameters:

/app/api/rest?formatType=json&opName=genericvm:userAPIExecuteVIXScriptWithOutput&opData=
{param0:247,param1:"administrator",param2:"cloupia123",param3:"C:\\WINDOWS\\system32\\cmd.exe echo hi"}

Note

- Here param0 is the VM ID, param1 and param2 provide the administrator credentials for the VM, and param3 is the Windows command.

- For multiline commands, separate each line by \n. For example:

/app/api/rest?formatType=json&opName=genericvm:userAPIExecuteVIXScriptWithOutput&opData=
{param0:247,param1:"administrator",param2:"cloupia123",param3:"C:\\WINDOWS\\system32\\cmd.exe
echo hi\n echo this is secondline"}

4. Click the Execute REST API button.

When the command is valid, you see the following response:

{ "serviceResult":126, "serviceError":null, "serviceName":"InfraMgr", "opName":"genericvm:userAPIExecuteVIXScriptWithOutput" }

If the command has been executed successfully, you see the following information in the SR log:

Service Request ID: 435

Apr 19, 2016 10:03:00 UTC Request Submitted

Apr 19, 2016 10:03:03 UTC Executing workflow item number 1

Apr 19, 2016 10:03:03 UTC Completed workflow item number 0, with status completed

Apr 19, 2016 10:03:09 UTC Executing workflow item number 2

Apr 19, 2016 10:03:00 UTC Trigger context executeWorkflowStep called

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:13 UTC  [VIXActionHandler] - account details VMName : Win_2k12 , Host: 172.31.234.46, OS Type: microsoft windows server 2012 (64-bit), ExitCode :0

Apr 19, 2016 10:03:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully in 6 seconds

Apr 19, 2016 10:03:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Apr 19, 2016 10:03:13 UTC [Local Input: Select VM = 247)

Apr 19, 2016 10:03:13 UTC [Local Input: Credential type = Login]

Apr 19, 2016 10:03:13 UTC [Local Input: Login =  administrator]

Apr 19, 2016 10:03:13 UTC [Local Input: Password = "masked-value")

Apr 19, 2016 10:03:13 UTC [Local Input: Script - /app/api/rest?formatType=json&opName=genericvm:userAPIExecuteVIXScriptWithOutput&opData=
{param0:247,param1:"administrator",param2:"cloupia123",param3:"C:\\WINDOWS\\system32\\cmd.exe echo hi"}
]

Apr 19, 2016 10:03:13 UTC [Local Input: Undo Script =  ]

Apr 19, 2016 10:03:13 UTC (Local Input: Error Codes = ]

Apr 19, 2016 10:03:13 UTC [Local Input: Output display = true]

Apr 19, 2016 10:03:13 UTC (Output: EXIT_STATUS_CODE = 0]

Apr 19, 2016 10:03:13 UTC (Output: ERROR_STATUS_MESSAGE = ]

Apr 19, 2016 10:03:13 UTC Completed workflow item number 1, with status completed

As seen in the log, the script returns status code 0, which means that the task has been executed successfully.

The API also creates an Input/Output report that lists the input parameters and output variables (status code and status message) for the workflow task.

When an invalid Windows command is sent through “userAPIExecuteVIXScriptWithOutput” API, you see the following report in the SR log:

Service Request ID: 435

Apr 19, 2016 10:03:00 UTC Request Submitted

Apr 19, 2016 10:03:03 UTC Executing workflow item number 1

Apr 19, 2016 10:03:03 UTC Completed workflow item number 0, with status completed

Apr 19, 2016 10:03:09 UTC Executing workflow item number 2

Apr 19, 2016 10:03:00 UTC Trigger context executeWorkflowStep called

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:13 UTC  [VIXActionHandler] - account details VMName : Win_2k12 , Host: 172.31.234.46, OS Type: microsoft windows server 2012 (64-bit), ExitCode :0

Apr 19, 2016 10:03:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully in 9 seconds

Apr 19, 2016 10:03:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Apr 19, 2016 10:03:13 UTC [Local Input: Select VM = 247)

Apr 19, 2016 10:03:13 UTC [Local Input: Credential type = Login]

Apr 19, 2016 10:03:13 UTC [Local Input: Login =  administrator]

Apr 19, 2016 10:03:13 UTC [Local Input: Password = "masked-value")

Apr 19, 2016 10:03:13 UTC [Local Input: Script - /app/api/rest?formatType=json&opName=genericvm:userAPIExecuteVIXScriptWithOutput&opData=
{param0:247,param1:"administrator",param2:"cloupia123",param3:"C:\\WINDOWS\\system32\\cmd.exe whatsapp"}
]

Apr 19, 2016 10:03:13 UTC [Local Input: Undo Script =  ]

Apr 19, 2016 10:03:13 UTC (Local Input: Error Codes = ]

Apr 19, 2016 10:03:13 UTC [Local Input: Output display = true]

Apr 19, 2016 10:03:13 UTC (Output: EXIT_STATUS_CODE = 9009]

Apr 19, 2016 10:03:13 UTC (Output: ERROR_STATUS_MESSAGE = 'whatsapp' is not recognized as an internal or external command, operable program or batch file.]

Apr 19, 2016 10:03:13 UTC Completed workflow item number 1, with status completed

As seen in the log, the script returns an appropriate status code and an error message that the command is invalid. The same error status code and error status message also appear in the Input/Output report.

The API creates a batch file in the following location:

/opt/infra/vix_temp_files/vixbatch-04_07_2016_02_01_34_231.bat

The API creates an output file in the following location:

/opt/infra/vix_temp_files/vixoutput-04_07_2016_02_01_34_231.txt

Executing a Linux Command Using the userAPIExecuteVIXScriptWithOutput API

In this example, we execute a Linux command using the userAPIExecuteVIXScriptWithOutput API.

Enter the following information in the userAPIExecuteVIXScriptWithOutput API task available on the UCS Director appliance:

1. Select the VM where you want to run the VIX script.

2. Enter the administrator credentials of the VM.

3. Click the Generate URL button and enter the following parameters:

/app/api/rest?formatType=json&opName=genericvm:userAPIExecuteVIXScriptWithOutput&opData=
{param0:244,param1:"root",param2:"cloupia123",param3:"/bin/date"}

Note

Here param0 is the VM ID, param1 and param2 provide the administrator credentials for the VM, and param3 is the Linux command.

4. Click the Execute REST API button.

When the command is valid, you see the following response:

{ "serviceResult":228, "serviceError":null, "serviceName":"InfraMgr", "opName":"genericvm:userAPIExecuteVIXScriptWithOutput" }

If the command has been executed successfully, you see the following information in the SR log:

Service Request ID: 491

Apr 19, 2016 10:03:00 UTC Request Submitted

Apr 19, 2016 10:03:03 UTC Executing workflow item number 1

Apr 19, 2016 10:03:03 UTC Completed workflow item number 0, with status completed

Apr 19, 2016 10:03:09 UTC Executing workflow item number 2

Apr 19, 2016 10:03:00 UTC Trigger context executeWorkflowStep called

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:13 UTC  [VIXActionHandler] - account details VMName :SDK-VIX, Host :172.29.110.75 , OS Type :red hat enterprise linux 5 (64-bit), ExitCode :0

Apr 19, 2016 10:03:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully in 6 seconds

Apr 19, 2016 10:03:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Apr 19, 2016 10:03:13 UTC [Local Input: Select VM = 244)

Apr 19, 2016 10:03:13 UTC [Local Input: Credential type = Login]

Apr 19, 2016 10:03:13 UTC [Local Input: Login =  administrator]

Apr 19, 2016 10:03:13 UTC [Local Input: Password = "masked-value")

Apr 19, 2016 10:03:13 UTC [Local Input: Script - /bin/date}
]

Apr 19, 2016 10:03:13 UTC [Local Input: Undo Script =  ]

Apr 19, 2016 10:03:13 UTC (Local Input: Error Codes = ]

Apr 19, 2016 10:03:13 UTC [Local Input: Output display = true]

Apr 19, 2016 10:03:13 UTC (Output: EXIT_STATUS_CODE = 0]

Apr 19, 2016 10:03:13 UTC (Output: ERROR_STATUS_MESSAGE = ]

Apr 19, 2016 10:03:13 UTC Completed workflow item number 2, with status completed

As seen in the log, the script returns status code 0, which means that the task has been executed successfully.

The API also creates an Input/Output report that lists the input parameters and output variables (status code and status message) for the workflow task.

When an invalid Linux command (for example, "abcd") is sent through “userAPIExecuteVIXScriptWithOutput” API, you see the following report in the SR log:

Service Request ID: 491

Apr 19, 2016 10:03:00 UTC Request Submitted

Apr 19, 2016 10:03:03 UTC Executing workflow item number 1

Apr 19, 2016 10:03:03 UTC Completed workflow item number 0, with status completed

Apr 19, 2016 10:03:09 UTC Executing workflow item number 2

Apr 19, 2016 10:03:00 UTC Trigger context executeWorkflowStep called

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:09 UTC Executing custom action vix_script (Execute VIX Script)

Apr 19, 2016 10:03:13 UTC  [VIXActionHandler] - account details VMName :SDK-VIX, Host :172.29.110.75 , OS Type :red hat enterprise linux 5 (64-bit), ExitCode :0

Apr 19, 2016 10:03:13 UTC Task#1 (vix_script (Execute VIX Script)) completed successfully in 9 seconds

Apr 19, 2016 10:03:13 UTC Input/Output values for Task#1 (vix_script (Execute VIX Script)):

Apr 19, 2016 10:03:13 UTC [Local Input: Select VM = 244)

Apr 19, 2016 10:03:13 UTC [Local Input: Credential type = Login]

Apr 19, 2016 10:03:13 UTC [Local Input: Login =  administrator]

Apr 19, 2016 10:03:13 UTC [Local Input: Password = "masked-value")

Apr 19, 2016 10:03:13 UTC [Local Input: Script - abcd}

Apr 19, 2016 10:03:13 UTC [Local Input: Undo Script = null]

Apr 19, 2016 10:03:13 UTC (Output: EXIT_STATUS_CODE = 127]

Apr 19, 2016 10:03:13 UTC (Output: ERROR_STATUS_MESSAGE = sh:abcd: command not found]

Apr 19, 2016 10:03:13 UTC Completed workflow item number 2, with status completed

As seen in the log, the script returns an appropriate status code and an error message that the command is invalid. The same error status code and error status message also appear in the input/output report.

Chapter 3. Executing Commands through the Execute VM Command Task

This chapter contains the following sections:

- Execute VM Command Task

- Execute VM Command Task Examples

Execute VM Command Task

You can also execute commands on guest VMs using the Execute VM Command task available from the UCS Director task library. Execute VM Command allows you to perform guest OS operations by running commands through either PowerShell or the command prompt.

To run PowerShell commands, provide the following in the Command Path field in the Execute VM Command task:

- The path of PowerShell

- The command along with the arguments

To run commands through the command prompt, provide the following in the Execute VM Command task:

- The path of cmd.exe in the Command Path field

- The command along with arguments in the Command Arguments field

Limitations:

The Execute VM Command task, however, has the following limitations:

- Does not support rollback function

- No exit-code based error validation

- Does not capture command or script outputs

Execute VM Command Task Examples

The following examples illustrate how you can execute Linux or Windows commands on a VM using the Execute VM Command task.

- Executing a Windows Command at PowerShell

- Executing a Windows Command at Command Prompt

- Executing a Linux Command at Command Prompt

Executing a Windows Command at PowerShell

In this example, we execute a Windows command at PowerShell by using the Execute VM Command task. To execute a command at PowerShell, provide the path of PowerShell and the command.

Enter the following information in the Execute VM Command task available on the UCS Director appliance:

1. Select the VM where you want to execute the Windows command.

2. Enter the administrator credentials of the VM.

3. In the Command Path box, enter the path of PowerShell and the command:

C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\PowerShell.exe Get-NetAdapter | Where-Object {$_.Status -eq ‘UP’} | Set-DNSClientServerAddress -ServerAddresses ('${DNS1}','${DNS2}')

Note

Here DNS1 and DNS2 are defined workflow inputs.

After executing the task, you see the following information in the SR log:

Service request ID: 734
Workflow Inputs:
- DNS1
- DNS2

Apr 26, 2016 12:06:00 UTC Request Submitted

Apr 26, 2016 12:06:03 UTC Executing workflow item number 1

Apr 26, 2016 12:06:03 UTC Completed workflow item number 0, with status completed

Apr 26, 2016 12:06:09 UTC Executing workflow item number 2

Apr 26, 2016 12:06:00 UTC Trigger context executeWorkflowStep called

Apr 26, 2016 12:06:09 UTC Executing custom action Execute_VM_Command(Execute VM Command)

Apr 26, 2016 12:06:09 UTC Executing custom action Execute_VM_Command(Execute VM Command)

Apr 26, 2016 12:06:13 UTC Task#1 (Execute_VM_Command(Execute VM Command)) completed successfully in 3 seconds

Apr 26, 2016 12:06:13 UTC Input/Output values for Task#1 (Execute_VM_Command(Execute VM Command)):

Apr 26, 2016 12:06:13 UTC [Local Input: Select VM = 3312)

Apr 26, 2016 12:06:13 UTC [Local Input: Login =  administrator]

Apr 26, 2016 12:06:13 UTC [Local Input: Password = "masked-value")

Apr 26, 2016 12:06:13 UTC [Template Input: Command Path = C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\PowerShell.exe Get-NetAdapter | Where-Object {$_.Status -eq ‘UP’} | Set-DNSClientServerAddress -ServerAddresses ('${DNS1}','${DNS2}')]

Apr 26, 2016 12:06:13 UTC [Resolved Template Input: Command Path = C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\PowerShell.exe Get-NetAdapter | Where-Object {$_.Status -eq ‘UP’} | Set-DNSClientServerAddress -ServerAddresses ('10.10.10.10','20.20.20.20')]

Apr 26, 2016 12:06:13 UTC [Local Input: Command Path = C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\PowerShell.exe Get-NetAdapter | Where-Object {$_.Status -eq ‘UP’} | Set-DNSClientServerAddress -ServerAddresses ('10.10.10.10','20.20.20.20')]

Apr 26, 2016 12:06:13 UTC [Local Input: Command Arguments = ]

Apr 26, 2016 12:06:13 UTC Completed workflow item number 1, with status completed

Apr 26, 2016 12:06:13 UTC Completed workflow item number 3

Apr 26, 2016 12:06:13 UTC Completed workflow item number 2, with status completed

Executing a Windows Command at Command Prompt

In this example, we execute a Windows command at Command prompt by using the Execute VM Command task. To execute a command at command prompt, provide the path of cmd.exe in the command path. Also provide the command and the comma-separated arguments in the Command Arguments field.

Enter the following information in the Execute VM Command task available on the UCS Director appliance:

1. Select the VM where you want to execute the Windows command.

2. Enter the administrator credentials of the VM.

3. Enter the path of cmd.exe in the Command Path field as follows:

C:\\WINDOWS\\system32\\cmd.exe

4. Enter the command and the comma-separated arguments in the Command Arguments field:

mkdir C:\\testDir1,C:\\testDir2,C:\\testDir3

After executing the task, you see the following information in the SR log:

Service request ID: 534

Apr 06, 2016 12:06:00 UTC Request Submitted

Apr 06, 2016 12:06:03 UTC Executing workflow item number 1

Apr 06, 2016 12:06:03 UTC Completed workflow item number 0, with status completed

Apr 06, 2016 12:06:09 UTC Executing workflow item number 2

Apr 06, 2016 12:06:00 UTC Trigger context executeWorkflowStep called

Apr 06, 2016 12:06:09 UTC Executing custom action Execute_VM_Command(Execute VM Command)

Apr 06, 2016 12:06:09 UTC Executing custom action Execute_VM_Command(Execute VM Command)

Apr 06, 2016 12:06:13 UTC Task#1 (Execute_VM_Command(Execute VM Command)) completed successfully in 3 seconds

Apr 06, 2016 12:06:13 UTC Input/Output values for Task#1 (Execute_VM_Command(Execute VM Command)):

Apr 06, 2016 12:06:13 UTC [Local Input: Select VM = 3312)

Apr 06, 2016 12:06:13 UTC [Local Input: Login =  administrator]

Apr 06, 2016 12:06:13 UTC [Local Input: Password = "masked-value")

Apr 06, 2016 12:06:13 UTC [Local Input: Command Path = C:\\WINDOWS\\system32\\cmd.exe]

Apr 06, 2016 12:06:13 UTC [Local Input: Command Arguments = mkdir C:\\testDir1,C:\\testDir2,C:\\testDir3]

Apr 06, 2016 12:06:13 UTC Completed workflow item number 1, with status completed

Apr 06, 2016 12:06:13 UTC Completed workflow item number 3

Apr 06, 2016 12:06:13 UTC Completed workflow item number 2, with status completed

Executing a Linux Command at Command Prompt

In this example, we execute a Linux command at Command prompt by using the Execute VM Command task.

Enter the following information in the Execute VM Command task available in the UCS Director appliance:

1. Select the VM where you want to run the Linux command.

2. Enter the administrator credentials of the VM.

3. Enter the sample Linux command in the Command Path box:

/bin/mkdir

4. Enter the command in the Command Arguments box:

/opt/testDirectory

After executing the task, you see the following information in the SR log:

Service request ID: 445

Apr 06, 2016 12:06:00 UTC Request Submitted

Apr 06, 2016 12:06:03 UTC Executing workflow item number 1

Apr 06, 2016 12:06:03 UTC Completed workflow item number 0, with status completed

Apr 06, 2016 12:06:09 UTC Executing workflow item number 2

Apr 06, 2016 12:06:00 UTC Trigger context executeWorkflowStep called

Apr 06, 2016 12:06:09 UTC Executing custom action Execute_VM_Command(Execute VM Command)

Apr 06, 2016 12:06:09 UTC Executing custom action Execute_VM_Command(Execute VM Command)

Apr 06, 2016 12:06:13 UTC Task#1 (Execute_VM_Command(Execute VM Command)) completed successfully in 3 seconds

Apr 06, 2016 12:06:13 UTC Input/Output values for Task#1 (Execute_VM_Command(Execute VM Command)):

Apr 06, 2016 12:06:13 UTC [Local Input: Select VM = 2339)

Apr 06, 2016 12:06:13 UTC [Local Input: Login =  administrator]

Apr 06, 2016 12:06:13 UTC [Local Input: Password = "masked-value")

Apr 06, 2016 12:06:13 UTC [Local Input: Command Path = /bin/mkdir]

Apr 06, 2016 12:06:13 UTC [Local Input: Command Arguments = mkdir /opt/testDirectory]

Apr 06, 2016 12:06:13 UTC Completed workflow item number 1, with status completed

Apr 06, 2016 12:06:13 UTC Completed workflow item number 3

Apr 06, 2016 12:06:13 UTC Completed workflow item number 2, with status completed

Chapter 4. Troubleshooting

This chapter contains the following sections:

- Debugging VIX Commands

- Escaping Spaces in a Windows Command

Debugging VIX Commands

Problem

Unable to execute VIX commands on a guest VM.

Solution

When you are unable to run a VIX command on a guest VM, you can run "cuicGuestCommand" at the UCS Director root shell. This command identifies whether the problem is because of lack of connectivity, an authentication error, or an incorrect command syntax.

Example

In the following example, we run the "cuicGuestCommand" at the UCSD root shell and identify that the problem is due to a file being not found.

[root@localhost vmsetup]# /opt/infra/inframgr/vmsetup/cuicGuestCommand http://192.0.2.1/sdk user903 pass103 "[TME_Demo_Prod_DS01] Dev_VM_SR344/Dev_VM_SR344.vmx" administrator pass1234 C:\Windows\System32\cscript.exe
DEBUG: Success jobHandle  34603071
DEBUG: Success hostHandle 34603070
DEBUG: Before Opening VM
DEBUG: Opening VM....
DEBUG: Opened the VM
DEBUG: waiting for tools
DEBUG: tools up
DEBUG: logged in to guest
DEBUG: about to execute remote command
DEBUG: about to execute remote command C:WindowsSystem32cscript.exe
DEBUG: with args
failed to run program in virtual machine 4 ((null))
VMWARE_VIX_ERROR_CODE=4
VMWARE_VIX_ERROR_DESC=A file was not found

Escaping Spaces in a Windows Command

Problem

Unable to run a Windows command that contains spaces, when using the Execute VIX Script task.

Solution

To escape spaces in a command running on a Windows Guest VM, use the double quotes.

Example

Suppose that you want to add a domain group called "Sales Group" to a local administrators group in a Windows guest VM.

As the domain group contains a space (between Sales and Group), use double quotes. The syntaxes to run the command are as follows.

To run the command directly on the Windows Guest VM:

C:\Windows\System32\net.exe localgroup Administrators “Sales Group@domain.com” /ADD

To run the command through the Execute VIX Script Task (without ${Variable}):

C:\\Windows\\System32\\net.exe localgroup Administrators  \"“Sales Group@domain.com\"”  /ADD

To run the command through the Execute VIX Script Task (with ${Variable}):

C:\\\\Windows\\\\System32\\\\net.exe localgroup Administrators  \\”“${DomainGroup}\\"”  /ADD

Preface

- Audience

- Conventions

- Related Documentation

- Documentation Feedback

- Obtaining Documentation and Submitting a Service Request

Audience

This guide is intended primarily for data center administrators who use and who have responsibilities and expertise in one or more of the following:

- Server administration

- Storage administration

- Network administration

- Network security

- Virtualization and virtual machines

Conventions

Text Type

Indication

GUI elements

GUI elements such as tab titles, area names, and field labels appear in this font.

Main titles such as window, dialog box, and wizard titles appear in this font.

Document titles

Document titles appear in this font.

TUI elements

In a Text-based User Interface, text the system displays appears in this font.

System output

Terminal sessions and information that the system displays appear in this font.

CLI commands

CLI command keywords appear in this font.

Variables in a CLI command appear in this font.

[ ]

Elements in square brackets are optional.

{x | y | z}

Required alternative keywords are grouped in braces and separated by vertical bars.

[x | y | z]

Optional alternative keywords are grouped in brackets and separated by vertical bars.

string

A nonquoted set of characters. Do not use quotation marks around the string or the string will include the quotation marks.

< >

Nonprinting characters such as passwords are in angle brackets.

[ ]

Default responses to system prompts are in square brackets.

!, #

An exclamation point (!) or a pound sign (#) at the beginning of a line of code indicates a comment line.

Note

Means reader take note. Notes contain helpful suggestions or references to material not covered in the document.

Caution

Means reader be careful. In this situation, you might perform an action that could result in equipment damage or loss of data.

Tip

Means the following information will help you solve a problem. The tips information might not be troubleshooting or even an action, but could be useful information, similar to a Timesaver.

Timesaver

Means the described action saves time. You can save time by performing the action described in the paragraph.

Warning

IMPORTANT SAFETY INSTRUCTIONS

This warning symbol means danger. You are in a situation that could cause bodily injury. Before you work on any equipment, be aware of the hazards involved with electrical circuitry and be familiar with standard practices for preventing accidents. Use the statement number provided at the end of each warning to locate its translation in the translated safety warnings that accompanied this device.

SAVE THESE INSTRUCTIONS

Related Documentation

Cisco UCS Director Documentation Roadmap

For a complete list of Cisco UCS Director documentation, see the Cisco UCS Director Documentation Roadmap available at the following URL: Click Here .

Cisco UCS Documentation Roadmaps

For a complete list of all B-Series documentation, see the Cisco UCS B-Series Servers Documentation Roadmap available at the following URL: Click Here .

For a complete list of all C-Series documentation, see the Cisco UCS C-Series Servers Documentation Roadmap available at the following URL: Click Here .

Note

The Cisco UCS B-Series Servers Documentation Roadmap includes links to documentation for Cisco UCS Manager and Cisco UCS Central. The Cisco UCS C-Series Servers Documentation Roadmap includes links to documentation for Cisco Integrated Management Controller.

Documentation Feedback

To provide technical feedback on this document, or to report an error or omission, please send your comments to ucs-director-docfeedback@cisco.com. We appreciate your feedback.

Obtaining Documentation and Submitting a Service Request

For information on obtaining documentation, using the Cisco Bug Search Tool (BST), submitting a service request, and gathering additional information, see What's New in Cisco Product Documentation.

To receive new and revised Cisco technical content directly to your desktop, you can subscribe to the What's New in Cisco Product Documentation RSS feed. RSS feeds are a free service.

THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.

THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.

The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.

NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS" WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.

IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.

Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: Click Here . Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)