Libvirt: ERROR No domains available for virt type 'hvm', arch 'x86_64', domain type 'kvm'

13,055

Solution 1

Solution found

Appears to be that --connect qemu:///system param should be added, one guy in irc proposed that this is due install of virtualbox in my machine.

Then I've been stuck with this error:

ERROR    Error in network device parameters: Virtual network 'default' has not been started.

I had to use virt-manager to actually start vm.. then it created default network automatically.

Solution 2

In my case the problem is with hardware virtualization disabled in BIOS. Also I was in a state that I can't turn that on. Replacing 'kvm' with 'qemu' fixed my problem.

Share:
13,055
sparcboy
Author by

sparcboy

Just a DevOps, who's passionate about scaling and automation. Who doesn't want to do less job anyway? DevOps practices brought a new way to decrease maintenance for the whole company, which is basically increase of profit up to 80% in some cases! My background is mostly Python with HA web services. Currently working with Kubernetes and Terraform.

Updated on September 18, 2022

Comments

  • sparcboy
    sparcboy almost 2 years

    Installed virt-man like this

    $ apt-get install virt-manager
    $ modprobe kvm
    $ modprobe vhost-net
    

    Launching libvirt guest

    $ virt-install --virt-type kvm \
    --name centos-6.5 --ram 1024 \
    --cdrom=CentOS-6.5-x86_64-minimal.iso 
    --disk centos-6.5.qcow2,format=qcow2 \ 
    --network network=default \
    --graphics vnc,listen=0.0.0.0 \
    --noautoconsole --os-type=linux \ 
    --os-variant=rhel6 
    

    And it throws an error:

    ERROR    No domains available for virt type 'hvm', arch 'x86_64', domain type 'kvm'
    

    Validate command shows that's everything should work.

    $ virt-host-validate 
    QEMU: Checking for hardware virtualization                                 : PASS
    QEMU: Checking for device /dev/kvm                                         : PASS
    QEMU: Checking for device /dev/vhost-net                                   : PASS
    QEMU: Checking for device /dev/net/tun                                     : PASS
     LXC: Checking for Linux >= 2.6.26                                         : PASS
    

    Standart solutions I've found are usually related to missing kernel modules like kvm_intel for example, but it's loaded, although with warning

    $ dmesg | grep kvm
    [   10.279733] kvm: VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL does not work properly. Using workaround
    

    Update: Here's more info:

    $ cat /proc/cpustat
    processor   : 0
    vendor_id   : GenuineIntel
    cpu family  : 6
    model       : 44
    model name  : Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
    stepping    : 2
    microcode   : 0x10
    cpu MHz     : 1596.000
    cache size  : 12288 KB
    physical id : 1
    siblings    : 8
    core id     : 0
    cpu cores   : 4
    apicid      : 32
    initial apicid  : 32
    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 pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt aes lahf_lm ida arat epb dtherm tpr_shadow vnmi flexpriority ept vpid
    bogomips    : 4788.24
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 40 bits physical, 48 bits virtual
    power management:
    
    • sparcboy
      sparcboy over 10 years
      what do you mean what I'm trying to do? you don't know what virt-install does?
    • sparcboy
      sparcboy over 10 years
      edited question, i don't know why people need explanation on bash commands in here.. but whatever if it's makes sense to you
    • David Corsalini
      David Corsalini over 10 years
      are you able to install using virt-mnager?
  • kumar
    kumar over 10 years
    <<I had to use virt-manager to actually start vm.. then it created default network automatically. RE>I think it is actually starting libvirtd service,you can do this manually /etc/init.d/libvirtd start.