Remove Stale virsh/libvirt Entries
Sometime I’m in a hurry and delete a VM’s disk image before removing it from libvirt/virsh, which leaves a lingering, dead reference to that VM.
The following fixes this:
sudo virsh –connect qemu:///system undefine vm_to_be_removed
Replace vm_to_be_removed with your VM name.