Kvm-Virtualization

錯誤:未知作業系統類型 hvm - 幫助部署 VM - OpenNebula

  • April 30, 2013

嘗試創建 VM 時出現以下錯誤:

日誌:

Tue Mar 12 16:57:23 2013 [DiM][I]: New VM state is ACTIVE.
Tue Mar 12 16:57:23 2013 [LCM][I]: New VM state is PROLOG.
Tue Mar 12 16:57:23 2013 [VM][I]: Virtual Machine has no context
Tue Mar 12 16:57:24 2013 [TM][I]: clone: Cloning /opt/opennebula/var/datastores/1/c33decbb2be7e2fe5bf27d6e3ba53790 in sneakysam:/opt/opennebula/var//datastores/0/0/disk.0
Tue Mar 12 16:57:24 2013 [TM][I]: ExitCode: 0
Tue Mar 12 16:57:24 2013 [LCM][I]: New VM state is BOOT
Tue Mar 12 16:57:24 2013 [VMM][I]: Generating deployment file: /opt/opennebula/var/vms/0/deployment.0
Tue Mar 12 16:57:25 2013 [VMM][I]: ExitCode: 0
Tue Mar 12 16:57:25 2013 [VMM][I]: Successfully execute network driver operation: pre.
Tue Mar 12 16:57:25 2013 [VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy /opt/opennebula/var//datastores/0/0/deployment.0 sneakysam 0 sneakysam
Tue Mar 12 16:57:25 2013 [VMM][I]: error: Failed to create domain from /opt/opennebula/var//datastores/0/0/deployment.0
Tue Mar 12 16:57:25 2013 [VMM][I]: error: unknown OS type hvm
Tue Mar 12 16:57:25 2013 [VMM][E]: Could not create domain from /opt/opennebula/var//datastores/0/0/deployment.0
Tue Mar 12 16:57:25 2013 [VMM][I]: ExitCode: 255
Tue Mar 12 16:57:25 2013 [VMM][I]: Failed to execute virtualization driver operation: deploy.
Tue Mar 12 16:57:25 2013 [VMM][E]: Error deploying virtual machine: Could not create domain from /opt/opennebula/var//datastores/0/0/deployment.0
Tue Mar 12 16:57:25 2013 [DiM][I]: New VM state is FAILED

虛擬機資訊:

Virtual Machine information - one-0
ID            0
Name    one-0
Owner  oneadmin
Group   oneadmin
State     FAILED
LCM State           LCM_INIT
Host       --
Start time            16:57:01 03/12/2013
Deploy ID            -
Permissions        
    Owner             um-
    Group              ---
    Other               ---

虛擬機模板:

DISK       
TYPE      FILE
DATASTORE        default
TARGET                hda
IMAGE_ID           0
SAVE     NO
DISK_ID                0
SOURCE               /opt/opennebula/var/datastores/1/c33decbb2be7e2fe5bf27d6e3ba53790
IMAGE  ttylinux - VMware
READONLY          NO
IMAGE_UNAME               oneadmin
DEV_PREFIX       hd
DATASTORE_ID 1
CLONE  YES
TM_MAD            shared
CPU       1
TEMPLATE_ID    0
RAW      
TYPE      kvm
MEMORY             256
NAME   one-0
VMID    0
OS          
ARCH     i686
BOOT    hd
GRAPHICS           
TYPE      vnc
PORT     5900
LISTEN  0.0.0.0

檢查 kvm 模組是否正確載入(可能不是):

# lsmod | grep kvm

它應該列印如下內容:

kvm_intel             121968  0 
kvm                   287708  1 kvm_intel

如果沒有,請檢查您是否正確安裝了 qemu-kvm。在 Ubuntu/Debian 上:

# sudo apt-get install qemu-kvm

您還可以嘗試手動載入該模組:

# sudo modprobe kvm

另一個常見問題是,您嘗試在具有不支持虛擬化的 CPU 或 BIOS 禁用虛擬化支持的主機上使用 kvm(檢查您的主機板/CPU 文件)。在 Linux 上,只需使用以下命令即可輕鬆查找:

# egrep '^flags.*(vmx|svm)' /proc/cpuinfo

最後,我看到您正在使用一個名為“ttylinux - VMware”的映像,但您正在嘗試使用 KVM,所以您應該嘗試使用這個

引用自:https://serverfault.com/questions/488915