error: unknown OS type hvm - help deploying VM - OpenNebula [closed]

I have the following errors when I try to create a VM:

Log:

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

VM info:

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

VM template:

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

Solution 1:

Check if the kvm modules are correctly loaded (probably, they aren't) with:

# lsmod | grep kvm

It should print something like:

kvm_intel             121968  0 
kvm                   287708  1 kvm_intel

If not, check that you have correctly installed qemu-kvm. On Ubuntu/Debian:

# sudo apt-get install qemu-kvm

You can also try to load that modules manually with:

# sudo modprobe kvm

Another common problem, is that you are trying to use kvm on an host with a CPU without virtualization support, or with virtualization support disabled by BIOS (check your motherboard/CPU documentation). On Linux, it's easy to look for this with just this command:

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

Finally, I see that you are using an image called "ttylinux - VMware", but you are trying to use KVM, so you should probably try with this one.