Description of problem: When trying to define a domain with a previously working setup: error: Failed to define domain from temp.xml error: unknown OS type hvm Version-Release number of selected component (if applicable): git v1.0.6-38-gd60570b How reproducible: consistent. Steps to Reproduce: On debian 7.0.0 with current git clone of qemu with kvm enabled (tested) modules loaded and CPU Intel VT support enabled temp.xml <domain type='kvm'> <name>temp</name> <uuid>f5b8c05b-9c7a-3211-49b9-2bd635f7e2aa</uuid> <memory unit='KiB'>1048576</memory> <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type arch='x86_64' machine='pc-i440fx-1.5'>hvm</type> <boot dev='cdrom'/> <boot dev='hd'/> </os> <features> <acpi/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/local/bin/qemu-system-x86_64</emulator> <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/path/to/temp.img'/> <target dev='hda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/path/to/debian-7.0.0-amd64-CD-1.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='ide' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='pci' index='0' model='pci-root'/> <interface type='bridge'> <source bridge='br0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <video> <model type='cirrus' vram='9216' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> virsh define temp.xml Actual results: error: Failed to define domain from temp.xml error: unknown OS type hvm Expected results: successful definition of domain Additional info: virt-xml-validate temp.xml temp.xml validates
It would appear, at the moment, as if the criteria for starting a domain is not the same for creating one, i.e the XML for a working domain that has been edited in a certain way since definition could then not be used to re-define that domain.
Sorry cancel the above comment, I am now fairly sure this is because libvirt does not recognize that qemu is installed (in usr/local/(s)bin/, where dies libvirt look if not here?)
temp fix: ln -s /usr/local/bin/qemu-system-x86_64 /usr/bin/qemu change line in xml: <emulator>/usr/local/bin/qemu-system-x86_64</emulator> to: <emulator>/usr/bin/qemu</emulator> reboot fixed it for me
*** This bug has been marked as a duplicate of bug 1043572 ***
I had this problem too - all my domains vanished after updating from rhel7 alpha to rhel7.0 GA. When I tried 'virsh define /etc/libvirt/qemu/somedomain.xml' I got the "unknown os type hvm". Here's what I did to fix it and bring back my domains (after I did the below "virsh list" showed them all again): # ln -s /usr/libexec/qemu-kvm /bin/qemu-kvm # systemctl restart libvirtd I didn't have to reboot so the above might save someone a reboot.