Bug#599200: base-installer: Install amd64 kernel on i686 kvm guest - and fail to boot
On Wed, Oct 06, 2010 at 12:01:45AM +0200, Petter Reinholdtsen wrote:
> [Lennart Sorensen]
> > I suspect if you run kvm with the -cpu option you can specify what
> > you desire. I believe the default is to simply match whatever the
> > host has, so if the host has a 64bit cpu, then the guest will too.
> Well, the host is using a 32-bit kernel too, so 64-bit kvm with
> hardware virtualization is not really an option.
> meta:/# kvm -cpu ?
> x86 qemu64
> x86 phenom
> x86 core2duo
> x86 qemu32
> x86 coreduo
> x86 486
> x86 pentium
> x86 pentium2
> x86 pentium3
> x86 athlon
> x86 n270
> This is the command line for the kvm instance in question:
> /usr/bin/kvm -S -M pc -m 512 -smp 1 -name pxetest
> -uuid 9b733365-92e6-6b1f-7ad6-8a4f0caf6bfc
> -monitor unix:/var/lib/libvirt/qemu/pxetest.monitor,server,nowait -boot c
> -drive file=/var/lib/libvirt/images/pxetest.img,if=ide,bus=0,unit=0,boot=on
> -drive file=/var/lib/libvirt/debian-edu-amd64-i386-DVD-squeeze-test.iso,if=ide,media=cdrom,bus=1,unit=0
> -net nic,macaddr=54:52:00:68:97:39,vlan=0,name=net0
> -net tap,fd=48,vlan=0,name=hostnet0
> -net nic,macaddr=52:54:00:04:a3:34,vlan=1,name=net1
> -net tap,fd=49,vlan=1,name=hostnet1 -serial pty -parallel none
> -usb -usbdevice tablet -vnc 127.0.0.1:6 -k en-us -vga cirrus
> -soundhw es1370
> Anyone know how to detect 32-bits kvm virtual machines on a 32-bits
> host on a CPU capable of running 64-bit kernels? Can we just look at
> the vendor_id, model name, cpu family and model settings and disable
> amd64 as an option if these are listed:
> vendor_id : GenuineIntel
> cpu family : 6
> model : 2
> model name : QEMU Virtual CPU version 0.10.0
Well try starting the kvm with '-cpu qemu32'. That should provide the
feature flags of a nice 32bit x86.
Then see what cpu flags you get in the guest.
As for the problem that the guest sees the lm flag on a 32bit
host, that was at least a known bug last year (for example:
https://bugzilla.redhat.com/show_bug.cgi?id=481274), but I have no idea
if it has been solved yet.