Linux KVM guest hanging after several weeks

kvm-virtualizationlinux

I've got a Linux KVM guest that hangs after several weeks. Looking at the virt-manager window shows 100% CPU usage. virsh reboot guest doesn't take any effect, the guest needs to be forced off. On the guest I can see no indication of what went wrong. I've scanned /var/log/messages and just about any other log file that can might tell me something. After rebooting the system is stable for several weeks and then hangs again.

I've tried the following things:

  • Add clocksource=acpi_pm to the kernel boot options
  • Changing the disk bus from Virtio to IDE
  • Changing the NIC to e1000

All to no avail. Right now I'm at a point where I reboot the server on a weekly basis.

Are there any other ways to diagnose what is going wrong here? Or any other changes that might be made?

Best Answer

try to get something from qemu log from /var/log/libvirt/qemu/<domain-id>.log.

If your VM hangs, try to use guestfs to inspect VM disk file and check /var/log/messages and/or /var/log/dmesg to see what happens inside the VM.