Can't use kvm -curses with virtual or ec2 kernels

Bug #569394 reported by Loïc Minier on 2010-04-24
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Undecided
Unassigned
linux-ec2 (Ubuntu)
Medium
Unassigned
qemu-kvm (Ubuntu)
Medium
Unassigned

Bug Description

Hi

I'd like to run kvm -kernel <kernel file> -hda <UEC image> -append "/proc/cmdline stuff" but this fails badly with both the EC2 and Virtual kernels.

With the files from:
http://uec-images.ubuntu.com/lucid/current/unpacked/

Trying to run:
kvm -kernel lucid-server-uec-amd64-vmlinuz-ec2 -hda lucid-server-uec-amd64.img -curses -append "root=/dev/sda"
or:
kvm -kernel lucid-server-uec-amd64-vmlinuz-virtual -hda lucid-server-uec-amd64.img -curses -append "root=/dev/sda"

Fails awfully.

I tried all combinations of nomodeset, vga=none, modeset=0, vga.nomodeset, vga.modeset=0, vga=ask and what not, but all failed.

During the early kernel init, the VGA adapter emulated by kvm switches to graphics mode after:
[...]
[ 1.073901] EXT3-fs: mounted filesystem with ordered data mode.
[ 1.074640] VFS: Mounted root (ext3 filesystem) readonly on device 8:0.
[ 1.075983] devtmpfs: mounted
[ 1.076955] Freeing unused kernel memory: 796k freed
[ 1.093995] Write protecting the kernel read-only data: 7788k

I just get "640 x 480 Graphic mode" filling my whole remote terminal, and can't interact with the curses vm anymore.

the -ec2 kernels in particular give some spectacularly corrupted output.

Thanks,

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: linux-ec2 (not installed)
ProcVersionSignature: Ubuntu 2.6.32-21.32-server 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-server x86_64
Architecture: amd64
Date: Sat Apr 24 13:23:44 2010
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
SourcePackage: linux-meta-ec2

Loïc Minier (lool) wrote :

Host is up-to-date lucid RC + updates.

Dustin Kirkland  (kirkland) wrote :

Loic-

Try adding fb=0 on your kernel line (or it might be fb=false).

I used to be able to hack the ISO itself with:

 * sed -i "s/initrd.gz quiet --/initrd.gz fb=0 -- /" hardy.iso

I just tried it with current Lucid ISOs and this doesn't work any more since we've moved to the world of Plymouth on servers too.

Dustin Kirkland  (kirkland) wrote :

I also just tried:

kvm -kernel lucid-server-uec-amd64-vmlinuz-virtual -hda lucid-server-uec-amd64.img -curses -append "root=/dev/sda fb=0"

This, too, works, until we go into graphic mode. Plymouth, I suppose?

Changed in qemu-kvm (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Changed in linux-ec2 (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Dustin Kirkland  (kirkland) wrote :

I'll mark "confirmed", as I can reproduce this.

However, this bug isn't in qemu-kvm itself. It's in Ubuntu's userspace, with whatever is not detecting and respecting the fb=0 and vga-off parameters. Scott, do you know what this would be, and how to disable it properly?

Loïc Minier (lool) wrote :

Dustin, could you try with the -ec2 kernel as well? It's for that testcase that I added a qemu-kvm task; perhaps this should be a separate bug though.

Steve Langasek (vorlon) wrote :

What are fb=0 and vga-off supposed to do? Avoid loading any fb modules? Are these documented/standardized somewhere?

affects: plymouth (Ubuntu) → initramfs-tools (Ubuntu)

Steve-

"vga-off" was a fuzzy placeholder for the various ways that Loic tried
turning vga mode off.

"fb=0" seems to me to work the same as "fb=false", but that's purely
through experimentation on my part, and not from documentation.

Colin Watson (cjwatson) wrote :

fb=false is specific to debian-installer (and, as I have mentioned before to Dustin, fb=0 is out of spec and only works by luck - we won't hesitate to break that if it results in cleaner code elsewhere); it is meaningless outside the context of the installer.

Marc Bevand (bevand-m) wrote :

I have encountered the same problem. My workaround is to simply prevent the vga16fb kernel module from loading in the guest as explained in http://blog.zorinaq.com/?e=7

Michael Vogt (mvo) wrote :

I ran into this as well and we should really have a common "nofb" like switch that is honored by kernel/plymouth etc.

Dustin Kirkland  (kirkland) wrote :

Michael-

I would absolutely *love* this. I begged for this at Lucid UDS in
Dallas. What would it take to make this happen? I think it would
need to be provided by the Kernel/Foundations team. Can you help
guide this through?

Nicolas Valcarcel (nvalcarcel) wrote :

Still present in Lucid final

Scott Moser (smoser) wrote :

I believe this is fix-released in maverick. I use -curses when booting the uec images under kvm. At most, to make it work you have to blacklist vga16fb.

That path *does* append to /etc/modprobe.d/blacklist.conf before upstart runs. It adds the following:
blacklist vga16fb

Serge Hallyn (serge-hallyn) wrote :

Marking this Fix Released per Scott's comment. If you still see it in Lucid, please comment here or mark this as affecting lucid.

Changed in qemu-kvm (Ubuntu):
status: Confirmed → Fix Released
Changed in initramfs-tools (Ubuntu):
status: New → Fix Released
Changed in linux-ec2 (Ubuntu):
status: Confirmed → Fix Released
arun mittal (arunncce2089) wrote :

I still see that error

I installed KVM and create VM in /root. I used following command.

ubuntu-vm-builder kvm lucid --arch 'amd64' --mem '1024' --rootsize '20480' --kernel-flavour 'generic' --hostname 'ubuntu' --mirror 'http://archive.ubuntu.com/ubuntu' --components 'main' --name 'blah' --user 'ubuntu' --pass 'ubuntu' --removepkg=cron --dest=/root/vm1 --addpkg openssh-server

I see it created run.sh tmp3PEhI_.qcow2 in /root/vm1/. When i do ./run.sh -curses, I still see "640 x 480 Graphic mode". I added blacklist vga16fb in /etc/modprobe.d/blacklist.conf but it did not work.

I followed the post http://blog.zorinaq.com/?e=7, but it did not help either. I am not sure what am i doing wrong.

The content of my run.sh is

#!/bin/sh

exec kvm -m 1024 -smp 1 -drive file=tmp3PEhI_.qcow2 "$@"

Serge Hallyn (serge-hallyn) wrote :

@Arun,

as Scott said in comment #13, you must blacklist vga16fb by placing the line

blacklist vga16fb

in the file /etc/modprobe.d/blacklist.conf . The cloud images do this automatically, but since you are building your images with vmbuilder, you must either have vmbuilder do it for you with a hook, or do it by hand on a first boot with vnc.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers