View previous topic :: View next topic |
Author |
Message |
papahuhn l33t
Joined: 06 Sep 2004 Posts: 626
|
Posted: Thu Mar 01, 2012 2:06 pm Post subject: [Solved] Switch from 32bit kernel to 64bit kernel |
|
|
Hi,
I am running a pure x86 Gentoo on an x64-capable server and would like to use 64bit KVM virtual guests on it. That is only possible on a x64 host-OS, I heard. I don't have physical access to the server, so I cannot reinstall the OS the usual way. An online-migration towards x64 may be possible somehow, but the risk is too high that something goes wrong and I end up with an inaccessible server. But what if I compiled a 64bit kernel, put it in my grub.conf and rebooted? Will the kernel work with a 32bit userland? Lets assume, that it will boot correctly, will it mess up my system when I emerge new packages? Will it help me with virtualizing 64bit guests with KVM?
Thanks so far! _________________ Death by snoo-snoo!
Last edited by papahuhn on Thu Mar 01, 2012 8:22 pm; edited 1 time in total |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Thu Mar 01, 2012 2:29 pm Post subject: |
|
|
Yes, everything should work fine afterwards. Emerge doesn't care what kernel you use, it only looks at the profile.
I'm not sure if a 32-bit KVM can run 64-bit OSes, the safest workaround for that would be a 64-bit chroot install (this but inverted). |
|
Back to top |
|
|
papahuhn l33t
Joined: 06 Sep 2004 Posts: 626
|
Posted: Thu Mar 01, 2012 2:38 pm Post subject: |
|
|
Thanks for the info!
The problem with chroot is, that it's not possible to do from 32bit into 64bit. _________________ Death by snoo-snoo!
Last edited by papahuhn on Thu Mar 01, 2012 2:38 pm; edited 1 time in total |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Thu Mar 01, 2012 2:38 pm Post subject: |
|
|
Hi,
I do not think a 64 bits kernel will change anything. If your processor is 64 bits capable, a PC emulator should be able to use the capability of the processor and create a 64 bits virtual machine running in native mode without emulation even if the OS and PC emulator are a pure 32 bits (may be possible but not sure). 64 bits emulation should be also possible depending on the PC emulator you use. You have to check the architectures options at virtual machine creation. _________________ Paul
Last edited by Logicien on Thu Mar 01, 2012 2:41 pm; edited 1 time in total |
|
Back to top |
|
|
papahuhn l33t
Joined: 06 Sep 2004 Posts: 626
|
Posted: Thu Mar 01, 2012 2:41 pm Post subject: |
|
|
Yes, from the hardware's perspective that should work, but KVM does not support it. It is possible with a pure QEMU-setup, but that one is very slow. _________________ Death by snoo-snoo! |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Thu Mar 01, 2012 2:43 pm Post subject: |
|
|
I don't understand what KVM do not support exactly. Is a 32 bits KVM cannot use the 64 bits capability of the processor? Perhaps with a 64 bits kernel it will be possible. You can try VirtualBox who is faster. _________________ Paul |
|
Back to top |
|
|
papahuhn l33t
Joined: 06 Sep 2004 Posts: 626
|
Posted: Thu Mar 01, 2012 3:06 pm Post subject: |
|
|
The following does not work with KVM:
64 bit Host CPU <--> 32 bit host OS [**] <--> 64 bit KVM Guest OS
This is KVM's fault, because generally this should be possible with VT-x or AMD-V capable CPUs.
[**] And I am not sure here, what 32 bit host OS means, either. It may mean the 32 bit kernel, or it may mean the "qemu-system-x86_64" process which represents a VM. If it's the kernel only, I can switch to a 64bit version and keep the 32bit userland. If it is the qemu-system process, then I have lost. _________________ Death by snoo-snoo! |
|
Back to top |
|
|
papahuhn l33t
Joined: 06 Sep 2004 Posts: 626
|
Posted: Thu Mar 01, 2012 8:22 pm Post subject: |
|
|
Ok, I could not resist to try it out. It worked! Running a 64-bit kernel with 32-bit userland and 64-bit KVM guests.
Bye _________________ Death by snoo-snoo! |
|
Back to top |
|
|
papahuhn l33t
Joined: 06 Sep 2004 Posts: 626
|
Posted: Fri Mar 02, 2012 11:08 am Post subject: |
|
|
Just in case that somebody is interested:
Guest vRAM on a 64-bit-kernel+32-bit-qemu-kvm host is still limited to 2047MB. _________________ Death by snoo-snoo! |
|
Back to top |
|
|
|