Bug 971544 - unknown os type hvm
unknown os type hvm
Status: CLOSED DUPLICATE of bug 1043572
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
x86_64 Linux
unspecified Severity low
: ---
: ---
Assigned To: Libvirt Maintainers
Depends On:
  Show dependency treegraph
Reported: 2013-06-06 14:57 EDT by ingram.julian
Modified: 2014-07-06 10:24 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-16 11:38:25 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description ingram.julian 2013-06-06 14:57:20 EDT
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:


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


<domain type='kvm'>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
    <type arch='x86_64' machine='pc-i440fx-1.5'>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
  <clock offset='utc'/>
    <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 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'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    <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'/>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen=''>
      <listen type='address' address=''/>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    <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
Comment 1 ingram.julian 2013-06-09 15:38:17 EDT
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.
Comment 2 ingram.julian 2013-06-09 16:00:12 EDT
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?)
Comment 3 ingram.julian 2013-06-09 18:51:40 EDT
temp fix:

ln -s /usr/local/bin/qemu-system-x86_64 /usr/bin/qemu 

change line in xml:



fixed it for me
Comment 4 Cole Robinson 2013-12-16 11:38:25 EST

*** This bug has been marked as a duplicate of bug 1043572 ***
Comment 5 Dave Wysochanski 2014-07-06 10:24:33 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.