There is no API to accomplish renaming a domain using virsh. The well known graphical tool `virt-manager` therefore also does not offer the possibility to rename a libvirt domain. In order to do that, you have to stop the virtual machine and edit the .xml data like follows:

root@host ~ # virsh dumpxml > machine.xml
root@host ~ # editor machine.xml

<domain type='kvm' id='24'>
  <name></name>  <== edit the name here

root@host ~ # virsh undefine
root@host ~ # virsh define machine.xml