RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1# ! Already an OVA is installed. Now we are going to run the script that will deactivate/uninstall old OVA and add the new one
RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1#sh running-config virtual-service 
virtual-service enable
virtual-service ipsecf_0
 vnic interface TenGigE0/0/1/2
 vnic interface TenGigE0/0/1/3
 vnic interface TenGigE0/0/1/4
 vnic interface TenGigE0/0/1/5
 vnic interface TenGigE0/0/1/6
 vnic interface TenGigE0/0/1/7
 vnic interface TenGigE0/0/1/8
 vnic interface TenGigE0/0/1/9
 activate
!

RP/0/RSP0/CPU0:R1#sh virtual-service list detail 

Virtual Service : ipsecf_0

VM Name                Admin Status      Oper Status      
____________________________________________________________
ipsecf_0CP             Activated         Up               
ipsecf_0DP             Activated         Up               
RP/0/RSP0/CPU0:R1#sh virtual-service list

Virtual Service List:

Service Name           Status            Package Name             Node Name    
______________________________________________________________________________  
ipsecf_0               Activated         ipsec_full.ova           0/0/CPU0     

RP/0/RSP0/CPU0:R1#sh running-config in
inheritance  interface  
RP/0/RSP0/CPU0:R1#sh running-config interface bundle-ether 1
interface Bundle-Ether1
 mtu 9216
 ipv4 address 192.168.1.1 255.255.255.0
!

RP/0/RSP0/CPU0:R1#sh int bundle-ether 1
Bundle-Ether1 is up, line protocol is up 
  Interface state transitions: 1
  Hardware is Aggregated Ethernet interface(s), address is 0024.f718.eda2
  Internet address is 192.168.1.1/24
  MTU 9216 bytes, BW 80000000 Kbit (Max: 80000000 Kbit)
     reliability 255/255, txload 0/255, rxload 0/255
  Encapsulation ARPA,
  Full-duplex, 80000Mb/s
  loopback not set,
  ARP type ARPA, ARP timeout 04:00:00
    No. of members in this bundle: 8
      TenGigE0/0/1/2               Full-duplex  10000Mb/s    Active          
      TenGigE0/0/1/3               Full-duplex  10000Mb/s    Active          
      TenGigE0/0/1/4               Full-duplex  10000Mb/s    Active          
      TenGigE0/0/1/5               Full-duplex  10000Mb/s    Active          
      TenGigE0/0/1/6               Full-duplex  10000Mb/s    Active          
      TenGigE0/0/1/7               Full-duplex  10000Mb/s    Active          
      TenGigE0/0/1/8               Full-duplex  10000Mb/s    Active          
      TenGigE0/0/1/9               Full-duplex  10000Mb/s    Active          
  Last input 03:11:02, output 03:11:02
  Last clearing of "show interface" counters never
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     55702 packets input, 6348976 bytes, 37 total input drops
     0 drops for unrecognized upper-level protocol
     Received 2 broadcast packets, 37 multicast packets
              0 runts, 0 giants, 0 throttles, 0 parity
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     55665 packets output, 6345594 bytes, 0 total output drops
     Output 1 broadcast packets, 0 multicast packets
     0 output errors, 0 underruns, 0 applique, 0 resets
     0 output buffer failures, 0 output buffers swapped out
     0 carrier transitions

RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1#sh running-config event manager  environment 
event manager environment _eem_vsm_slot 0
event manager environment _eem_tftp_ova_file tftp://202.153.144.25//auto/tftp-blr-users3/pjeyapal/images/522_23i/asr9k-vsm-ipsec-fp-DT-5.2.2.18i.ova
event manager environment _eem_need_bundle_config 1

RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1#  ! Adding the required env variables
RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1#conf t
RP/0/RSP0/CPU0:R1(config)#event manager environment  _eem_tftp_ova_file  tftp://202.153.144.25//auto/tftp-blr-users3/pjeyapal/images/522_23i/asr9k-vsm-ipsec-hp-DT-5.2.2.18i.ova
RP/0/RSP0/CPU0:R1(config)#event manager env _eem_ova_type ipsec
RP/0/RSP0/CPU0:R1(config)#event manager env _eem_ova_profile  half
RP/0/RSP0/CPU0:R1(config)#event manager env _eem_service_members 6 7 8 9 
RP/0/RSP0/CPU0:R1(config)#event manager env _eem_bundle_number 5        
RP/0/RSP0/CPU0:R1(config)#event manager env _eem_need_bundle_config 1
RP/0/RSP0/CPU0:R1(config)#event manager env _eem_bundle_address 192.168.5.1
RP/0/RSP0/CPU0:R1(config)#event manager env _eem_bundle_mask 255.255.255.252
RP/0/RSP0/CPU0:R1(config)#event manager env _eem_service_name IPsec_H       
RP/0/RSP0/CPU0:R1(config)#event manager env _eem_router_ova_path harddisk:
RP/0/RSP0/CPU0:R1(config)#commit
RP/0/RSP0/CPU0:R1(config)#
RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1# ! Checking the configured EEM environmental variables
RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1#sh running-config event manager environment 
event manager environment _eem_ova_type ipsec
event manager environment _eem_vsm_slot 0
event manager environment _eem_bundle_mask 255.255.255.252
event manager environment _eem_ova_profile half
event manager environment _eem_service_name IPsec_H
event manager environment _eem_bundle_number 5
event manager environment _eem_tftp_ova_file tftp://202.153.144.25//auto/tftp-blr-users3/pjeyapal/images/522_23i/asr9k-vsm-ipsec-hp-DT-5.2.2.18i.ova
event manager environment _eem_bundle_address 192.168.5.1
event manager environment _eem_router_ova_path harddisk:
event manager environment _eem_service_members 6 7 8 9
event manager environment _eem_need_bundle_config 1
RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1# ! Triggering the script
RP/0/RSP0/CPU0:R1#event manager run no_ova_install_activate.tcl
RP/0/RSP0/CPU0:R1# 
RP/0/RSP0/CPU0:R1#sh logging | i EEM
RP/0/RSP0/CPU0:Dec 16 22:07:34.886 : tclsh[65861]: %HA-HA_EEM-6-ACTION_SYSLOG_LOG_INFO : no_ova_install_activate.tcl: Script to Install/Activate OVA started, this will remove  any existing ova on provided vsm and install the new ova.  Press ctrl+c to abort. 
RP/0/RSP0/CPU0:Dec 16 22:07:36.513 : tclsh[65861]: %HA-HA_EEM-6-ACTION_SYSLOG_LOG_INFO : no_ova_install_activate.tcl: Arguments passed by User and Validated to be correct are as follows 
RP/0/RSP0/CPU0:Dec 16 22:07:36.513 : tclsh[65861]: %HA-HA_EEM-6-ACTION_SYSLOG_LOG_INFO : no_ova_install_activate.tcl: |*| _eem_tftp_ova_file  : tftp://202.153.144.25//auto/tftp-blr-users3/pjeyapal/images/522_23i/asr9k-vsm-ipsec-hp-DT-5.2.2.18i.ova |*| _eem_router_ova_path : harddisk: |*| _eem_vsm_slot : 0 |*| _eem_ova_type : ipsec |5| _eem_ova_profile : half 
RP/0/RSP0/CPU0:Dec 16 22:07:36.513 : tclsh[65861]: %HA-HA_EEM-6-ACTION_SYSLOG_LOG_INFO : no_ova_install_activate.tcl: |*| _eem_service_members : 6 7 8 9 |*| _eem_need_bundle_config : 1 |*| _eem_bundle_number : 5 |*| _eem_bundle_address : 192.168.5.1 |*| _eem_bundle_mask : 255.255.255.252 |*| _eem_service_name : IPsec_H 
RP/0/RSP0/CPU0:Dec 16 22:07:36.513 : tclsh[65861]: %HA-HA_EEM-6-ACTION_SYSLOG_LOG_INFO : no_ova_install_activate.tcl: Please press ctrl+c to abort if the above arguments needs to be  changed and policy needs to be rerun  
RP/0/RSP0/CPU0:Dec 16 22:20:10.890 : tclsh[65861]: %HA-HA_EEM-6-ACTION_SYSLOG_LOG_INFO : no_ova_install_activate.tcl: OVA Installed and Activated successfully 
RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1# ! Above log marks the end of Installation and Activation
RP/0/RSP0/CPU0:R1# ! Following commands shows the successful Installation and Activation 
RP/0/RSP0/CPU0:R1#cd harddisk:
RP/0/RSP0/CPU0:R1#dir | i eem_ova
25144       drw-  4096        Tue Dec 16 22:07:38 2014  eem_ova_0
RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1#cd eem_ova_0
RP/0/RSP0/CPU0:R1#dir
Directory of harddisk:/eem_ova_0
103658      -rwx  178257920   Tue Dec 16 22:08:55 2014  ipsec_half.ova
6576652288 bytes total (6321969152 bytes free)
RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1#sh running-config virtual-service 
virtual-service enable
virtual-service IPsec_H
 vnic interface TenGigE0/0/1/6
 vnic interface TenGigE0/0/1/7
 vnic interface TenGigE0/0/1/8
 vnic interface TenGigE0/0/1/9
 activate
!

RP/0/RSP0/CPU0:R1#sh virtual-service list detail 

Virtual Service : IPsec_H

VM Name                Admin Status      Oper Status      
____________________________________________________________
IPsec_HCP              Activated         Up               
IPsec_HDP              Activated         Up               
RP/0/RSP0/CPU0:R1#sh virtual-service list

Virtual Service List:

Service Name           Status            Package Name             Node Name    
______________________________________________________________________________  
IPsec_H                Activated         ipsec_half.ova           0/0/CPU0     
RP/0/RSP0/CPU0:R1# ! Following commands shows the successful configuration of bundle and its members
RP/0/RSP0/CPU0:R1#sh running-config interface bundle-ether 5
interface Bundle-Ether5
 mtu 9216
 ipv4 address 192.168.5.1 255.255.255.252
!
RP/0/RSP0/CPU0:R1#sh int bundle-ether 5
Bundle-Ether5 is up, line protocol is up 
  Interface state transitions: 1
  Hardware is Aggregated Ethernet interface(s), address is 0024.f718.eda0
  Internet address is 192.168.5.1/30
  MTU 9216 bytes, BW 40000000 Kbit (Max: 40000000 Kbit)
     reliability 255/255, txload 0/255, rxload 0/255
  Encapsulation ARPA,
  Full-duplex, 40000Mb/s
  loopback not set,
  ARP type ARPA, ARP timeout 04:00:00
    No. of members in this bundle: 4
      TenGigE0/0/1/6               Full-duplex  10000Mb/s    Active          
      TenGigE0/0/1/7               Full-duplex  10000Mb/s    Active          
      TenGigE0/0/1/8               Full-duplex  10000Mb/s    Active          
      TenGigE0/0/1/9               Full-duplex  10000Mb/s    Active          
  Last input 00:08:55, output 00:11:09
  Last clearing of "show interface" counters never
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     23 packets input, 2040 bytes, 22 total input drops
     0 drops for unrecognized upper-level protocol
     Received 1 broadcast packets, 22 multicast packets
              0 runts, 0 giants, 0 throttles, 0 parity
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     1 packets output, 60 bytes, 0 total output drops
     Output 1 broadcast packets, 0 multicast packets
     0 output errors, 0 underruns, 0 applique, 0 resets
     0 output buffer failures, 0 output buffers swapped out
     0 carrier transitions
RP/0/RSP0/CPU0:R1#
RP/0/RSP0/CPU0:R1# 
RP/0/RSP0/CPU0:R1# ! Connect to CP VM and check the base configuration that is been done by script 
RP/0/RSP0/CPU0:R1#virtual-service connect name IPsec_HCP console node 0/0/CPU0 
Trying 192.0.128.3...
Connected to 192.0.128.3.
Escape sequence is '^^e'.

Router>en 
Password: lab  
Router#sh running-config interface gigabitEthernet 0/0
Building configuration...

Current configuration : 135 bytes
!
interface GigabitEthernet0/0
 ip address 10.0.150.226 255.255.255.252
 duplex auto
 speed auto
 media-type rj45
 no mop enabled
end

Router#sh running-config interface gigabitEthernet 0/1
Building configuration...

Current configuration : 135 bytes
!
interface GigabitEthernet0/1
 ip address 10.0.151.226 255.255.255.252
 duplex auto
 speed auto
 media-type rj45
 no mop enabled
end

Router#sh ip int br
Router#sh ip int brief 
Interface                  IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0         10.0.150.226    YES manual up                    up      
GigabitEthernet0/1         10.0.151.226    YES manual up                    up      
Router#