
On 07/29/2014 08:39 PM, weiwei li wrote:
Hi I got a problem when using qemu 2.0.0 + libvirt 1.2.6 . It just can not define a kvm vm successfully , errors like this :
# virsh define 5ab4f49c-c99f-4dbd-9d7d-17a946b4c5a7.xml error: Failed to define domain from 5ab4f49c-c99f-4dbd-9d7d-17a946b4c5a7.xml error: unknown OS type hvm
Can you show the actual contents of that .xml file?
After several tries, i found that
Qemu2.0 /qemu-kvm1.2+ libvirt1.0.2 and lower version is ok Qemu2.0 /qemu-kvm1.2+ libvirt1.0.3 and higher version is failed
I wonder if you are seeing the result of tightening the parse; the old versions were silently ignoring an impossible request, and the new version is diagnosing the bug. It may be as simple as modifying whatever line requested "hvm" in your .xml file to instead request something valid. Then again, I have <os> <type arch='i686' machine='pc-i440fx-1.5'>hvm</type> in a guest that is booting just fine for me on Fedora 20 with qemu 2.0 and libvirt 1.2.7-rc1. In upstream libvirt.git, that error message is only possible from this code in domain_conf.c: if (!virCapabilitiesSupportsGuestOSType(caps, def->os.type)) { virReportError(VIR_ERR_OS_TYPE, "%s", def->os.type); but I'm not sure why that function would be failing, unless your qemu binary is not reporting features correctly. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org