This document describes the steps to recover CLI root (shell) user password for Prime Infastructure application installed in Virtual Appliances (VM).
Cisco recommends that you have knowledge of Usage and Access to the VMware vSphere client, vSphere inventory, Datastores and Objects functions.
Caution: Steps in this document require application shutdown for completion. Therefore suggested to perform this activity during maintenance window.
The information in this document is based on these software versions:
- Prime Infrastructure 2.2.x,3.0.x, 3.1.x versions installed in VM.
- Any one of the iso image copy from this list:
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Step 1. Launch your VMware vSphere Client and connect to the ESXi host or vCenter server.
Step 2. Follow these steps to upload the downloaded .iso image from the above list to the data store on the Open Virtual Appliance (OVA) machine:
- In the vSphere Server, navigate to Inventory > Summary > Datastores.
- In the Objects tab, select the datastore and upload the file.
- Click Navigate to the datastore file browser icon.
- If needed, click Create a new folder icon and create a new folder.
- Select the folder that you created or select a folder that exists, and click the Upload a File icon. If the Client Integration Access Control dialog box appears, click Allow to allow the plug-in to access your operating system and proceed with the file upload.
- On the local computer, find the iso file and upload it.
- Refresh the datastore file browser to see the uploaded file in the list.
Step 3. After the iso image is uploaded to a datastore, follow these steps to make it a default boot image:
- Using the VMware vSphere client, right-click on the PI VM host and click Open Console.
- Log in to CLI with admin user and type halt to shutdown the VM.
- Navigate to Edit Settings > Hardware, then select CD/DVD drive 1.
- Under Device Type, select Datastore ISO File, then use the Browse button to select the ISO image file you uploaded to the datastore.
- Under Device Status, select Connect at power on.
- Click Options tab and select Boot Options. Under Force BIOS Setup, select Next time VM boots, force entry into BIOS setup Screen. This forces a boot from the virtual machine BIOS when you restart the virtual machine.
- Click OK.
- In the VMware vSphere client, right-click the deployed PI VM and Navigate to Power > Power On.
- After Power on in PI console in the BIOS setup menu, find the option that controls the boot order of devices and move DVD/CDROM to the top.This ensures that PI VM boots from uploaded iso image.
Step 4. Complete these steps to reset a PI CLI root/shell password:
- Type linux rescue on prompt and hit Enter key.
- Chose default options for language/keyboard and don't choose network option.
- You see this as a message :
The rescue environment will now attempt to find your Linux installation and mount it under the directory /mnt/sysimage. You can then make any changes required to your system. If you want to proceed with this step select Continue. You can also choose to mount your file systems read-only instead of read-write by choosing 'Read-only'. If for some reason this process fails you can select Skip and this step skipped and you go directly to a command shell.
- Choose Continue in this screen.
- Once an existing installation is found, it is mounted to /mnt/sysimage location and you are guided to command prompt.
Step 5. Change root to the PI install location with the help of command: # chroot /mnt/sysimag.
Step 6. Move /storeddata/rootpatchpw with the help of command: #mv /storeddata/rootpatchpw /root/.
Step 7. Now enter exit and hit Enter key.
Step 8. Enter reboot and boot into PI.
Step 9. Once the virtual machine is rebooted in the vSphere client, click in CD (Compact Disk) icon and select Disconnect ISO image.
Step 10. After the completion of the boot, PI services are up. Log in to PI admin CLI and set the new root password with the use of root_enable command.
Note: If the PI version is 3.1.x releases use shell command instead root_enable to set the password.