<div dir="ltr"><div><br></div><div style> I tried on another <span style="font-family:arial,sans-serif;font-size:14px">machine with </span><span style="font-family:arial,sans-serif;font-size:14px">qemu 2.0.0 + libvirt 1.2.6 is ok, maybe it is related</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:14px"> to some system </span><font face="arial, sans-serif"><span style="font-size:14px">environment ? But i have not found what's impacted of this yet.</span></font></div>
<div style> The xml file is as fallows:</div><div style>"</div><div><domain type="kvm"></div><div> <name>5ab4f49c-c99f-4dbd-9d7d-17a946b4c5a7</name></div><div> <uuid>5ab4f49c-c99f-4dbd-9d7d-17a946b4c5a7</uuid></div>
<div> <memory>15360000</memory></div><div> <vcpu cpuset="0,1,2,3,8,9,10,11" placement="static">4</vcpu></div><div> <os></div><div> <type>hvm</type></div>
<div> <boot dev="hd"/></div><div> </os></div><div> <features></div><div> <acpi/></div><div> <apic/></div><div> <pae/></div><div> </features></div><div> <clock offset="localtime"/></div>
<div> <on_poweroff>destroy</on_poweroff></div><div> <on_reboot>restart</on_reboot></div><div> <on_crash>restart</on_crash></div><div> <devices></div><div> <emulator>/usr/bin/qemu-system-x86_64</emulator></div>
<div> <disk device="disk" type="file"></div><div> <driver name="qemu" type="qcow2"/></div><div> <source file="/mnt/kvm/tlinux_sles12_com-v3-2.qcow2"/></div>
<div> <target bus="virtio" dev="vda"/></div><div> </disk></div><div> <interface type="bridge"></div><div> <source bridge="kvmbr11"/></div><div>
<mac address="00:16:3E:0A:0A:FA"/></div><div> <model type="virtio"/> </div><div> </interface></div><div> <serial type="pty"></div><div> <target port="0"/></div>
<div> </serial></div><div> <console type="pty"></div><div> <target port="0" type="serial"/></div><div> </console></div><div> <input bus="ps2" type="mouse"/></div>
<div> <graphics autoport="yes" listen="0.0.0.0" port="-1" type="vnc"/></div><div> </devices></div><div></domain></div><div class="gmail_extra">"</div><div class="gmail_extra">
Another clue,there are some error messages in libvirtd.log</div><div class="gmail_extra"><br></div><div class="gmail_extra">"2014-07-29 02:10:32.230+0000: 13226: error : virCommandWait:2426 : internal error: Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin HOME=/root USER=tvcadmin LOGNAME=tvcadmin /usr/bin/qemu-system-x86_64 -help) unexpected exit status 125: libvirt: error : internal error: cannot apply process capabilities -1</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">2014-07-29 02:10:32.230+0000: 13226: warning : virQEMUCapsLogProbeFailure:3300 : Failed to probe capabilities for /usr/bin/qemu-system-x86_64: internal error: Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin HOME=/root USER=tvcadmin LOGNAME=tvcadmin /usr/bin/qemu-system-x86_64 -help) unexpected exit status 125: libvirt: error : internal error: cannot apply process capabilities -1</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">2014-07-29 02:10:32.232+0000: 13226: error : virCommandWait:2426 : internal error: Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin HOME=/root USER=tvcadmin LOGNAME=tvcadmin /usr/bin/qemu-system-xtensa -help) unexpected exit status 125: libvirt: error : internal error: cannot apply process capabilities -1</div>
<div class="gmail_extra">"<br><br><div class="gmail_quote">2014-07-30 21:07 GMT+08:00 Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="">On 07/29/2014 08:39 PM, weiwei li wrote:<br>
> Hi<br>
> I got a problem when using qemu 2.0.0 + libvirt 1.2.6 . It just can not<br>
> define a kvm vm successfully , errors like this :<br>
><br>
> # virsh define 5ab4f49c-c99f-4dbd-9d7d-17a946b4c5a7.xml<br>
> error: Failed to define domain from 5ab4f49c-c99f-4dbd-9d7d-17a946b4c5a7.xml<br>
> error: unknown OS type hvm<br>
<br>
</div>Can you show the actual contents of that .xml file?<br>
<div class=""><br>
><br>
> After several tries, i found that<br>
><br>
> Qemu2.0 /qemu-kvm1.2+ libvirt1.0.2 and lower version is ok<br>
> Qemu2.0 /qemu-kvm1.2+ libvirt1.0.3 and higher version is failed<br>
<br>
</div>I wonder if you are seeing the result of tightening the parse; the old<br>
versions were silently ignoring an impossible request, and the new<br>
version is diagnosing the bug. It may be as simple as modifying<br>
whatever line requested "hvm" in your .xml file to instead request<br>
something valid. Then again, I have<br>
<os><br>
<type arch='i686' machine='pc-i440fx-1.5'>hvm</type><br>
in a guest that is booting just fine for me on Fedora 20 with qemu 2.0<br>
and libvirt 1.2.7-rc1. In upstream libvirt.git, that error message is<br>
only possible from this code in domain_conf.c:<br>
<br>
if (!virCapabilitiesSupportsGuestOSType(caps, def->os.type)) {<br>
virReportError(VIR_ERR_OS_TYPE,<br>
"%s", def->os.type);<br>
<br>
but I'm not sure why that function would be failing, unless your qemu<br>
binary is not reporting features correctly.<br>
<span class=""><font color="#888888"><br>
--<br>
Eric Blake eblake redhat com +1-919-301-3266<br>
Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
<br>
</font></span></blockquote></div><br></div></div>