Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Do I need a base OS to install Xen or can I just install Xen as the core OS?

I read that some people have tried installing Xen over Ubuntu but it didn't really work.

So if I had to install an OS like CentOS as the base and install Xen within it, what are the terminal commands to install it? And how do I install other OSes as VPS when Xen is ready?(because Xen really lacks tutorials online)

share|improve this question
    
What are you trying to do? Xen might not be your only or best option. –  Joe Internet Aug 7 '11 at 9:53
add comment

1 Answer 1

up vote 2 down vote accepted

Do I need a base OS to install Xen or can I just install Xen as the core OS?

Before you can install Xen, you must first install an operating system such as RedHat/Centos, Ubuntu, BSD, Solaris, or Windows in the normal way.

I read that some people have tried installing Xen over Ubuntu but it didn't really work.

I've read people's accounts of having installed Xen on Ubuntu, so I believe it can be done without excessive difficulty.

to install an OS like CentOS as the base and install Xen within it, what are the terminal commands to install it?

To install Xen:

yum install kernel-xen xen

See http://www.howtoforge.com/centos_5.0_xen for getting the machine to boot Xen

You should note that CentOS' upstream source (RedHat) have dropped Xen and support KVM.

To install KVM and then install some management tools for it:

yum install kvm
yum install virt-manager libvirt libvirt-python python-virtinst libvirt-client

how do I install other OSes as VPS

With KVM, you can run a command like

virt-install \
   --name=guest1-rhel5-64 \
   --disk path=/var/lib/libvirt/images/guest1-rhel5-64,size=8 \
   --nonsparse --vnc \
   --vcpus=2 --ram=2048 \
   --location=http://example1.com/installation_tree/RHEL5.6-Server-x86_64/os \
   --network bridge=br0 \
   --os-type=linux \
   --os-variant=rhel5.4

(see the man page for installing from CD or from an ISO image created using dd)

Or you can run the GUI tool virt_manager and follow the wizard for "creating a new virtual system".


Virtualisation

See the comments for a discussion of various Virtualisation systems. With respect to the first part of the above question, I think of them as falling into three groups:

  • Hypervisors which you can install without first having installed a conventional operating system. For example VMWare ESXi

  • Hypervisors which are installed after you have installed a conventional operating system but which (to some extent) replace the normal operating system kernel. When you boot the computer, it boots the hypervisor first. For example Xen (and Hyper V if I understand correctly)

  • Hypervisors which are added to an operating system as a module. These essentially extend the existing kernel using existing published kernel facilities rather than replacing (key parts of) the kernel. For example KVM.

The above is a simplification and reflects my own opinion and limited understanding. Virtualisation is a complicated subject (viz Paravirtualisation, Intel VD-x, AMD V, ...) - consult Wikipedia, Google and other sources for a better understanding of Virtualisation.

share|improve this answer
    
so xen cant be the base i need to install something like centos? –  Sarmen B. Aug 7 '11 at 8:10
1  
The only bare-metal hypervisor I know of is VMware ESXi (which I believe is currently free for personal use). –  RedGrittyBrick Aug 7 '11 at 8:36
    
It is free, but the downside of ESXi is that you won't have console access to an operating system, only to the fairly basic ESXi management interface. If you want to access a running VM, you'll need to do it remotely. –  Joe Internet Aug 7 '11 at 9:48
    
Technically, Xen is a baremetal hypervisor. Just because you need to install it through a guest OS has no baring on whether it is baremetal or not. Xen, just like ESX, run at below Ring 0, technically making it a baremetal visor. –  surfasb Aug 8 '11 at 2:17
    
@surfasb: Thanks for the clarification. So Sarmen B could install Centos, use that as a method to install Xen, and run Centos as a guest OS (without reinstalling Centos as a guest explicitly?). Other guests would have to be installed (or imaged P2V). –  RedGrittyBrick Aug 8 '11 at 7:55
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.