Table of Contents

Server Software#Virtualization

Xen



Brief overview

Technical Term

Term Explanation
Domain-0 host os
Domain-U gest os
Para-Virtualization Para-virtualization is a virtualization technique which involves running modified versions of operating systems.
Performance is generally very close to running bare-metal, non-virtualized operating systems.
Full Virtualization Full virtualization offers lower I/O performance than native (or bare-metal) installations of operating systems.


Commands

# service xend restart
# ifconfig
    check xenbr0, xenbr1

# service xend stop
# service libvirtd restart
# service xend start

# /etc/xen/scripts/network-bridge stop
# /etc/init.d/network restart
# /etc/xen/scripts/network-bridge start

xm commands

It is advised to use virsh or virt-manager instead of xm. The xm command does not handle error checking or configuration file errors very well and mistakes can lead to system instability or errors in virtual machines. Editing Xen configuration files manually is dangerous and should be avoided.

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Virtualization/chap-Virtualization-The_xm_command_quick_reference.html

Command Explanation
xm list
xm console GEST_NAME ctrl + ] : cancel console
xm create CONFIG
xm shutdown SERVER
xm destroy SERVER
xm vcpu-list
xm info

Bridging(xenbrX)

xen default bridging

Command Explanation
brctl help
brctl show


virsh commands

virsh is a command line interface tool for managing guests and the hypervisor.
The virsh tool is built on the libvirt management API and operates as an alternative to the xm command and the graphical guest Manager (virt-manager).

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Virtualization/chap-Virtualization-Managing_guests_with_virsh.html

Command Explanation
virsh list
virsh list --all
virsh dumpxml GUEST_NAME > /etc/xen/xml/GUEST_NAME.xml create xml file
virsh define /etc/xen/xml/GUEST_NAME.xml create xml file
virsh create GUEST_DEF_FILE start server
virsh shutdown GUEST_DEF_FILE
virsh destroy GUEST_DEF_FILE
virsh console GUEST_NAME

Bridging(virtbrX)

libvirtd service

Command Explanation
virsh net-list
Disable libvirtd services
# virsh net-autostart default --disable
# virsh net-destroy default
Enable libvirtd services
# virsh net-start default
# virsh net-autostart default


Installation

# yum groupinstall Virtualization

# vi /etc/sysconfig/kernel

DEFAULTKERNEL=kernel-xen


# vi /boot/grub/menu.lst

default=0

# reboot


Configuration

Auto start with host os

# ln -s /etc/xen/gestOS /etc/xen/auto/gestOS

NTP

/etc/sysctl.conf

xen.independent_wallclock = 1
# echo 1 > /proc/sys/xen/independent_wallclock
or
# sysctl xen.independent_wallclock=1


Xen Networking

xenbrX

brX

virbrX


Create Domain-U(Guest OS)


Reference