3

I am trying to run an Ubuntu Server as a virtual machine using Qemu-KVM with all output beeing printed to the terminal. I have done that several years ago using the -curses option, tried it again and failed because of the graphics mode:

# create guestVM
# installing OS using recommended settings, but no LVM
sudo apt-get install qemu-system-x86 qemu-utils
qemu-img create guestVM.img 35G
qemu-system-i386 -enable-kvm -hda guestVM.img \ 
    -cdrom ubuntu-14.04.1-server-i386.iso -boot d -m 1024

# run guestVM with graphics
qemu-system-i386 -enable-kvm -hda guestVM.img -m 1024

# disable graphics module based on http://blog.zorinaq.com/?e=7
# and https://bugs.launchpad.net/ubuntu/+source/linux-ec2/+bug/569394
echo install vga16fb /bin/true >/etc/modprobe.d/graphics-disabled.conf  

# change grub into text mode based on http://askubuntu.com/questions/16371/
sudo nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="text" # edited
GRUB_TERMINAL=console # uncommented
sudo update-grub

If I run now my guest VM, I can access it using SSH, so it loads successfully. However the terminal gets stucked on the graphic mode after I see the grub options, therefore I think its something with Ubuntu. Any ideas?

# running the guestVM with ssh
qemu-system-i386 -enable-kvm -curses -hda guestVM.img -m 1024 \ 
    -net user,hostfwd=tcp::10022-:22 -net nic 

# check it its running with... (it is)
ssh guestuser@localhost -p10022

1 Answer 1

2

The underlying module that needs to be disabled is fbcon (99 is just some arbitrarily large number that is greater than the number of framebuffer devices on the system, usually 1-2).

# edit /etc/modprobe.d/blacklist-framebuffer.conf
+   blacklist vga16fb

# edit /etc/default/grub
-   GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
+   GRUB_CMDLINE_LINUX_DEFAULT="fbcon=map:99 text"    
+   GRUB_TERMINAL=console
sudo update-grub

You might use -curses -k lang for better keyboard support.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .