[GH-ISSUE #322] Instance creation fails: "unknown OS type None" #252

Closed
opened 2026-02-27 16:38:36 +03:00 by kerem · 10 comments
Owner

Originally created by @matthanley on GitHub (May 26, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/322

On a new install of Debian / webvirtmgr I'm unable to create new instances:

libvir: Domain Config error : unknown OS type None
ERROR:django.request:Internal Server Error: /create/1/
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/var/www/webvirtmgr/create/views.py", line 129, in create
    conn.delete_volume(volumes.keys()[0])
  File "/var/www/webvirtmgr/vrtManager/create.py", line 107, in delete_volume
    vol.delete()
TypeError: delete() takes exactly 2 arguments (1 given)

From /var/log/libvirt/libvirtd.log:

error : virDomainDefParseXML:8303 : unknown OS type None

This results in a 500 Internal Server Error. The volume is created, but the instance is not.

Originally created by @matthanley on GitHub (May 26, 2014). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/322 On a new install of Debian / webvirtmgr I'm unable to create new instances: ``` libvir: Domain Config error : unknown OS type None ERROR:django.request:Internal Server Error: /create/1/ Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/var/www/webvirtmgr/create/views.py", line 129, in create conn.delete_volume(volumes.keys()[0]) File "/var/www/webvirtmgr/vrtManager/create.py", line 107, in delete_volume vol.delete() TypeError: delete() takes exactly 2 arguments (1 given) ``` From `/var/log/libvirt/libvirtd.log`: ``` error : virDomainDefParseXML:8303 : unknown OS type None ``` This results in a 500 Internal Server Error. The volume is created, but the instance is not.
kerem closed this issue 2026-02-27 16:38:36 +03:00
Author
Owner

@retspen commented on GitHub (May 27, 2014):

Can you show you capabilities?

$ virsh capabilities
<!-- gh-comment-id:44320068 --> @retspen commented on GitHub (May 27, 2014): Can you show you capabilities? ``` $ virsh capabilities ```
Author
Owner

@matthanley commented on GitHub (May 30, 2014):

Reinstalled on a different host and it works correctly - originally attempted installation on an Atom host w/out VTx which I believe was the issue.

<!-- gh-comment-id:44654261 --> @matthanley commented on GitHub (May 30, 2014): Reinstalled on a different host and it works correctly - originally attempted installation on an Atom host w/out VTx which I believe was the issue.
Author
Owner

@tirili commented on GitHub (Oct 20, 2014):

This issue still exists. CentOS 6.5.
Message is: libvir: Domain Config error : unknown OS type None

virsh capabilities shows:

<capabilities>

  <host>
    <uuid>00000000-0000-0000-0000-6c626d762dc5</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>Nehalem</model>
      <vendor>Intel</vendor>
      <topology sockets='1' cores='4' threads='2'/>
      <feature name='rdtscp'/>
      <feature name='pdcm'/>
      <feature name='xtpr'/>
      <feature name='tm2'/>
      <feature name='est'/>
      <feature name='vmx'/>
      <feature name='ds_cpl'/>
      <feature name='monitor'/>
      <feature name='dtes64'/>
      <feature name='pbe'/>
      <feature name='tm'/>
      <feature name='ht'/>
      <feature name='ss'/>
      <feature name='acpi'/>
      <feature name='ds'/>
      <feature name='vme'/>
    </cpu>
    <power_management>
      <suspend_mem/>
      <suspend_disk/>
    </power_management>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num='1'>
        <cell id='0'>
          <cpus num='8'>
            <cpu id='0'/>
            <cpu id='1'/>
            <cpu id='2'/>
            <cpu id='3'/>
            <cpu id='4'/>
            <cpu id='5'/>
            <cpu id='6'/>
            <cpu id='7'/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <secmodel>
      <model>none</model>
      <doi>0</doi>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
    </secmodel>
  </host>

</capabilities>

How can it being debugged?
How can a instance being created?

<!-- gh-comment-id:59841752 --> @tirili commented on GitHub (Oct 20, 2014): This issue still exists. CentOS 6.5. Message is: libvir: Domain Config error : unknown OS type None virsh capabilities shows: ``` xml <capabilities> <host> <uuid>00000000-0000-0000-0000-6c626d762dc5</uuid> <cpu> <arch>x86_64</arch> <model>Nehalem</model> <vendor>Intel</vendor> <topology sockets='1' cores='4' threads='2'/> <feature name='rdtscp'/> <feature name='pdcm'/> <feature name='xtpr'/> <feature name='tm2'/> <feature name='est'/> <feature name='vmx'/> <feature name='ds_cpl'/> <feature name='monitor'/> <feature name='dtes64'/> <feature name='pbe'/> <feature name='tm'/> <feature name='ht'/> <feature name='ss'/> <feature name='acpi'/> <feature name='ds'/> <feature name='vme'/> </cpu> <power_management> <suspend_mem/> <suspend_disk/> </power_management> <migration_features> <live/> <uri_transports> <uri_transport>tcp</uri_transport> </uri_transports> </migration_features> <topology> <cells num='1'> <cell id='0'> <cpus num='8'> <cpu id='0'/> <cpu id='1'/> <cpu id='2'/> <cpu id='3'/> <cpu id='4'/> <cpu id='5'/> <cpu id='6'/> <cpu id='7'/> </cpus> </cell> </cells> </topology> <secmodel> <model>none</model> <doi>0</doi> </secmodel> <secmodel> <model>dac</model> <doi>0</doi> </secmodel> </host> </capabilities> ``` How can it being debugged? How can a instance being created?
Author
Owner

@retspen commented on GitHub (Oct 21, 2014):

What CPU model do you use?

<!-- gh-comment-id:59894900 --> @retspen commented on GitHub (Oct 21, 2014): What CPU model do you use?
Author
Owner

@tirili commented on GitHub (Oct 21, 2014):

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 26
model name      : Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
stepping        : 4
cpu MHz         : 2668.000
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 0
cpu cores       : 4
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5346.86
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:
<!-- gh-comment-id:59895309 --> @tirili commented on GitHub (Oct 21, 2014): ``` processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 26 model name : Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz stepping : 4 cpu MHz : 2668.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 11 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid bogomips : 5346.86 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: ```
Author
Owner

@retspen commented on GitHub (Oct 21, 2014):

egrep -c '(vmx|svm)' /proc/cpuinfo

If 0 it means that your CPU doesn't support hardware virtualization.
If 1 or more it does - but you still need to make sure that virtualization is enabled in the BIOS.

<!-- gh-comment-id:59896047 --> @retspen commented on GitHub (Oct 21, 2014): `egrep -c '(vmx|svm)' /proc/cpuinfo` If 0 it means that your CPU doesn't support hardware virtualization. If 1 or more it does - <strong>but you still need to make sure that virtualization is enabled in the BIOS</strong>.
Author
Owner

@tirili commented on GitHub (Oct 21, 2014):

I have it:

# egrep -c '(vmx|svm)' /proc/cpuinfo
1

(I've been running VMware before on this system).

<!-- gh-comment-id:59933321 --> @tirili commented on GitHub (Oct 21, 2014): I have it: ``` # egrep -c '(vmx|svm)' /proc/cpuinfo 1 ``` (I've been running VMware before on this system).
Author
Owner

@retspen commented on GitHub (Oct 21, 2014):

How about BIOS? VMware can work without hardware virtualization.

<!-- gh-comment-id:59933848 --> @retspen commented on GitHub (Oct 21, 2014): How about BIOS? VMware can work without hardware virtualization.
Author
Owner

@Nowaker commented on GitHub (Nov 6, 2014):

CentOS 6.6. In my case it's a KVM guest, but nested virtualization is enabled on the host so all should be OK. vmx is visible on the guest.

% systool -m kvm_intel -v | grep nested                   
    nested              = "Y"

The problem is unknown OS type None, it's virsh capabilities on CentOS:

<capabilities>

  <host>
    <uuid>7b59d93e-1051-47fc-8574-508f24f45202</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>SandyBridge</model>
      <vendor>Intel</vendor>
      <topology sockets='2' cores='1' threads='1'/>
      <feature name='hypervisor'/>
      <feature name='osxsave'/>
      <feature name='pcid'/>
      <feature name='vmx'/>
      <feature name='ss'/>
      <feature name='vme'/>
      <pages unit='KiB' size='4'/>
      <pages unit='KiB' size='2048'/>
    </cpu>
    <power_management>
      <suspend_mem/>
      <suspend_disk/>
    </power_management>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
        <uri_transport>rdma</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num='1'>
        <cell id='0'>
          <memory unit='KiB'>1922200</memory>
          <cpus num='2'>
            <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
            <cpu id='1' socket_id='1' core_id='0' siblings='1'/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <secmodel>
      <model>selinux</model>
      <doi>0</doi>
      <baselabel type='kvm'>system_u:system_r:svirt_t:s0</baselabel>
      <baselabel type='qemu'>system_u:system_r:svirt_t:s0</baselabel>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
      <baselabel type='kvm'>+99:+99</baselabel>
      <baselabel type='qemu'>+99:+99</baselabel>
    </secmodel>
  </host>

</capabilities>
<!-- gh-comment-id:62040799 --> @Nowaker commented on GitHub (Nov 6, 2014): CentOS 6.6. In my case it's a KVM **guest**, but nested virtualization is enabled on the host so all should be OK. `vmx` is visible on the guest. ``` % systool -m kvm_intel -v | grep nested nested = "Y" ``` The problem is `unknown OS type None`, it's `virsh capabilities` on CentOS: ``` xml <capabilities> <host> <uuid>7b59d93e-1051-47fc-8574-508f24f45202</uuid> <cpu> <arch>x86_64</arch> <model>SandyBridge</model> <vendor>Intel</vendor> <topology sockets='2' cores='1' threads='1'/> <feature name='hypervisor'/> <feature name='osxsave'/> <feature name='pcid'/> <feature name='vmx'/> <feature name='ss'/> <feature name='vme'/> <pages unit='KiB' size='4'/> <pages unit='KiB' size='2048'/> </cpu> <power_management> <suspend_mem/> <suspend_disk/> </power_management> <migration_features> <live/> <uri_transports> <uri_transport>tcp</uri_transport> <uri_transport>rdma</uri_transport> </uri_transports> </migration_features> <topology> <cells num='1'> <cell id='0'> <memory unit='KiB'>1922200</memory> <cpus num='2'> <cpu id='0' socket_id='0' core_id='0' siblings='0'/> <cpu id='1' socket_id='1' core_id='0' siblings='1'/> </cpus> </cell> </cells> </topology> <secmodel> <model>selinux</model> <doi>0</doi> <baselabel type='kvm'>system_u:system_r:svirt_t:s0</baselabel> <baselabel type='qemu'>system_u:system_r:svirt_t:s0</baselabel> </secmodel> <secmodel> <model>dac</model> <doi>0</doi> <baselabel type='kvm'>+99:+99</baselabel> <baselabel type='qemu'>+99:+99</baselabel> </secmodel> </host> </capabilities> ```
Author
Owner

@Nowaker commented on GitHub (Nov 6, 2014):

    def get_os_type(self):
        """Get guest capabilities"""
        return util.get_xml_path(self.get_cap_xml(), "/capabilities/guest/os_type")

There's no <guest /> in virsh capabibilities. I guess this should be better handled in the UI - if there's no <guest />, then obviously no VM can be created. A message like "Make sure your CPU has virtualization extensions, you enabled virt in BIOS or installed all required packages, e.g. qemu" would be helpful.

In my case it's lack of... qemu. :) Forgot to install it. @tirili Make sure you do.

<!-- gh-comment-id:62044176 --> @Nowaker commented on GitHub (Nov 6, 2014): ``` def get_os_type(self): """Get guest capabilities""" return util.get_xml_path(self.get_cap_xml(), "/capabilities/guest/os_type") ``` There's no `<guest />` in `virsh capabibilities`. I guess this should be better handled in the UI - if there's no `<guest />`, then obviously no VM can be created. A message like "Make sure your CPU has virtualization extensions, you enabled virt in BIOS or installed all required packages, e.g. qemu" would be helpful. In my case it's lack of... qemu. :) Forgot to install it. @tirili Make sure you do.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#252
No description provided.