mrb's blog

Ubuntu 10.04 as a Guest under QEMU/KVM using the Curses Driver

Keywords: curses kvm qemu ubuntu virtualization

When running an Ubuntu 10.04 guest under QEMU/KVM, by default the guest OS will enable the legacy VGA framebuffer device driver vga16fb. This is annoying because the graphical mode used by vga16fb is incompatible with QEMU/KVM's curses driver (-curses option).

Curses console with framebuffer graphics mode

Create the following file on the guest to prevent the kernel module from being loaded:

$ echo install vga16fb /bin/true >/etc/modprobe.d/graphics-disabled.conf

This file changes the behavior of the system so that "modprobe vga16fb" executes /bin/true (which does nothing) instead of truly loading the kernel module. Now the guest boots in text mode, allowing you to enjoy the convenience of -curses, which, if you are not familiar with it, allows access to the full VGA text console —BIOS, GRUB, login(1) screen, etc— in the terminal from which QEMU/KVM is launched.

Curses console with guest in text mode

The Ubuntu developers are planning a proper option to disable the framebuffer, but work on such an option is still ongoing, see bug 569394.


Paul wrote: After beating my head against the desk for an hour I finally stumbled upon this post and it works like a charm. Thanks! 12 Jul 2010 18:43 UTC

mrb wrote: You are welcome :-) 13 Jul 2010 15:47 UTC

citizen-null wrote: Thanks, worked for me also...I had to be root. Not to experienced with 'nix so dont know if thats a given. 07 Jul 2011 21:45 UTC

Marcin wrote: How to undo these changes? 18 Sep 2011 14:16 UTC

mrb wrote: Marcin, just remove the file /etc/modprobe.d/graphics-disabled.conf 19 Sep 2011 05:33 UTC

Thorben wrote: Hi!

I added "blacklist vga16fb" to my blacklist-framebuffer.conf on Ubuntu Server 14.04.1. (and updated grub after GRUB_CMDLINE_LINUX_DEFAULT="text" +
GRUB_TERMINAL=console) However it still does not boot and hangs on 1024x768 Graphic Mode while using the "-curses" option.

Maybe they have changes something. Thank you for you effort! :)
06 Oct 2014 17:41 UTC

Jonathan wrote: I didnt need to blacklist any modules, grub and sort this all for us:



Add nomodeset to this line to prevent most things changing resolution:


Uncomment this line to keep grub in text mode:


run 'update-grub' to appy your changes.

reboot and enjoy
07 Feb 2015 09:13 UTC