[virt-tools-list] How to change XML configs the right way

Cole Robinson crobinso at redhat.com
Thu Jan 14 13:23:55 UTC 2010

On 01/14/2010 02:14 AM, Hartmann, Jörg wrote:
> Hello,
> if i change something in an XML-File of an VM like the name of the VM or
> the MAC-address with an editor.
> How can i make virt-manager (or libvirt) make aware of that change ?
> My virt-manager is version 0.6.1 on RHEL 5.4.
> What is the prefered way of making such changes?

Use 'virsh edit $vmname'. That said, changing the VM name might not work
because of how we use the name internally. You might have to do a full:

virsh shutdown $vmname
virsh dumpxml $vmname > foo.xml
<edit foo.xml, change vmname>
virsh undefine $vmname
virsh define foo.xml

- Cole

More information about the virt-tools-list mailing list