5

According to tests the Mac Mini 3,1 CPU is 64-bit (grep -q "^flags.*\blm\b" /proc/cpuinfo) and supports Intel virtualization extensions (grep -q "^flags.*\bvmx\b" /proc/cpuinfo). However, after running kvm -m 512 -boot d -cdrom archlinux-2012.07.15-netinstall-dual.iso and looking in the Hardware Detection Tool, the processor is listed as not x86_64. Using -cpu kvm64 doesn't help. Is it also necessary to have a 64-bit kernel (I don't)?

l0b0
  • 51,350
  • Have a look at http://unix.stackexchange.com/questions/43539/what-do-the-flags-in-proc-cpuinfo-mean - svm is the flag for AMD not Intel, i highly doubt your system has a svm flag (but this is probably unrelated to your problem) – Ulrich Dangel Jul 31 '12 at 13:28

2 Answers2

9

I'm sorry to tell but seems like it, you need an x86_64 kernel on the host in order to run a 64bit guest.

Looking at KVM FAQ, we could read:

Can KVM run a 32-bit guest on a 64-bit host? What about PAE?

KVM supports 32-bit guests on 64-bit hosts, and any combination of PAE and non-PAE guests and hosts. The only unsupported combination is a 64-bit guest on a 32-bit host.

Virtualizing a 64bits guest on a 32bits host, would be more like an "emulation" because there would be instructions from your guest, your host won't understand. They're both different architectures but I guess we can virtualize 32 bits guest on a 64 bits host cause both architectures share a common base...

tripledes
  • 1,207
  • It's too bad that they talk about "host", since it's not at all clear whether they mean the CPU or the kernel. Ah well. – l0b0 Jul 31 '12 at 19:20
  • @l0b0 On Linux, you need a 64-bit kernel to run anything 64-bit. VirtualBox however can run a 64-bit guest on a 32-bit host kernel as long as your CPU has virtualization extensions (vmx/svm). – Gilles 'SO- stop being evil' Jul 31 '12 at 22:52
  • And the performance is correspondingly horrible. It's best to use a 64-bit host if you intend to virtualize 64-bit guests. – Michael Hampton Jul 31 '12 at 23:24
  • After seeing @Gilles answer I went to VirtualBox documentation and they say there's overhead in such an environment so I guess they do some sort of translation/emulation that is making it to have bad performance. – tripledes Jul 31 '12 at 23:31
0

You can use qemu command line argument to assign special virtual cpu. There are some type 32bit cpu.

-cpu model

Select CPU model (-cpu ? for list and additional feature selection)

qemu-system-x86_64 -cpu ? x86 qemu64 QEMU Virtual CPU version 1.4.2
x86 phenom AMD Phenom(tm) 9550 Quad-Core Processor
x86 core2duo Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz x86 kvm64 Common KVM processor
x86 qemu32 QEMU Virtual CPU version 1.4.2
x86 kvm32 Common 32-bit KVM processor
x86 coreduo Genuine Intel(R) CPU T2600 @ 2.16GHz x86 486
x86 pentium
x86 pentium2
x86 pentium3
x86 athlon QEMU Virtual CPU version 1.4.2
x86 n270 Intel(R) Atom(TM) CPU N270 @ 1.60GHz
x86 Conroe Intel Celeron_4x0 (Conroe/Merom Class Core 2)
x86 Penryn Intel Core 2 Duo P9xxx (Penryn Class Core 2)
x86 Nehalem Intel Core i7 9xx (Nehalem Class Core i7)
x86 Westmere Westmere E56xx/L56xx/X56xx (Nehalem-C)
x86 SandyBridge Intel Xeon E312xx (Sandy Bridge)
x86 Haswell Intel Core Processor (Haswell)
x86 Opteron_G1 AMD Opteron 240 (Gen 1 Class Opteron)
x86 Opteron_G2 AMD Opteron 22xx (Gen 2 Class Opteron)
x86 Opteron_G3 AMD Opteron 23xx (Gen 3 Class Opteron)
x86 Opteron_G4 AMD Opteron 62xx class CPU
x86 Opteron_G5 AMD Opteron 63xx class CPU