Archives

Categories

Video Mode and KVM

I recently changed my KVM servers to use the kernel command-line parameter nomodeset for the virtual machine kernels so that they don’t try to go into graphics mode. I do this because I don’t have X11 or VNC enabled and I want a text console to use with the -curses option of KVM. Without the nomodeset KVM just says that it’s in 1024*768 graphics mode and doesn’t display the text.

Now my KVM server running Debian/Unstable has had it’s virtual machines start going into graphics mode in spite of nomodeset parameter. It seems that an update to QEMU has added a new virtual display driver which recent kernels from Debian/Unstable support with the bochs_drm driver, and that driver apparently doesn’t respect nomodeset.

The solution is to create a file named /etc/modprobe.d/blacklist.conf with the contents “blacklist bochs_drm” and now my virtual machines have a usable plain-text console again! This blacklist method works for all video drivers, you can blacklist similar modules for the other virtual display hardware. But it would be nice if the one kernel option would cover them all.

4 comments to Video Mode and KVM

  • someone

    Why are you telling kvm to give the VMs VGA devices? Shouldn’t you use serial console?

  • Simon Déziel

    Have you ever used the serial console device? Works quite well IMHO and with systemd, all you need to do is tell the kernel which console to log to and once the kernel is booted, systemd will spawn a login shell on that same console.

  • Thanks for the suggestion, I’ll consider that next time I make a change. At the moment I have the VGA text mode working nicely so I’ll try and accumulate some uptime. ;)

  • John Smith

    You can also run QEMU with -vga virtio