Description of problem: "virsh start" succeeds even if a nonexistent serial type (e.g. 'xyz') is specified in an xml file. If invalid serial types are specified, virsh uses the "null" serial type. Instead it should report and error message to that effect and fail to start the guest. Version-Release number of selected component: Red Hat Enterprise Linux Version Number: 6 Release Number: snapshot13 Architecture: x86_64 Kernel Version: kernel-2.6.32-70.el6.x86_64 How reproducible: always Steps to Reproduce: 1. Add an invalid serial type and port number to the configuration file. Eg, <serial type='xyz'> <target port='0'/> </serial> 2. Start the guest # virsh start rhel6 Domain rhel6 started 3. # virsh dumpxml rhel6 | grep serial <serial type='null'> -----------------------------------It's this one <alias name='serial0'/> </serial> <serial type='dev'> <alias name='serial1'/> </serial> <alias name='serial0'/> The invalid serial type specified has been converted to "null". Instead it should fail to start the guest and report the error. Actual results: Guest successfully starts with virsh even while specifying an invalid serial type. Expected results: Guest should fail to start using virsh if an invalid serial type is specified. Additional info:
patch got pushed upstream: http://www.redhat.com/archives/libvir-list/2011-January/msg00294.html
Verified. Pass. Test environment: libvirt-0.8.7-3.el6 qemu-kvm-0.12.1.2-2.128.el6 kernel-2.6.32-94.el6 Steps: 1. Edit a domain "serial" part in xml file with the invaild serial types. The error message can be reported and domain still keeps the original serial type. # virsh edit cc error: XML description for unknown type presented to host for character device: # is not well formed or invalid # virsh edit cc error: XML description for unknown type presented to host for character device: abcdfafa is not well formed or invalid # virsh edit cc error: XML description for unknown type presented to host for character device: .... is not well formed or invalid # virsh edit cc error: XML description for unknown type presented to host for character device: pty1 is not well formed or invalid 2. Edit a domain "serial" part in xml file with the vaild serial types. The serial type can be changed to the specified type. # virsh edit cc Domain cc XML configuration edited.
Sorry, qemu-kvm version is qemu-kvm-0.12.1.2-2.129.el6.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0596.html