Alex
Alex

Reputation: 879

KVM install and QEMU install

I try to install qemu, but I should intall the kvm first, and I have checked my cpu supporting the visualization, so I don't know why. Here is the error, when I input kvm.

open /dev/kvm: No such file or directory Could not initialize KVM, will disable KVM support

And a new window for qemu comes out, but there are

boot failed....could not read the boot disk, could not read from CDROM(code 0003)

What can I do. I searched the methods for a long time. Thanks!

when I use mobprobe, the problem is here, (I checked my CPU, it supports VMX.)

FATAL: Error inserting kvm_intel (/lib/modules/2.6.38-8-generic/kernel/arch/x86/kvm/kvm-intel.ko): Operation not supported

When I use:~$ kvm -cdrom img.iso -hda disk.img -boot d

open /dev/kvm: No such file or directory Could not initialize KVM, will disable KVM support kvm: -cdrom img.iso: could not open disk image img.iso: No such file or directory

I don't know why..... Thanks!

Upvotes: 0

Views: 11593

Answers (5)

Armin
Armin

Reputation: 113

try to load kvm-intel or kvm-amd kernel modules, then take a look at dmesg, if loaded successfully you should be good to go

Upvotes: 0

user95331
user95331

Reputation: 1

Check the VM xml CD-ROM is set as 'file' not 'block'.

Upvotes: 0

Wayne
Wayne

Reputation: 651

Your problem is your system does not have KVM modules inserted. Please check your BIOS setting regarding VT is enabled, and also your KVM module matches your specific Linux distribution. An unmatched version of KVM module and Linux cannot be inserted.

Upvotes: 0

Mike
Mike

Reputation: 847

The "could not open disk image img.iso" problem is the easier of the two errors: that file does not exist. That argument means "mount the disk image in the file img.iso as the CD-ROM"; that file must exist (and should be a valid ISO). Try downloading a ISO of any Linux flavor, for example.

disk.img must also exist (that argument means "use the disk image contained in the file disk.img as the hard disk"). You can create it using dd, e.g.:

dd if=/dev/zero of=images/disk.img bs=512M count=20

That will create a 10GB disk image in a file called disk.img. Adjust the block size and # of blocks (bs and count) to increase or decrease the size; bs cannot be larger than available memory.

For the second problem, Could not initialize KVM, will disable KVM, there are a number of possible causes:

  • disabled in BIOS
  • you are not running as root (i.e. using sudo) and your user cannot access /dev/kvm
  • the machine you are on is already virtualized (e.g. you are using Amazon EC2). These CPUs may have the VMX flag (because they are paravirtualized) but cannot be virtualized (because the hypervisor won't allow it.)

Note that this is NOT a fatal error; qemu can run without KVM support, it just runs in emulation mode and is quite slow.

The first problem will probably produce some output, examine the output of dmesg (dmesg | grep kvm). It can be solved by enabling it in BIOS.

The second problem can be diagnosed easily by running the commands as root instead of as a user. If that works, you have identified the problem.

The third problem is more difficult to resolve. XEN-blanket may help.

Pasting the output of "sudo kvm-ok" might be allow someone to offer more insight.

The instructions given in here would be translatable to other platforms: https://help.ubuntu.com/community/KVM/Installation

If you provide more information about the machines you are using and your desired goals, we can be more helpful.

Upvotes: 4

Beastcraft
Beastcraft

Reputation: 375

Did you check your BIOS-Settings? Some BIOS let you choose wether you want to activate VT / VMX or not.

Furthermore, I've found following, pretty similiar thread: http://ubuntuforums.org/archive/index.php/t-755122.html

Hope this helps

Upvotes: 0

Related Questions