Installation guide

<domain ty pe='kvm'>
These XML examples will not parse correctly because of typographical errors such as a
missing special character, or an additional character:
<domain type 'kvm'>
<dom#ain type='kvm'>
So lu t io n
To identify the problematic tag, read the error message for the context of the file, and locate
the error with the pointer. Correct the XML and save the changes.
B.17.3. Logic and configurat ion errors
A well-formatted XML document can contain errors that are correct in syntax but lib virt cannot parse.
Many of these errors exist, with two of the most common cases outlined below.
B.1 7 .3.1. Vanishing part s
Symp t o m
Parts of the change you have made do not show up and have no effect after editing or
defining the domain. The d efi ne or ed i t command works, but when dumping the XML
once again, the change disappears.
In vest ig at io n
This error likely results from a broken construct or syntax that libvirt does not parse. The
lib virt tool will generally only look for constructs it knows but ignore everything else,
resulting in some of the XML changes vanishing after lib virt parses the input.
So lu t io n
Validate the XML input before passing it to the ed i t or d efi ne commands. The lib virt
developers maintain a set of XML schemas bundled with lib virt which define the majority of
the constructs allowed in XML documents used by lib virt .
Validate lib virt XML files using the following command:
# virt-xml-validate libvirt.xml
If this command passes, lib virt will likely understand all constructs from your XML, except if
the schemas cannot detect options which are valid only for a given hypervisor. Any XML
generated by lib virt as a result of a vi rsh d ump command, for example, should validate
without error.
B.1 7 .3.2. Inco rre ct drive de vice t ype
Symp t o m
The definition of the source image for the CD-ROM virtual drive is not present, despite being
added:
Red Hat Ent erp rise Linux 6 Virt ualiz at ion Host Configurat ion and G uest Inst allat ion G uide
154