# Kernel panic on KVM virtual machine

## MikeRostermund

Hi all

I'm having a few problems with a few of my virtual machines. They tend to kernel panic once every 1-2 weeks.

I have convirt installed on a management machine where I am able to get a screenshot of the virtual machine.

http://i55.tinypic.com/wbtcv6.png

On the I've currently installed gentoo-sources 2.6.39-r3 from portage on both the host machine and the guest machine.

Their .config's are the following:

Host: http://paste.pocoo.org/show/483905

Guest: http://paste.pocoo.org/show/483903/

I've tried searching the net for similar problems but all I found was people having problems with bridged network to a virtual machine

causing kernel panic's, but the thing is that these problems should be patched already in the 2.6.38 kernel.

I usually start the virtual machine with the following command:

```
/usr/bin/qemu-system-x86_64 --enable-kvm -net nic,vlan=0,macaddr=00:16:3e:47:8a:18 -net tap,vlan=0,script=/etc/qemu-ifup-br2 -m 1024 -vnc :26 -name lisa -drive file=/dev/FKO_LVM/lisa.root,if=scsi,boot=on -drive file=/dev/FKO_LVM/lisa.swap,if=scsi -smp 2 -k da -monitor unix:/var/run/kvm/monitors/lisa,server,nowait -pidfile /var/run/kvm/pids/lisa -daemonize
```

Maybe someone know's where I should look. This is a pretty big problem since it is still current on a production system I'm trying to maintain.

If you need any more information, please ask!

Best regards

Mike

----------

## NeddySeagoon

MikeRostermund,

I'm running various flavours of gentoo-hardened on an HP Microserver both on the bare metal andf as kvm-qemu guests.

My current bare metal uptime is 

```
$ uptime

 17:56:38 up 38 days, 23:14,  1 user,  load average: 0.01, 0.15, 0.13
```

The VMs will be the same.

I manage my VMs with Virtual Machine manager, so I don't know the start command. Its buried in an XML file somewhere.

I use the virtio block and network devices, not the emulated hardware as your /usr/bin/qemu-system-x86_64 command implies you use.

Bare metal kernel config.

Virtual Machine kernel config.

----------

## MikeRostermund

NeddySeagoon,

I've now set up one of my test virtual machines to use virtio block and virtio net interfaces.

Convirt kept on bugging me, but I finally made it.

Now I just need to make the required changes on the virtual machine affected by the problem.

I'll post more when the changes have been made.

----------

## MikeRostermund

The changes to the production virtual machine has now been made, lets see how it goes.  :Smile: 

Hopefully the machine wont crash now.

----------

## MikeRostermund

Bad news  :Sad: 

After ~1 weeks uptime, the server has crashed yet again.

http://i53.tinypic.com/qntd11.png

I'm back to square one i guess.

Seems like something about the TCP-stuff is messing up.

Could this be the virtio net device acting up?

----------

## MikeRostermund

Just wanted to let you guys know, that after upgrading to kernel 3.1.5, the problem seems to be fixed.

Uptime is now 53 days+

/Mike

----------

