Mailinglist Archive: opensuse (1473 mails)

< Previous Next >
Re: [opensuse] athlon unable to run qemu-kvm, poosibly caused by cpu-parameter
  • From: Julien Michielsen <julien@xxxxxxxxxxxxxxxxxx>
  • Date: Mon, 29 Jun 2009 15:08:40 +0200
  • Message-id: <200906291508.40156.julien@xxxxxxxxxxxxxxxxxx>
On Tuesday 23 June 2009 14:44:59 Michal Hrusecky wrote:
Thanks for your reply. My reply to yours is almost at the bottom, so jump to
the end to see my question.

Julien Michielsen - 22:12 22.06.09 wrote:
I didn't run into the same problem, but I'm using several virtual
machines with kvm and I never needed to specify -M or -cpu. I thought
that specific CPU is supported only by qemu with disabled kvm support
and to make use of kvm I never used -M or -cpu with kvm. Anyway athlon
can be probably treated as i386 and I guess Windows detects only
architecture (if they support any other architecture then i386). I
would try to use image of CD-ROM on my disk instead of real cdrom. I
guess it using real cd-rom can make things response slower and confuse
windows. And you can use your existing installation on hdd in kvm,
although I'm not sure if windows are able to handle such a hardware
change. But it would be quite dangerous, if you'll access same
partition from two different places... It can lead to filesystem
inconsistency. You can use

kvm -hda /dev/sda

but as this is really dangerous unless you are sure that you will use
it in right way and you've got good bootloader and you know what are
you doing, I wouldn't suggest it. I'll recommend you to try to install
your windows using cdrom image first.

Thank you for your reply. As a start I issued the qemu-kvm with the least
parameters possible, and I tried

qemu-kvm -M pc -m 1G -cpu athlon -hda /dev/sda2 -boot d
/mnt/a14/winxp.img

but this did not work, and I got the output
open /dev/kvm: No such file or directory
Could not initialize KVM. Do you have kvm-amd or kvm-intel modprobe'd?
If you want to use CPU emulation, start with -no-kvm.
appearently it did not recognize the cpu, so I tried again with

qemu-kvm -M pc -m 1G -cpu athlon -hda /dev/sda2 -boot d
/mnt/a14/winxp.img open /dev/kvm: No such file or directory
Could not initialize KVM. Do you have kvm-amd or kvm-intel modprobe'd?
If you want to use CPU emulation, start with -no-kvm.

As it says, it can't find kvm kernel module. If you want to use kvm with
paravirtualization support you need appropriate kernel module loaded.
You can check if module is loaded by using following command:
lsmod | grep kvm
If it doesn't output anything, try running as root following commands:
modprobe kvm
modprobe kvm-amd

I tried to execute the modprobes you suggested. but they failed.
The active kernel:
uname -a
Linux michkloo 2.6.27.23-0.1-default #1 SMP 2009-05-26 17:02:05 -0400 x86_64
x86_64 x86_64 GNU/Linux
the corresponding modules:
ls -l /lib/modules/2.6.27.19-3.2-default/updates/x86/kvm*
-rw-r--r-- 1 root root 50496 Feb 25
19:09 /lib/modules/2.6.27.19-3.2-default/updates/x86/kvm-amd.ko
-rw-r--r-- 1 root root 77176 Feb 25
19:09 /lib/modules/2.6.27.19-3.2-default/updates/x86/kvm-intel.ko
-rw-r--r-- 1 root root 250176 Feb 25
19:09 /lib/modules/2.6.27.19-3.2-default/updates/x86/kvm.ko

Even though the module is named kvm-amd.ko , it shows a different name in
lsmod:
lsmod|grep kvm
kvm_amd 31744 0
kvm 172536 1 kvm_amd

in lsmod it is shown with underscore: kvm_amd,


And least parameters possible would be:
qemu-kvm -m 1G -hda /dev/sda2 -boot d /mnt/a14/winxp.img
But this will run kvm while assuming that /dev/sda2 if your whole disk
and windows partitioner will try to partition that disk. If you want to
install new clean windows, I would prefer qcow2 image on disk as it is
compressed and uses less disk space (and you can move it anywhere you
want (burn it on DVD and copy it back only if really need it)).



--
Julien Michielsen
julien_at_michkloo.xs4all.nl

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups