Upgrading the Virtual Appliance involves:

  • Backing up the hard disks of the existing virtual machines.
  • Deploying new virtual machines by using QCOW2 image.
  • Restoring the backup to their hard disks.
  • Attaching the new hard disks to the older virtual machines

Splunk AppDynamics On-Premises Virtual Appliance provides the reference script that helps in upgrading the Virtual Appliance.

Follow the steps to upgrade the Virtual Appliance in KVM.

Back up the Virtual Appliance Data

Before you begin the upgrade, complete the following steps:

  1. Download the Virtual Appliance upgrade QCOW2 file from the Downloads portal.
  2. Shut down the Virtual Appliance:
    appdcli stop secapp
    appdcli stop aiops
    appdcli stop appd
    <<Wait for pods to terminate before deleting operators>>
    appdcli stop operators
    CODE
  3. Run the backup command:
    appdcli run backup
    CODE

    This command generates a <backup_tar> file with all the necessary data.
  4. Copy and paste the backup file outside of the cluster.

Upgrade the Virtual Appliance

  1. Download the upgrade script from the Cisco AppDynamics GitHub repository.
  2. Run the following command by specifying the locations  of the QCOW2 file and config.cfg.
    ./upgrade-cluster ../<filename>.qcow2 config.cfg
    CODE

This script verifies the virsh connection and ensures the storage pools are active. Then, it automates the following in each cluster nodes:

  1. Stops the virtual machine.
  2. Uploads the new QCOW2 image to the node storage pool.
  3. Deletes the OS disk image. However, it retains the data disk image.
  4. Creates a new OS disk from the template image.
  5. Starts the virtual machine.

Verify the Deployment Status

Verify the deployment of virtual machines:

  1. Verify whether the deployment of virtual machines is successful:
    appdctl show boot
    CODE
     

    Ensure that the services in each node is active. If any service appears as Failed, restart that virtual machine. You might have to redeploy the virtual machine if it is still failing.

  2. Create a three-node cluster:
    1. Run the following command in the primary node and specify the IP address of the peer nodes:
      appdctl cluster init <Node-2-IP> <Node-3-IP>
      CODE
    2. Run the following command to verify the node status:
      appdctl show cluster
      microk8s status
      CODE

      Ensure that the output displays the Running status as true for the nodes that are part of the cluster.

      Sample Output

        NODE           | ROLE  | RUNNING 
      ----------------+-------+---------
       10.0.0.1:19001 | voter | true    
       10.0.0.2:19001 | voter | true    
       10.0.0.3:19001 | voter | true  
      CODE

      You must re-login to the terminal if the following error appears:

      Insufficient Permissions to Access Microk8s
      CODE

Restore Data in the Virtual Appliance

  1. Copy the <backup_tar> file to one of the cluster nodes that is generated earlier. See Prerequisites.
  2. Run the following command to restore the persistent volumes specifications:
    appdcli run restore <backup_tar>
    CODE
  3. Verify that the PVC are in the Bound state by running the following command:
    kubectl get pvc -A
    CODE
  4. Start the following services:
    appdcli start appd [Profile]
    CODE

    1. Cisco AppDynamics Services.
    2. Anomaly Detection Service.
    3. Cisco Secure Application Service.

After the upgrade, the cluster uses the existing data disk and becomes functional.