Steps to change the default option "Delete old image after Upgrade" from Yes to No in Update OS Image.
search cancel

Steps to change the default option "Delete old image after Upgrade" from Yes to No in Update OS Image.

book

Article ID: 331177

calendar_today

Updated On: 01-03-2025

Products

VMware Smart Assurance

Issue/Introduction

Certain users like to keep old image in device even after upgrade hence default value of 'YES' to delete image need to be modified.

Environment

NCM - 10.1.x

Resolution

This change will need to be completed on all Device Servers (DS) and the Application Server (AS) / Combination Server (CS). This only affects the device class specified in the package file your editing.
For example if you modify the CiscoIOSSwitch.pkg file the changes will only affect the Cisco IOS switches.  

Complete the following directions on the Application Server/Combination Server and all Device Servers:

(Note: We are going to use Cisco IOS Switch device class as the example)

  1. Login to NCM AS/CS/DS with 'Root' Access
  2. Source the NCM variables as below:
    source /etc/voyence.conf
  3. Copy the CiscoIOSSwitch.pkg from the package directory to the customerpackage directory to ensure any future DSR upgrades don't overwrite the changes we make. Plus, it’s always good practice to copy all changes to the custompackage directory to ensure you have a backup. 
    cp $VOYENCE_HOME/package/pkgxml/CiscoIOSSwitch/CiscoIOSSwitch.pkg  $VOYENCE_HOME/custompackage/pkgxml/CiscoIOSSwitch/CiscoIOSSwitch.pkg

          NOTE(If the $VOYENCE_HOME/custompackage/pkgxml/CiscoIOSSwitch/ directory doesn't exist then create it)

  1. Edit the CiscoIOSSwitch.pkg file and search for the line we are going to edit.  
    vi $VOYENCE_HOME/custompackage/pkgxml/CiscoIOSSwitch/CiscoIOSSwitch.pkg

    /Delete Old Image
  2. Edit the following line to correct the adjustment.
<Options name="Delete Old Image After Upgrade" possible-values="yes,no" default="yes"/>

Change it to

<Options name="Delete Old Image After Upgrade" possible-values="yes,no" default="no"/>
  1. Save and close the file.
  2. Do a complete restart of the services on both theApplication Server and the Device Servers.

    • service vcmaster restart
       for NCM 10.1.6 and below 
    • systemctl restart vcmaster
       for NCM 10.1.8 and above
      
  3. Make sure to download a new Java client and do not reuse Java Short-Cut on your desktop. The best way to complete this is to go the NCM Application Server in your browser 
    https://<NCM Server IP Address>