B.17. Common XML Errors
B.17.1. Editing Domain Definition
# virsh edit name_of_guest.xml
# virsh edit name_of_guest.xml Domain name_of_guest.xml XML configuration edited.
editcommand in virsh to edit an XML document, save all changes before exiting the editor.
xmllintcommand to validate that the XML is well-formed, or the
virt-xml-validatecommand to check for usage problems:
# xmllint --noout config.xml
# virt-xml-validate config.xml
- XML documents stored by libvirt
- These documents contain definitions of states and configurations for the guests. These documents are automatically generated and should not be edited manually. Errors in these documents contain the file name of the broken document. The file name is valid only on the host machine defined by the URI, which may refer to the machine the command was run on.Errors in files created by libvirt are rare. However, one possible source of these errors is a downgrade of libvirt — while newer versions of libvirt can always read XML generated by older versions, older versions of libvirt may be confused by XML elements added in a newer version.