Linux Virtualization Using KVM - Tackling the /dev/fb0 not found issue
We just got a new server delivered, a Supermicro Twin 6015. My plan for this server is to slice it up into virtual servers to better utilize its resources. I have been looking at all sorts of virtualization technology, but I wanted to use something free and open source. Poking around for information, I found a new technology for Linux called KVM. KVM is a Linux kernel module that allows you to run virtual systems on newer Intel and AMD hardware with built-in virtualization support, which my server has. Even better, Ubuntu 7.10 includes KVM support in the distribution, so installation and setup is a snap- or should be. When I got to the part about installing a new VM using the kvm command, I hit a serious snag. The Linux installer started and died with an error like this:
(!) Direct/Util: opening ‘/dev/fb0′ and ‘/dev/fb/0′ failed
–> No such file or directory
(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use ‘fbdev’ option or set FRAMEBUFFER environment variable.
(!) DirectFB/Core: Could not initialize ’system’ core!
–> Initialization error!
Could not initialize SDL - exiting
I spent several hours trolling the Net looking for solutions. What I gathered from my research was that the installer was expecting the presence of a graphics framebuffer which my system did not have. In fact, my system didn't have any graphics, it was installed as a headless server.
After a lot of frustration, I finally installed Gnome on the system and logged into Gnome to see if I could set up a framebuffer in /dev/fb0 for the installer to use. Out of curiosity, I started a Terminal window from within Gnome and ran the kvm command to create a new VM. Voila! The installer started and ran OK.
UPDATE: I discovered a limitation of this technique on Intel processors. The limitation is documented in the KVM Wiki entry on real mode emulation with Intel processers. AMD processors are not affected by this issue. The easiest way to get around the problem is to install the guest OS via more traditional installer systems like anaconda that do not employ a full GUI.
I think you can also get around the bug by using VNC to run the guest OS installer. I am going to try that technique and report my findings.
