Problem:
virsh -c qemu:///system undefine <domain name>
error: Failed to undefine domain <domain name>
error: Requested operation is not valid: cannot undefine domain with nvram
Solution:
$ virsh -c qemu:///system undefine --nvram <domain name>
Domain <domain name> has been undefined