Bug#599200: base-installer: Install amd64 kernel on i686 kvm guest - and fail to boot
On Wed, Oct 06, 2010 at 10:39:17AM -0400, Lennart Sorensen wrote:
> On Wed, Oct 06, 2010 at 12:53:04AM +0200, Petter Reinholdtsen wrote:
> > [Lennart Sorensen]
> > > Well try starting the kvm with '-cpu qemu32'. That should provide
> > > the feature flags of a nice 32bit x86.
> > I tried this by adding
> > <cpu match='exact'>
> > <model>qemu32</model>
> > </cpu>
> > to the libvirtm XML file for the virtual machine, which caused '-cpu
> > qemu32' to be part of the kvm command line. There is no GUI to add
> > this in virt-manager, as far as I can see, so this will be out of
> > reach for most users. No idea if this give hardware virtualization or
> > software virtualization. The qemu part of the model name make me
> > suspect the latter.
> > Anyway, booting the virtual machine and looking at the CPU flags in
> > cpuinfo, I can confirm that the lm flag is gone. I also tried with
> > model=pentium3, and this too did not have the lm flag. This solve my
> > imediate problem of testing the Debian Edu DVD, but do not address the
> > problem for the unexpecting user of kvm.
> Well it is certainly a bug in kvm. Of course most people probably run
> a 64bit kernel these days, although I suppose many don't. kvm should
> not tell the guest that the cpu supports something if kvm isn't capable
> of supporting it.
It doesn't, at least not in my tests. The kvm x86 initialisation code
masks lm by default in a 32-bit kernel, and kvm-qemu does so as well when
setting the flags to be exposed to the guest. Presumably there are some
old versions that don't, but neither stable nor testing appear to have this
bug. I've asked Petter to confirm which versions he is using.
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus