Bug 509337
Summary: | "error: unknown OS type hvm " is threw out occasionally when defining domain | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Edward Wang <edwang> | ||||
Component: | libvirt | Assignee: | Daniel Berrangé <berrange> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 5.4 | CC: | crobinso, llim, theophanis_kontogiannis, virt-maint, xen-maint, yshao | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-11-22 10:59:18 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Edward Wang
2009-07-02 10:15:27 UTC
Created attachment 350258 [details]
domain xml
I saw the same behaviour with 100% success even with service libvirtd restart. However it turned out in my case that the reason was that the kvm_intel module was not loaded. Just a note if it helps... What's happening here is that libvirt is generating empty capabilities when it doesn't detect /dev/kvm or any qemu binaries. Then, when the we read in the XML configs at daemon start up, we check the requested <os><type> against caps, and throw "error: unknown OS type hvm" This is confusing and not very transparent: users will then run 'virsh list --all' and not see any of there VMs! We should find a way to avoid this validation on libvirtd startup, even if capabilities are incorrectly detected. Then maybe move this check to VM start time so the user gets a proper error. I don't think we can avoid this use of the capabilities in the parsing stage, because lots of other things depend on this lookup having been done. In particular this lets us ensure that the 'emulator' and 'machine type' fields are non-NULL for all parsed guests. Plenty of code in libvirt now assumes that is true, so changing it to allow NULLs is very risky. In addition, we also use the capabilities to canonicalize the machine type from 'pc' to 'pc-0.12' (or whatever is declared), and to determine whether the emulator supports static PCI address assignment. |