1. Install xen and utilities
$sudo apt-get install xen-hypervisor-4.1-amd64 xen-utils-4.1 xenwatch xen-tools xen-utils-common xenstore-utils $sudo apt-get install virtinst $sudo apt-get install virt-viewer virt-manager
2.Restart OS and Select Xen Kernal
Verify the Xen installation using
$sudo xm info
If this command does not return any error, then the installation is correct.
3.Xend Configuration
Edit /etc/xen/xend-config.sxp and uncomment this line
(xend-unix-server no)
and change to
(xend-unix-server yes)
Edit .bashrc file using
#vi ~/.bashrc, add the following line:
export VIRSH_DEFAULT_CONNECT_URI="xen:///"
4. Restart OS and Select Xen Kernel
Verify libvirt Installation
$sudo virsh version
Compiled against library: libvir 0.8.3 Using library: libvir 0.8.3 Using API: Xen 3.0.1 Running hypervisor: Xen 4.0.0If got output like this, you have installed every package correctly.
5.Creating VM using virt-manager
Here I am telling about virtual machine creation using virt-manger
Type $sudo virt-manager for getting GUI for virt-manager
Create new VM using virt-manager(Learn More)
Solution for common error during DomU is given below..
1. Show Something like this
Fix it using$sudo mkdir /usr/lib64/xen -p $sudo cp /usr/lib/xen-4.1/* -r /usr/lib64/xen/
2. Get like this
Solve it using
$sudo mkdir /usr/share/qemu $sudo cp -r /usr/share/qemu-linaro/keymaps /usr/share/qemu/
apt-get install xen-hypervisor-4.1-amd64
ReplyDeletethis is for 64bit and what about 32bit machines??
use 'apt-get install xen-hypervisor-i386'
DeleteHi jinesh,
ReplyDeleteIs it possible to embed a xen based vm inside a web browser. So that clients can access it remotely by using a particular IP address along with PORT?
Or in simple words how can I provide my vm to the clients?
Hi Alee,
ReplyDeletePlease refer the following links,
http://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-Remote_management_of_virtualized_guests-Remote_management_with_ssh.html
http://old-list-archives.xen.org/xen-devel/2004-09/msg00417.html
Hi jinesh
ReplyDeleteWhen i type sudo virt-manager, nothing happen because when i select xen kernel, the system starts without the xserver, basically i can use only the command line and not the gui of the OS. What to do?
Hi Ger ald,
DeleteYou can test xen installation using 'xm info' command. virt-manager is a GUI based application it does not work in command line. You can use virsh or xm commands for xen management.
Yeah, i know. My question is: how to start ubuntu with xen kernel in graphical mode? Because after i chose xen kernel(step 4 in your tutorial), i can use only the command line.
DeleteOk. Which OS are you using?
DeleteI was using ubuntu 12.04 in virtualbox. I tried it directly(in ubuntu 12.04 without virtualbox), but now when i select xen kernel i get the error: "Not enough memory to relocate the dom0 Kernel image".
DeleteI have 6GB RAM.
It is a common problem during xen installation. You can set dom0 memory in grub. Some useful links are
Delete[1]. http://copilotco.com/mail-
archives/xen.2012/msg00692.html
[2]. http://askubuntu.com/questions/245732/xen-not-enough-memory-to-relocate-the-dom0-kernel-image-not-iscsi-hba-issue
I was using ubuntu in dual boot with windows 8 UEFI mode. I reinstalled ubuntu in legacy mode and now everything works fine. Thanks!
Delete