[libvirt] libvirt arch detection on x86_64 host

I have a 64-bit host that is running a 32-bit OS (Fedora 10). # cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 16 model : 2 model name : AMD Phenom(tm) 9850 Quad-Core Processor stepping : 3 cpu MHz : 2511.416 cache size : 512 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs bogomips : 5022.83 clflush size : 64 power management: ts ttp tm stc 100mhzsteps hwpstate processor : 1 vendor_id : AuthenticAMD cpu family : 16 model : 2 model name : AMD Phenom(tm) 9850 Quad-Core Processor stepping : 3 cpu MHz : 2511.416 cache size : 512 KB physical id : 0 siblings : 4 core id : 1 cpu cores : 4 apicid : 1 initial apicid : 1 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs bogomips : 5023.06 clflush size : 64 power management: ts ttp tm stc 100mhzsteps hwpstate processor : 2 vendor_id : AuthenticAMD cpu family : 16 model : 2 model name : AMD Phenom(tm) 9850 Quad-Core Processor stepping : 3 cpu MHz : 2511.416 cache size : 512 KB physical id : 0 siblings : 4 core id : 3 cpu cores : 4 apicid : 3 initial apicid : 3 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs bogomips : 5023.06 clflush size : 64 power management: ts ttp tm stc 100mhzsteps hwpstate processor : 3 vendor_id : AuthenticAMD cpu family : 16 model : 2 model name : AMD Phenom(tm) 9850 Quad-Core Processor stepping : 3 cpu MHz : 2511.416 cache size : 512 KB physical id : 0 siblings : 4 core id : 2 cpu cores : 4 apicid : 2 initial apicid : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs bogomips : 5023.06 clflush size : 64 power management: ts ttp tm stc 100mhzsteps hwpstate # virsh nodeinfo CPU model: i686 CPU(s): 4 CPU frequency: 2511 MHz CPU socket(s): 1 Core(s) per socket: 4 Thread(s) per core: 1 NUMA cell(s): 1 Memory size: 4147340 kB # virsh capabilities <capabilities> <host> <cpu> <arch>i686</arch> </cpu> </host> <guest> <os_type>hvm</os_type> <arch name='i686'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/bin/qemu-kvm</emulator> </domain> </arch> <features> <pae/> <nonpae/> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> <guest> <os_type>hvm</os_type> <arch name='x86_64'> <wordsize>64</wordsize> <emulator>/usr/bin/qemu-system-x86_64</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> </arch> <features> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> <guest> <os_type>hvm</os_type> <arch name='mips'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu-system-mips</emulator> <machine>mips</machine> <domain type='qemu'> </domain> </arch> </guest> <guest> <os_type>hvm</os_type> <arch name='mipsel'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu-system-mipsel</emulator> <machine>mips</machine> <domain type='qemu'> </domain> </arch> </guest> <guest> <os_type>hvm</os_type> <arch name='sparc'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu-system-sparc</emulator> <machine>sun4m</machine> <domain type='qemu'> </domain> </arch> </guest> <guest> <os_type>hvm</os_type> <arch name='ppc'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu-system-ppc</emulator> <machine>g3bw</machine> <machine>mac99</machine> <machine>prep</machine> <domain type='qemu'> </domain> </arch> </guest> </capabilities> Shouldn't the host arch have been detected and identified as x86_64? Regards, Gerry

Gerry Reno schrieb:
I have a 64-bit host that is running a 32-bit OS (Fedora 10). (...) # virsh nodeinfo CPU model: i686 (...) Shouldn't the host arch have been detected and identified as x86_64?
Regards, Gerry
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
As stated by you in the beginning: You are running a 32-bit OS. You can't have more bit than the OS is providing you. /usr/bin/qemu-system-x86_64 alwas shows x86_64, even on my Core Duo. [root@rr016 kvm]# virsh -c qemu+ssh://192.168.1.103/system capabilities <capabilities> <host> <cpu> <arch>i686</arch> </cpu> </host> <guest> <os_type>hvm</os_type> <arch name='i686'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/bin/kvm</emulator> </domain> </arch> <features> <pae/> <nonpae/> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> <guest> <os_type>hvm</os_type> <arch name='x86_64'> <wordsize>64</wordsize> <emulator>/usr/bin/qemu-system-x86_64</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> </arch> <features> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> (...) </capabilities> [root@rr016 kvm]# ssh 192.168.1.103 'grep "model name" /proc/cpuinfo' Enter passphrase for key '/root/.ssh/id_rsa': model name : Genuine Intel(R) CPU T2600 @ 2.16GHz model name : Genuine Intel(R) CPU T2600 @ 2.16GHz

Gerrit Slomma wrote:
Gerry Reno schrieb:
I have a 64-bit host that is running a 32-bit OS (Fedora 10). (...) # virsh nodeinfo CPU model: i686 (...) Shouldn't the host arch have been detected and identified as x86_64?
Regards, Gerry
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
As stated by you in the beginning: You are running a 32-bit OS. You can't have more bit than the OS is providing you. /usr/bin/qemu-system-x86_64 alwas shows x86_64, even on my Core Duo.
Is it allowed to run x86_64 guest OS on x86_64 physical machine with x86 (32-bit) host OS? Regards, Gerry

On Tue, Apr 14, 2009 at 09:23:35PM -0400, Gerry Reno wrote:
Gerrit Slomma wrote:
Gerry Reno schrieb:
I have a 64-bit host that is running a 32-bit OS (Fedora 10). (...) # virsh nodeinfo CPU model: i686 (...) Shouldn't the host arch have been detected and identified as x86_64?
The host arch reflects the arch of the "hypervisor". In Xen where you have a separate Hypervisor and Dom0 OS, you can in theory use a 64-bit hypervisor and 32-bit Dom0 and still run 64-bit guests. In KVM, the host OS *is* the hypervisor, so you have to run a 64-bit host OS if you want 64-bit guests. ....unles you want to run really slow QEMU 64-bit emulation, but I'm pretty sure you don't want todo that :-)
As stated by you in the beginning: You are running a 32-bit OS. You can't have more bit than the OS is providing you. /usr/bin/qemu-system-x86_64 alwas shows x86_64, even on my Core Duo.
Is it allowed to run x86_64 guest OS on x86_64 physical machine with x86 (32-bit) host OS?
Technically it is not the host OS arch that matters, but rather the hypervisor arch. Since KVM is built-in to the Linux host OS, you need a 64-bit host OS. Really you don't want to rnu 32-bit host OS under any circumstances. 32-bit has horrible memory limitations, horrible register limitations and should be left to die an ungraceful death. 32-bit guests are fine if you so wish, but just say no to 32-bit hosts, particularly since you have 64-bit CPUs Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (3)
-
Daniel P. Berrange
-
Gerrit Slomma
-
Gerry Reno