How to delete snapshot in KVM/libvirt with virsh command?

Solution Unverified - Updated -

Environment

  • Red Hat Enterprise Linux 6.X

Issue

  • While deleting a snapshot by virsh command, following error was observed:
error: Domain snapshot not found: no domain snapshot with matching name '<name>'

Resolution

  • The virsh command syntax to delete snapshot is:
# virsh snapshot-delete <vm_name> <snapshot_name>

Root Cause

  • The command was with incorrect syntax.:
# virsh snapshot-delete <vm_name>.<snapshot_name>

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments