Installation guide

To do this, modify the /etc/sysco nfi g /l i bvi rtd file and uncomment the following
line:
#LIBVIRTD_ARGS="--listen"
Then restart the lib virt d service with this command:
# /etc/init.d/libvirtd restart
B.17. Common XML errors
The lib virt tool uses XML documents to store structured data. A variety of common errors occur with
XML documents when they are passed to lib virt through the API. Several common XML errors
including misformatted XML, inappropriate values, and missing elements — are detailed below.
B.17.1. Edit ing domain definit ion
Although it is not recommended, it is sometimes necessary to edit a guest virtual machine's (or a
domain's) XML file manually. To access the guest's XML for editing, use the following command:
# virsh edit name_of_guest.xml
This command opens the file in a text editor with the current definition of the guest virtual machine.
After finishing the edits and saving the changes, the XML is reloaded and parsed by lib virt . If the
XML is correct, the following message is displayed:
# virsh edit name_of_guest.xml
Domain name_of_guest.xml XML configuration edited.
Important
When using the ed i t command in virsh to edit an XML document, save all changes before
exiting the editor.
After saving the XML file, use the xml l i nt command to validate that the XML is well-formed, or the
vi rt-xml -val i d ate command to check for usage problems:
# xmllint --noout config.xml
# virt-xml-validate config.xml
If no errors are returned, the XML description is well-formed and matches the lib virt schema. While
the schema does not catch all constraints, fixing any reported errors will further troubleshooting.
XML d o cu men t s st o red b y lib virt
Red Hat Ent erp rise Linux 6 Virt ualiz at ion Host Configurat ion and G uest Inst allat ion G uide
150