Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Switch from 32bit kernel to 64bit kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 626

PostPosted: Thu Mar 01, 2012 2:06 pm    Post subject: [Solved] Switch from 32bit kernel to 64bit kernel Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Mar 01, 2012 2:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 626

PostPosted: Thu Mar 01, 2012 2:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Thu Mar 01, 2012 2:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 626

PostPosted: Thu Mar 01, 2012 2:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Thu Mar 01, 2012 2:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 626

PostPosted: Thu Mar 01, 2012 3:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 626

PostPosted: Thu Mar 01, 2012 8:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 626

PostPosted: Fri Mar 02, 2012 11:08 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum