KVM operations

get rid of a guest,

virsh undefine virtinstall
rm -f /data/kvm/virtinstall.qcow2

to rename a guest,

virsh domrename ... ...

but you might also want to rename the vdisk and change the pointer to it in the same run,

virsh shutdown guest
virsh dumpxml guest > lala
virsh undefine guest
vi lala
virsh define lala
rm lala

Note shutdown works only when the guest system is truly up and running. When it’s stuck somewhere or at boot-loader time, you won’t be able to turn it off that way.

Resources

https://help.ubuntu.com/community/KVM/Virsh

https://www.cyberciti.biz/faq/how-to-rename-kvm-virtual-machine-vm-domain-with-virsh-command/

https://serverfault.com/questions/203311/how-to-rename-a-vm-using-libvirtkvm


GUIDES | LECTURES | BENCHMARKS | SMTP HEALTH