Main Menu

friends

Banner

Latest articles

XEN on fedora 8 - part 1: the basic setup
02/03/2009 | mad mad mod

This article describes how to install and use the XEN Hypervisor on Fedora Linux 8. I use Fedora Linux as host operating system (Domain 0) and I use Fedora as operating system for the paravirtualized  [ ... ]


if then else in BASH - the basics
13/05/2010 | mad mad mod

If then else in bash is not very difficult. However, there is something that can cause problems:Please note the spacing inside the brackets! It won't work without! string comparison
simple example:



 [ ... ]


Other Articles
Facebook MySpace Twitter Digg Delicious Stumbleupon Google Bookmarks 

Designed by:
SiteGround web hosting Joomla Templates
XEN on fedora 8 - part 2: management basics E-mail
XEN

This article describes how to manage a standard XEN environment on Fedora 8. It explains how to power on/off a virtual xen machine, how to open a console and some basics about performance monitoring.

 

virt-manager - The GUI

There is a very basic GUI available. It is called virt-manager and it is pretty much self explaining. You can start it with the command "virt-manager". If you are in a remote shell (ssh) don't forget to set the DISPLAY variable to your workstation.

 


[root@localhost ~]# virt-manager

 

virt-manager

 

Now you have to connect to the XEN hypervisor. This can be done either by double clicking it or file-->connect...

 

virt-manager

 

The GUI is more or less self explaining and really easy to use. However, I definitely recommend to use command line tools such as "xm" or "virsh"

 

 

xm - the XEN management user interface

 

"xm" is (almost) the only command you need to manage your virtual servers. With xm you can power on/off a vm or open a console, add more memory and do other stuff like that. It is part of the XEN rpm, so you don't have to install any additional package.

 

xm list

List information about all/some domains. With "xm list" you can see which virtual machine is currently running and some information about how much cpu and memory they use at the moment.


[root@localhost ~]# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 2392 1 r----- 547.8
mydns 256 1 35.4
myguest 256 1 0.0
myweb 256 1 34.1
[root@localhost ~]#

 

As you can see, the only domain which is currently running is domain-0. Domain-0 is our host system which is installed on "real" physical hardware.

 

xm start, shutdown, destroy

The command to power on the virtual server "myguest" is "xm start myguest". To shutdown the virtual machine the command is "xm shutdown myguest":

 

[root@localhost ~]# xm start myguest
[root@localhost ~]# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 2264 1 r----- 170.0
mydns 256 1 35.4
myguest 2 256 1 ------ 8.0
myweb 256 1 0.0

[root@localhost ~]# xm shutdown myguest
[root@localhost ~]# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 2264 1 r----- 554.8
mydns 256 1 35.4
myguest 256 1 26.4
myweb 256 1 0.0

 

To power off the virtual machine immediately you can use "xm destroy myguest". This is like unplugging the power cord --> BE CAREFULL!!!

[root@localhost ~]# xm destroy myguest

 

xm console

I always open a console to the virtual machin after starting it. The command for this is "xm console myguest"

 

[root@localhost ~]# xm console myguest

 

Now you should see the login prompt of the console:

 

Starting HAL daemon: [ OK ]
Starting anacron: [ OK ]

Fedora release 8 (Werewolf)
Kernel 2.6.21-2950.fc8xen on an i686

localhost.localdomain login:

 

To exit a console type "CTRL -]"

 

 

Performance monitoring

 

xentop

xentop displays real-time information about the Xen system and domains. It looks similar to the Linux tool "top" and I think there is also a tool like that for vmware esx.

 

xm top

 

I always change the delay from 3 seconds (default) to 1 second by pressing d + 1 + enter on the keyboard.

Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

 
mad mad mod, Powered by Joomla! and designed by SiteGround web hosting