Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to experiment with Linux kernels. I have only one system with Ubuntu installed on it. There is a good chance that I'll screw up if I play with Ubuntu's kernel. So I've decided to play with CentOS running on VirtualBox from Ubuntu.
I have a few questions about this:
1. Any website suggestions explaining how to install CentOS on VirtualBox ? I searched the internet, but most links explain how to install VirtualBox on CentOS, and not the other way round.
2. Is is possible to compile and run custom kernels from CentOS running on VirautlBox ?
3. Does VirtualBox run bootloaders (like Grub, Lilo, etc.) so that I can switch between custom and stock kernels during VM bootup.
There seems to be a lack of understanding. Virtualbox will give you a Virtual Machine (VM), that means it emulates a complete PC, and this PC will behave exactly like a physical PC.
So here the answers to your questions:
1. You can install CentOS on Virtualbox exactly like you would do on a physical PC. At first you have to set up your VM, you can use the wizard for that. More information on setting up a VM with Virtualbox can be found here. After that you simply start that VM and install CentOS, like you would do on any other machine. You will need to download an iso-image of the CentOS install-DVD for that. More info on the first start of a VM and installing an OS can be found here.
2. Since it behaves like a physical PC, in short: Yes.
3. Since it behaves like a physical PC, in short: Yes.
I would recommend to go through the Virtualbox manual before setting up the VM. This will help you to get a better understanding of how Virtualbox works and which choices you have.
TobiSGD,thanks for your answers ! I know a bit about virtualization in theory, but haven't actually used a VM software before. Since I was in a bit of a hurry to work on kernel, I thought I'd check with the experts here
I currently have a CentOS VM on this here Ubuntu box.
Install VirtualBox. In Synaptic or Ubuntu Software Center or apt, make sure you get the VirtualBox-OSE, VirtualBox Guest Additions, and VirtualBox-dkms packages. You will need the dkms packages for installing the VirtualBox Guest Additions in the CentOS VM.
Then install CentOS just as if you were installing it on a computer.
Here's a link to a series of blog posts I wrote on just this issue. In this case, I was installing CentOS in VB on Debian, but the procedure is the same.
The post I linked to (Part 4) links to the other posts in the series.
You will need the dkms packages for installing the VirtualBox Guest Additions in the CentOS VM.
I think you are wrong here, the DKMS packages are for building/rebuilding the kernel-modules for Virtualbox on the host. Without this modules you will only get software-virtualization, which can be really slow.
I think you are wrong here, the DKMS packages are for building/rebuilding the kernel-modules for Virtualbox on the host. Without this modules you will only get software-virtualization, which can be really slow.
To get the full benefit of Guest Additions, the Guest Additions installation script for OS in the VM needed to recompile the kernel to install all its features, such as sharing folders between the host and guest. I think I remember VirtualBox's complaining that I didn't have DKMS installed when I tried that the first time, but it's been a while since I got it working and the details are hazy.
I could well have gotten the memories confused.
Also, inside the CentOS VM, I had to install gcc, the kernel sources, and the libraries for compiling against the kernel (it's been a while and I forget their official names) since they did not install by default.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.