Using Shell Commands

This chapter contains the following sections:

General Administration

This section describes how to execute common administration tasks such as changing your password, stopping and starting services, generating log and report data, as well as other common system administration tasks.

Examining the Version Information

You can verify the Cisco UCS Director version and build number by choosing Show Version. This information is required for debugging purposes.

Procedure


Step 1

From the Cisco UCS Director Shell menu choose Show Version and press Enter.

Information similar to the following is displayed:
Cisco UCS Director Platform
------------------
Version      : 5.4.0.0
Build Number : 22
Press return to continue ...
Step 2

Press Enter to complete the process.


Changing Your Password

You can change your Cisco UCS Director shell password by choosing Change ShellAdmin password.

Procedure


Step 1

From the Cisco UCS Director Shell menu, choose Change ShellAdmin password and press Enter. The following information is displayed:

Changing password for user shelladmin.
New password:
Step 2

Enter your new UNIX password and press the Enter key.

Step 3

Enter your new UNIX password once again and press the Enter key. The following information is displayed:

passwd: all authentication tokens updated successfully. 
Press return to logout...

Synchronizing the System Time

You can synchronize the system time to the hardware time and the NTP server by choosing Time Sync.

Procedure


Step 1

From the Cisco UCS Director Shell menu, choose Time Sync.

Step 2

Press Enter.

The following information is displayed:
 
Time Sync......
System time is Thu Feb 11 17:41:18 UTC 2021
Hardware time is Thu 11 Feb 2021 05:41:19 PM UTC -0.569097 seconds
Do you want to sync systemtime [y/n]? y
System time reset to hardware clock
Do you want to sync to NTP [y/n]? y
NTP Server(s):
0.centos.pool.ntp.org
1.centos.pool.ntp.org
2.centos.pool.ntp.org
3.centos.pool.ntp.org
Enter NTP server to sync time with: 171.68.38.65
Step 3

Enter the NTP server hostname or IP address, and press Enter to synchronize to the NTP server.

The following information is displayed:

Enter NTP server to sync time with: 171.68.38.65
2021-02-11T17:41:50Z chronyd version 3.4 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +SECHASH +IPV6 +DEBUG)
2021-02-11T17:41:54Z System clock wrong by 199.380705 seconds (step)
2021-02-11T17:45:13Z chronyd exiting
Synchronized time with NTP server '171.68.38.65'
Added NTP server '171.68.38.65' to /etc/chrony.conf
Press return to continue ...
Once you have entered an NTP server hostname or IP address, it is added to the list of available NTP servers for future synchronization.
Step 4

Press the Enter key to complete the process.


Applying a Patch to Cisco UCS Director

Choose this option to apply a patch to the appliance.


Note

The patch file (zip file) is provided by Cisco UCS Director. Before applying a patch:

  • Review the patch release notes and the Readme file.

  • Take a snapshot of your VM.

  • Take a backup of your database prior to applying the patch. The Apply Patch option allows you to take a backup as part of the Apply Patch procedure; but the best practice is to take a backup immediately before using the Apply Patch option.

  • Stop the appliance services.


Before you begin

  • Download the patch file

  • Place the file in a web server or FTP, SFTP, or SCP server

  • Choose Apply Patch from the Cisco UCS Director Shell menu

  • Provide patch URL (http://WebServer/TestPkg.zip)

Procedure


Step 1

From the Cisco UCS Director Shell menu, choose Apply Patch and press Enter.

The following information is displayed:

Applying Patch...
Services will be stopped before upgrade. Do you want to stop the services? [y/n]:
Step 2

Enter y, and press Enter, the services are stopped.


Stopping services...
Stopping services... done
Do you want to take database backup before applying patch? [y/n]:
Step 3

If you entered n, enter the mode of transfer and press Enter and provide the required information, as follows:

  • SFTP—Enter the SFTP server IP address, server login name and password, and the path to the location where you have stored the upgrade file.
  • SCP—Enter the SCP server IP address, server login name and password, and the path to the location where you have stored the upgrade file.
  • FTP—Enter the FTP server IP address, server login name and password, and the path to the location where you have stored the upgrade file. For example, ftp://username:password@hostname\IP_address/software_location_and_name.
  • HTTP—Enter the URL for the location where you stored the upgrade file.
  • FILE—Enter the path to the local directory where you have stored the upgrade file.

n
User selected option not to take backup, proceeding with applying patch
Specify the Transfer mode [ftp sftp scp http file]: sftp
Server IP Address: XXX.XX.XXX.XXX
Server Username: XXXXX
Server Password:
SFTP Path to Patch Zip file: cucsd_patch_6_7_0_0_61705.zip
Apply the patch 'cucsd_patch_6_7_0_0_61705.zip'? [y/N]:
Note 

Refer to the ReadMe file for information about the patches.

Note 

Only from Release 6.5, the mode of transfer such as SFTP, SCP, HTTP, and File are supported. This step is applicable only from Release 6.5.

Step 4

If you entered Y and press Enter the backup process starts. Enter the transfer mode and press Enter, and provide the required information.


The backup process creates a <filename>.tar.gz file on the system running Cisco UCS Director.
You can copy the file to another server using ftp, sftp, or scp protocol.
Specify the Transfer mode [ftp sftp scp]: sftp
Specify the necessary login credentials
Server IP Address: XXX.XX.XXX.XXX
Server Username: XXXXX
Server Password:
Specify the sub-directory (from Home directory) to store the file.
Do you want to just use your home directory [y/n]? y
Taking backup of db_private_admin database......................... done
Taking backup of confmgr_production database.... done
Creating database backup archive... done
Database backup archive: /tmp/database_backup.tar.gz
LOG_FILE=/var/log/ucsd/dba.log
File integrity check is successfull
Warning: Permanently added 'XXX.XX.XXX.XXX' (ECDSA) to the list of known hosts.
File has been copied successfully
Database backup done successfully, proceeding with applying patch
Enter patch file download protocol [sftp scp ftp http file]:sftp
   Server IP Address: XXX.XX.XXX.XXX
   Server Username: xxxx
   Server Password:
   Enter SFTP Path to Patch Zip file:
SFTP Path to Patch Zip file: cucsd_patch_6_7_0_0_61705.zip
Apply the patch 'cucsd_patch_6_7_0_0_61705.zip'? [y/n]: 
Note 

Refer to the ReadMe file for information about the patches.

Note 

Only from Release 6.5, the mode of transfer such as SFTP, SCP, HTTP, and File are supported. Hence, for earlier versions, only FTP transfer mode details are displayed.

Step 5

If you are prompted to confirm that you want to apply the patch, enter y, then press Enter.

The following information is displayed:

y
Checking if the database is running... yes
Downloading the patch...
Successfully Connected to XXX.XX.XXX.XXX
Completed downloading the patch.

What to do next

After the patch is applied, start the services on the appliance using the Start Services option.

Applying a Signed Patch to Cisco UCS Director

Procedure


Step 1

From the Cisco UCS Director Shell menu, choose Apply Signed Patch and press Enter.

The following information is displayed:

Applying Patch...
Services will be stopped before upgrade. Do you want to continue? [y/n]: 
Step 2

Enter y and press Enter.

The following information is displayed:

Stopping services...
Do you want to take database backup before applying patch? [y/n]: 
Step 3

If you entered Y and press Enter the backup process starts. Enter the transfer mode and press Enter.


The backup process creates a <filename>.tar.gz file on the system running Cisco UCS Director.
You can copy this file to another server using the ftp sftp scp mode.
Specify the transfer mode and login credentials
Specify the transfer mode [ftp sftp scp]:
   Specify the Transfer mode [ftp sftp scp]: sftp
   Specify the necessary login credentials
   Server IP Address: 172.29.160.111
   Server Username: root
   Server Password:
Specify the sub-directory (from Home directory) to store the file.
Do you want to just use your home directory [y/n]? y
Taking backup of db_private_admin database..........Done
Creating database backup archive... done
Database backup archive: /tmp/database_backup.tar.gz
LOG_FILE=/var/log/ucsd/dba.log
File integrity check is successfull
Warning: Permanently added 'XXX.XX.XXX.XXX' (ECDSA) to the list of known hosts.
File has been copied successfully
Database backup done successfully, proceeding with applying patch
Enter patch file download protocol [sftp scp ftp http file]:sftp
   Server IP Address: XXX.XX.XXX.XXX
   Server Username: xxxx
   Server Password:
   Enter SFTP Path to Patch Zip file:
Apply the patch '/opt/mytest123/cucsd_patch_6_7_0_0_67341_signed.zip? [y/n]:
Note 

Refer to the ReadMe file for information about the patches.

Step 4

If you entered n, enter the desired patch file download protocol and press Enter and provide the required information, as follows:

  • SFTP—Enter the SFTP server IP address, server login name and password, and the path to the location where you have stored the signed zip file.
  • SCP—Enter the SCP server IP address, server login name and password, and the path to the location where you have stored the signed zip file.
  • FTP—Enter the FTP server IP address, server login name and password, and the path to the location where you have stored the signed zip file. For example, ftp://username:password@hostname\IP_address/software_location_and_name.
  • HTTP—Enter the URL for the location where you stored the signed zip file.
  • FILE—Enter the path to the local directory where you have stored the signed zip file.

n
User selected option not to take backup, proceeding with applying patch.
Enter patch file download protocol [ftp sftp scp http file]: scp
Server IP Address: xxx.xx.xxx.xxx
Server Username: root
Server Password:
Full Patch to Patch Zip File: /opt/mytest123/cucsd_patch_6_7_0_0_67341_signed.zip
Apply the patch '/opt/mytest123/cucsd_patch_6_7_0_0_67341_signed.zip? [y/n]:
Step 5

If you are prompted to confirm that you want to apply the patch, enter y, then press Enter.

The following information is displayed:

y
Checking if database is running ...yes
Downloading the patch...
Successfully Connected to xxx.xx.xxx.xxx
Completed downloading the patch.
Verifying patch signature...
Successfully verified the signature of patch file /opt/mytest123/cucsd_patch_6_7_0_0_67341_signed.zip
Proceeding with patch installation
Note 

From this release, you can use the Apply Signed Patch option in the Shell menu to apply signed patch. If you want to upgrade to release 6.5, you should download the signed zip files, extract the files and follow the instructions available in the ReadMe file to manually verify the signature of the patch. Once the image is verified, you can apply the patch zip file using the Apply Patch option.


Shutting Down the Appliance

Choose this option to shut down a Cisco UCS Director appliance.

Procedure


Step 1

From the Cisco UCS Director Shell menu, choose the Shutdown Appliance option and press Enter.

The following information is displayed.
 Do you want to Shutdown appliance [y/n] ?: 
Step 2

Enter y to shut down the appliance. The following information is displayed:

Shutting down the Cisco UCS Director Appliance....
Step 3

Press the Enter key to return to the main menu.


Rebooting an Appliance

Choose this option to reboot a Cisco UCS Director appliance.

Procedure


Step 1

From the Cisco UCS Director Shell menu, choose the Reboot Appliance option and press the Enter key.

The following information displays:
 Do you want to Reboot appliance [y/n] ?:  
 
Step 2

Enter y to reboot the appliance. The following information is displayed:


Rebooting the Cisco UCS Director Appliance...
Broadcast message from root (pts/5) (Wed Sep 18 13:12:06 2013):

The system is going down for reboot NOW!
Rebooting successful
Press return to continue...
Step 3

Press the Enter key to return to the main menu.


Using a Multi-Node Setup

The multi-node setup is supported for Cisco UCS Director on VMware vSphere only. With a multi-node setup, you can scale Cisco UCS Director to support a larger number of VMs than is supported by a single installation of Cisco UCS Director. This setup has the following nodes:

  • Database node—This node hosts the database service.
  • Primary node—This node runs the software services and also acts as the front-end user interface node.

For more information about how to configure the primary node and database nodes, and how to assign system tasks, see the Cisco UCS Director Multi-Node Installation and Configuration Guide

Terminating Active GUI Sessions

Procedure


Step 1

From the Cisco UCS Director Shell menu, choose Terminate active GUI session(s) for user and press Enter.

The following information is displayed:

On a subsequent login, all active session(s) for the user will be terminated.
This utility is for terminating the GUI sessions after the specified maximum concurrent sessions for a user is reached.
Do you want to proceed [y/n]? :
Step 2

Enter y and press Enter.

The following information is displayed:

Specify the user name of the user session(s) that needs to be terminated : 
Step 3

Enter the user name and press Enter.


Specify the user session(s) that need to be terminated [a) Oldest, b) All] a/b :
Step 4

Enter a or b based on the requirement and press Enter. On Subsequent login, the user GUI session(s) will be terminated, and you are allowed to log in.


Granting Client Access to MariaDB Port

Choose this option to allow the external clients to access the MariaDB port.

Procedure


Step 1

From the Cisco UCS Director Shell menu, choose the Grant/Deny client access to MariaDB port 3306 option and press Enter.

The following information displays:

Grant provide external clients access to MariaDB port 3306. Deny blocks external clients access to MariaDB port 3306 for the granted ip address.

Source IP's configured
----------------------
10.197.110.92/0
----------------------

Grant/deny external clients access to MariaDB port 3306 [g/d]? : 
Step 2

Enter g and press Enter.

The following information is displayed:
Enter the ip address you want to grant access to MariaDB port 3306 : 
Step 3

Enter the IP address and press Enter.

The following information is displayed:

Enabling firewall rules for ip 10.197.110.92
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
Press return to continue...
Note 

You can enter 0.0.0.0 (IP address) if you want to grant access to all the clients.

Step 4

Press Enter to return to complete the process.


Denying Client Access to MariaDB Port

Procedure


Step 1

From the Cisco UCS Director Shell menu, choose the Grant/Deny client access to MariaDB port 3306 option and press Enter.

The following information displays:

Grant provide external clients access to MariaDB port 3306. Deny blocks external clients access to MariaDB port 3306 for the granted ip address.

Source IP's configured
----------------------
10.197.110.92
----------------------

Grant/deny external clients access to MariaDB port 3306 [g/d]? : 
Step 2

Enter d and press Enter.

The following information is displayed:
Enter the ip address you want to deny access to MariaDB port 3306 : 
Step 3

Enter the IP address and press Enter.

The following information is displayed:

Successfully denied ipaddress 10.197.110.92 provided...
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
Press return to continue...
Step 4

Press Enter to return to complete the process.


Regenerating Device Connector REST API Access Key

The device connector key is the authentication key that Cisco Intersight uses to connect to the Cisco UCS Director appliance. The Cisco UCS Director appliance has an unique device connector key to identify itself. Choose this option to generate the device connector key.

Procedure


Step 1

From the Cisco UCS Director Shell menu, choose the Regenerating Device Connector REST API Access Key option and press the Enter key.

Step 2

Press the Enter key to return to the main menu.


Managing VMRC Tunneling Service

Procedure


Step 1

From the Cisco UCS Director Shell menu, choose Manage VMRC Tunneling Service.

The following information is displayed:
    
VMRC Tunneling Service Menu
===========================
Options:
  1) Start VMRC Tunneling Service
  2) Status VMRC Tunneling Service
  3) Stop VMRC Tunneling Service
  4) Exit
Step 2

If you choose Start VMRC Tunneling Service option, a response similar to the following appears:

    
Type in option number and press <Enter> : 1
Starting VMRC Tunneling service...                [ OK ]
Press return to continue...
Note 

When you try to start a VMRC Tunneling service that is already running, a message will be displayed regarding the service status.

Step 3

If you choose Status VMRC Tunneling Service option, a response similar to the following appears:

    
Type in option number and press <Enter> : 2
VMRC Tunneling Service RUNNING         13539
Press return to continue...
Step 4

If you choose Stop VMRC Tunneling Service option, a response similar to the following appears:

    
Type in option number and press <Enter> : 3
Stoping VMRC Tunneling Service [PID=13539]
Press return to continue...