Xen is a paravirtualization platform which is very similar to hardware emulation.
Paravirtualization works by creating an interface between the virtual environment's
operating system and the hardware which queues and responds to operating system
requests from operating systems modified to interact with the paravirtualization interface.

This key difference from operating system-level virtualization allows Xen VPS
administrators to modify their kernel modules, utilize swap space to meet memory
allocation demands, and watch their Xen virtual private server's boot process as Linux
mounts virtualized devices.

xen virtualization architecture

Key Differences can be summerised as:

Xen Platform
1. Uses more resources
2. Soft memory limit (swap space with performance penalty)
3. Full iptables access
OpenVZ Platform
1. Uses fewer resources
2. Hard memory limit (no swap space)
3. Limited netfilter (iptables) modifications

Xen supported virtualization types

Xen supports running two different types of guests. Xen guests are often called as domUs
(unprivileged domains). Both guest types (PV, HVM) can be used at the same time on a
single Xen system.

Xen Paravirtualization (PV)
Paravirtualization is an efficient and lightweight virtualization technique introduced by
Xen, later adopted also by other virtualization solutions. Paravirtualization doesn't require
virtualization extensions from the host CPU. However paravirtualized guests require
special kernel that is ported to run natively on Xen, so the guests are aware of the
hypervisor and can run efficiently without emulation or virtual emulated hardware. Xen
PV guest kernels exist for Linux, NetBSD, FreeBSD, OpenSolaris and Novell Netware
operating systems. PV guests don't have any kind of virtual emulated hardware, but
graphical console is still possible using guest pvfb (paravirtual framebuffer). PV guest
graphical console can be viewed using VNC client, or Redhat's virt-viewer. There's a
separate VNC server in dom0 for each guest's PVFB.

Xen Full virtualization (HVM)
Fully virtualized aka HVM (Hardware Virtual Machine) guests require CPU
virtualization extensions from the host CPU. Xen uses modified version of Qemu to
emulate full PC hardware, including BIOS, IDE disk controller, VGA graphic adapter,
USB controller, network adapter etc for HVM guests. CPU virtualization extensions are
used to boost performance of the emulation. Fully virtualized guests don't require special
kernel, so for example Windows operating systems can be used as Xen HVM guest. Fully
virtualized guests are usually slower than paravirtualized guests, because of the required

Basic Xen Configuration

/etc/xen/xend-config.sxp - The xen-tools package installs an example configuration file
for the xend daemon located at /etc/xen/xend-config.sxp which can be examined and
modified if required. This is the basic configuration file for the xen server. We shall add
the following entries to customize our own configuration.

Logging : The log output of the Xen control daemon.
(logfile /var/log/xen/xend.log) // sets the log path
(loglevel DEBUG) // To ensure that most of the information is displayed.

Communication Protocols : The xend daemon offers a variety of communication
protocols over which the management utilities can connect and thereby control the virtual
machines and perform other management functions.

(xend-http-server no)
(xend-unix-server no)
(xend-tcp-xmlrpc-server no)
(xend-unix-xmlrpc-server no)
(xen-api-server ((unix)))

Relocation Services : One of the more compelling features of the Xen virtualisation
environment is the ability to suspend a guest, migrate it to a different physical host and
then resume it totally transparently to the guest operating system and applications. Since
xend-relocation-server is insecure with the default configuration, we shall disable it untill
we need it.

(xend-relocation-server no)
(xend-relocation-ssl-server no)

Networking : Current versions of Xen offer two distinct methods of connecting guest
domains to the network of the host domain

(network-script network-route)
(vif-script vif-route)

If you have multiple network adaptors installed in the host machine, or you have renamed
a network interface, and wish to specify that this interface is to be used by the route or
bridge scripts you will need to specify the name of the network device using the netdev
option as shown below.

(network-script 'network-route netdev=lan')
(vif-script 'vif-route netdev=lan')

Starting and testing the Xen control daemon
/etc/init.d/xend start

Xen Commands

xm uptime
To show uptime for a vps

xm top
To monitor a host and its domains dynamiccally

xm list
Displays domain information

xm info
Displays host information

xm vcpu-list
Lists domain virtual processors

xm network-list
Lists domain virtual network interfaces

virsh nodeinfo
Returns node information

virsh vcpuinfo
Displays domain virtual processor information

xm log
Shows the xend log

virsh dominfo
Displays domain information

xm dmesg
Reads the xend daemon's message buffer just like dmesg



Paul Miller | September 27, 2015 at 11:55 PM

An operating system is the most important software that runs on a computer(UNIX Training Chennai). It manages the computer's memory, processes, and all of its software and hardware. Using a highly secured and effective operating systems are always wanted by the consumers(UNIX Course in Chennai). You hae said that crystal clear in your content above. Thanks for sharing this in here.
UNIX Training Chennai | UNIX Course in Chennai

kiran kumar | February 9, 2016 at 6:02 AM

Thank you for this wonderful information. It was really helpful.oracle dba training In Chennai

priyanka | April 28, 2018 at 2:22 AM

I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
Best Java Training Institute in chennai

Post a Comment