# [SOLVED] qemu-kvm boots to non sense

## lalebarde

Hi all,

I have just installed qemu-kvm following this : http://en.gentoo-wiki.com/wiki/KVM

When it comes to boot an image :

```
$ qemu-img create -f qcow2 gentoo-x86-minimal.img 10G

$ kvm -hda gentoo-x86-minimal.img -cdrom /tmp/install-x86-minimal-20101102.iso  -boot d
```

Boots seems to work but with "non-sense" characters and nothing readable. It scrolls and when stopped, if I ENTER, it follows on. I tried several iso with the same result. 

Other information :

```
$ kvm -cpu ?

x86       Opteron_G3

x86       Opteron_G2

x86       Opteron_G1

x86          Nehalem

x86           Penryn

x86           Conroe

x86           [n270]

x86         [athlon]

x86       [pentium3]

x86       [pentium2]

x86        [pentium]

x86            [486]

x86        [coreduo]

x86          [kvm32]

x86         [qemu32]

x86          [kvm64]

x86       [core2duo]

x86         [phenom]

x86         [qemu64]

x86           [host]
```

```
$ qemu-system-x86_64 -cpu ?

x86       Opteron_G3

x86       Opteron_G2

x86       Opteron_G1

x86          Nehalem

x86           Penryn

x86           Conroe

x86           [n270]

x86         [athlon]

x86       [pentium3]

x86       [pentium2]

x86        [pentium]

x86            [486]

x86        [coreduo]

x86          [kvm32]

x86         [qemu32]

x86          [kvm64]

x86       [core2duo]

x86         [phenom]

x86         [qemu64]

x86           [host]
```

```
$ uname -a

Linux JANUS 2.6.30-tuxonice-r6 #10 SMP PREEMPT Mon Nov 1 16:33:11 CET 2010 x86_64 Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz GenuineIntel GNU/Linux
```

```
$ eix -AI kvm

[I] app-emulation/qemu-kvm

     Installed versions:  0.13.0!t(16:21:45 06/11/2010)(aio alsa bluetooth curl hardened ncurses qemu_softmmu_targets_i386 qemu_softmmu_targets_x86_64 qemu_user_targets_i386 qemu_user_targets_x86_64 sdl ssl -brltty -esd -fdt -kvm-trace -pulseaudio -qemu-ifup -qemu_softmmu_targets_arm -qemu_softmmu_targets_cris -qemu_softmmu_targets_m68k -qemu_softmmu_targets_microblaze -qemu_softmmu_targets_mips -qemu_softmmu_targets_mips64 -qemu_softmmu_targets_mips64el -qemu_softmmu_targets_mipsel -qemu_softmmu_targets_ppc -qemu_softmmu_targets_ppc64 -qemu_softmmu_targets_ppcemb -qemu_softmmu_targets_sh4 -qemu_softmmu_targets_sh4eb -qemu_softmmu_targets_sparc -qemu_softmmu_targets_sparc64 -qemu_user_targets_alpha -qemu_user_targets_arm -qemu_user_targets_armeb -qemu_user_targets_cris -qemu_user_targets_m68k -qemu_user_targets_microblaze -qemu_user_targets_mips -qemu_user_targets_mipsel -qemu_user_targets_ppc -qemu_user_targets_ppc64 -qemu_user_targets_ppc64abi32 -qemu_user_targets_sh4 -qemu_user_targets_sh4eb -qemu_user_targets_sparc -qemu_user_targets_sparc32plus -qemu_user_targets_sparc64 -sasl -static -vde)
```

```
$ grep KVM /usr/src/linux/.config

CONFIG_HAVE_KVM=y

CONFIG_HAVE_KVM_IRQCHIP=y

CONFIG_KVM=m

CONFIG_KVM_INTEL=m

# CONFIG_KVM_AMD is not set

# CONFIG_KVM_TRACE is not set
```

```
# lsmod | egrep "kvm|qemu"

kvm_intel              47576  3 

kvm                   155312  1 kvm_intel
```

Any clue ?Last edited by lalebarde on Sat Nov 06, 2010 11:02 pm; edited 1 time in total

----------

## Hu

That all looks correct.  Could you post a screenshot of the output?

----------

## lalebarde

 *Hu wrote:*   

> That all looks correct.  Could you post a screenshot of the output?

 

Here is as requested : http://www.monalbum.fr/Album=BLHGQUIF

BTW, the console says after ctrl-c :

```
$ kvm -hda gentoo-x86-minimal.img -cdrom /tmp/install-x86-minimal-20101102.iso  -boot d

No protocol specified

No protocol specified

No protocol specified

No protocol specified

No protocol specified

No protocol specified

Warning: Unable to initialize AAlib mouseUsing AAlib driver: Slang driver 1.0 (slang)
```

I couldn't manage to emerge app-emulation/kvm-kmod, but on the other way, it nis not requested in the howto :

```
# emerge -av app-emulation/kvm-kmod

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N    ] app-emulation/kvm-kmod-2.6.34.1  0 kB

Total: 1 package (1 new), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-emulation/kvm-kmod-2.6.34.1

>>> Failed to emerge app-emulation/kvm-kmod-2.6.34.1, Log file:

>>>  '/var/log/portage/app-emulation:kvm-kmod-2.6.34.1:20101106-222259.log'

>>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 0.50, 0.44, 0.45

 * CPV:  app-emulation/kvm-kmod-2.6.34.1

 * REPO: gentoo

 * USE:  amd64 elibc_glibc kernel_linux multilib test userland_GNU

 * ERROR: app-emulation/kvm-kmod-2.6.34.1 failed:

 *   Your kernel sources are unconfigured

 * 

 * Call stack:

 *                  ebuild.sh, line  54:  Called pkg_setup

 *   kvm-kmod-2.6.34.1.ebuild, line  24:  Called die

 * The specific snippet of code:

 *      linux_config_exists || die "Your kernel sources are unconfigured"

 * 

 * If you need support, post the output of 'emerge --info =app-emulation/kvm-kmod-2.6.34.1',

 * the complete build log and the output of 'emerge -pqv =app-emulation/kvm-kmod-2.6.34.1'.

 * The complete build log is located at '/var/log/portage/app-emulation:kvm-kmod-2.6.34.1:20101106-222259.log'.

 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/kvm-kmod-2.6.34.1/temp/die.env'.

 * S: '/var/tmp/portage/app-emulation/kvm-kmod-2.6.34.1/work/kvm-kmod-2.6.34.1'
```

----------

## lalebarde

I could emerge app-emulation/kvm-kmod after having modified the ebuild to skip the linux_config_exists. But it changes nothing.

Then I tryed as root and the problem does not appear. I also try as my usual user (after adding me in the kvm group) and it works too. So, there is something special with  the user account I created specially for kvm.

So this is eventually not a kvm-qemu problem, but a user account one.

----------

## lalebarde

After having booted once with my new user, everything works   :Very Happy:  .

Is it a bug ?

Thanks very much for your help Hu, anyhow.

----------

