Libvirt:錯誤沒有可用於 virt 類型“hvm”、arch“x86_64”、域類型“kvm”的域

Libvirt:錯誤沒有可用於 virt 類型“hvm”、arch“x86_64”、域類型“kvm”的域

像這樣安裝virt-man

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

啟動 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 

它會拋出一個錯誤:

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

驗證命令顯示一切都應該有效。

$ 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

我發現的標準解決方案通常與缺少內核模組(例如 kvm_intel)相關,但它已加載,儘管有警告

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

更新:這裡有更多資訊:

$ 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:

答案1

就我而言,問題在於 BIOS 中禁用了硬體虛擬化。我也處於無法打開它的狀態。用“qemu”替換“kvm”解決了我的問題。

答案2

找到解決方案

似乎應該要--connect qemu:///system加上參數,irc 中的一個人提出這是因為在我的機器上安裝了 virtualbox。

然後我就陷入了這個錯誤:

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

我必須使用virt-manager實際啟動虛擬機器..然後它會自動建立預設網路。

相關內容