Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I recently discovered that qemu-kvm has a very promising -curses option that, instead of starting an X window, will show a nice ncurses output from the guest suitable for managing a Linux guest from the command line (or, more satisfyingly, within a screen session, or even over ssh).

So I tried this out, and discovered that my Arch Linux guest goes into a "Graphics Mode" rendering this feature useless. From what I have been able to ascertain, the issue is that the guest kernel initializes a framebuffer to allow for higher than 80x60 character resolution (and pretty graphics). So I went on a hunt to find a way to prevent the guest kernel from starting the framebuffer. I have tried a variety of kernel parameters, nomodeset, fb=false, vga=0x0FF, vga=ask (and subsequently selecting a VGA rather than a VESA mode), to no avail: every time qemu-kvm -curses reports being in a "Graphic Mode" on the guest (after the initial boot menus), and I am unable to interact with the guest from a command line terminal on the host.

Is there any easy way to keep the guest kernel in the same mode that it starts in (no framebuffer) without changing a kernel build parameter? If not, what kernel build options should I change to compile a kernel without framebuffer support? Is there a better way to get a VM login from a terminal on the host in pure text mode (suitable to run in a screen session on the host, for example) without resorting to running sshd on the guest?

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

So the underlying module that needs to be disabled is fbcon, however Arch's kernel does not compile it as a module, so blacklisting it out. It might still be possible to identify and disable the particular driver that fbcon launches but no such driver is listed by lsmod, so qemu-kvm's driver is compiled into Arch. To disable fbcon itself, you have to use its own strange boot option syntax:

fbcon=map:99

where 99 is just some arbitrarily large number that is greater than the number of framebuffer devices on the system (usually 1-2).

See fbcon.txt for more info.

share|improve this answer
add comment

vga16fb.modeset=0 worked for me in the past (in Ubuntu). Also in Ubuntu, blacklisting all framebuffer modules (vga16fb included) worked too.

share|improve this answer
    
vga16fb.modeset=0 didn't seem to do anything in Arch. I'll try blacklisting framebuffer modules, as you suggest. Is there a good reference to look up modules (particularly framebuffer modules) so I do not miss any? –  malloc47 Feb 25 '12 at 18:02
    
Ubuntu has /etc/modprobe.d/blacklist-framebuffer.conf –  sendmoreinfo Feb 26 '12 at 21:49
    
Thanks! Found it (or something approximating it) here. May try it out in addition to disabling fbcon to see where it'll get me. –  malloc47 Feb 26 '12 at 23:14
add comment

Try running it like this:

TERM=dumb qemu-kvm -curses ...
share|improve this answer
1  
No luck. The issue appears to be the guest kernel changing modes, rather than the host terminal. –  malloc47 Feb 17 '12 at 14:34
    
@malloc47: Ah; then the issue is with Arch Linux, with which I cannot help you. –  Teddy Feb 22 '12 at 15:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.