Deleting a Snapshot in ASP using CLI

Last Updated : Nov 19, 2026 |
Prolog information
  1. Log in to the KVM host using SSH or the server console.
    ADDITIONAL INFORMATION:
    For example, ssh <USERNAME>@<KVM_HOST_IP>
  2. Run the following command to switch to root user:
    ADDITIONAL INFORMATION:
    sudo su -
  3. Run the following command to display all registered virtual machines and their states:
    ADDITIONAL INFORMATION:
    virsh list --all
    Note the name of the virtual machine for which you want to delete a snapshot.
  4. Run the following command to check the state of the virtual machine:
    ADDITIONAL INFORMATION:
    virsh domstate <VM_Name>
  5. Optional: If the virtual machine state is running, run the following command to shut down the virtual machine: virsh shutdown <VM_Name>
    ADDITIONAL INFORMATION:
    Note:
    Wait until the virtual machine is shut down before you continue. The time required depends on the guest operating system and application services.
  6. Run the following command to verify that the virtual machine is shut down:
    ADDITIONAL INFORMATION:
    virsh domstate <VM_Name>
  7. Run the following command to list the snapshots for the virtual machine:
    ADDITIONAL INFORMATION:
    virsh snapshot-list <VM_Name>
    Note the name of the snapshot you want to delete.
  8. Run the following command to delete the snapshot:
    ADDITIONAL INFORMATION:
    virsh snapshot-delete <VM_Name> <Snapshot_Name>
    The following message appears: Domain snapshot <Snapshot_Name> deleted.