virsh (un)define

kvm virsh tool has nice features to define and undefine particular virtual machine.If we have .xml kvm machine file then using
#virsh define kvmmachine.xml
will define it and machine will be ready for use.If you,as I do very often,need to deploy same virtual machine name ( eg: new / full clone of cluster node ) then cloning machine will not allow you to use same name as it is internally remembered by kvm.Reboot of host will fix this,but that is not solution ;), for such cases,
#virsh undefine kvmmachine
will undefine machine ( remove its name from kvm namespace ) and you can clone it again.Notice that when # virsh undefine kvmmachine is used we use virtual machine name as (was) visible in #virsh list output

Advertisements

#kvm-virsh-virtualization-define-undefine