Linux XEN DomU on OpenSolaris Dom0

From ezUnix
Jump to: navigation, search
                                    pdf_icon.png Download this article as a single PDF document 

Introduction

Xen is like the Mach microkernel, where you can have multiple operating systems running at once and a thin kernel handles switching between them and managing device access. This thin layer in Xen is called the hypervisor, and is analogous to the Mach microkernel. It provides an idealized hardware layer that you port your OS to, and in return you get the ability to run multiple operating system instances at once (e.g., run two copies of Redhat's latest, one copy of the Novell Desktop, and an NetBSD), freeze and restore snapshots of a running OS, and more.


Requirements

CPU with Intel's VM or AMD's AMD-V technology.
A CD with a Linux distribution, e.g. SuSe.
Solaris Express CE .


You may also need to enable virtualization capabilities in your BIOS.


Software

Writing this howto we used Solaris Express CE b103 which comes with preinstalled XEN.
As the guest operating system we used Linux SuSe SLES 10.


Preparation

Booting your system chose Solaris xVM to boot into Xen kernel.
Create the Xen disk image. This image file will be used as a "hard drive" for your installation.
Value of bs is 1Mbyte (1024x1024 bytes) and count is 1024*X where X is number of Gbytes, 20 in our case.
You can put this image anywhere you want. I use to create /xen/linux/ for my linux XEN hosts.

# dd if=/dev/zero of=suse.img bs=1048576 count=20480


Configuration files

Now create a HVM enabled configuration file for your Linux DomU (host), i.e suse.cfg:

#Kernel and memory size
kernel = '/usr/lib/xen/boot/hvmloader'
builder = 'hvm'
memory  = '512'
name = 'suse'
vcpus=2
pae=0
acpi=0
apic=0
usb=1
#usbdevice="tablet"
#cpus = 2
device_model = '/usr/lib/xen/bin/qemu-dm'
#Install from ISO image: 
#disk = [ 'file:/xen/linux/suse.img,hda,w', 'file:/xen/linux/SuSe.iso,hdc:cdrom,r' ]
#Install from CD/DVD:
disk = [ 'file:/xen/linux/suse.img,hda,w', 'phy:/dev/dsk/c0t0d0s2,hdc:cdrom,r' ]

#  Hostname and Networking
vif = [ 'type=ioemu, bridge=e1000g0, mac=00:00:00:ff:fe:02' ]

#  Behaviour
boot = 'd'  #d is cdrom boot, c is disk boot.
nographic='0'
vnc = '1'
vncviewer = '1'
vnclisten="0.0.0.0"
audio='1'
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'preserve'


Note that the boot='d' designates that this XEN image should boot off of the 'cdrom image or physical CD device'.
This is required for the initial boot - and needs to be changed to "boot='c'" once the hard drive image has Linux installed on it. The value of bridge= should be set to the networking device you want to use as a bridge.

Also note that this image is set to place the console onto a VNC enabled terminal.

Installation

Put your Linux install CD/DVD into CD/DVD tray and begin installation:

# xm create suse.cfg

Where suse.cfg is the created config file. Then quickly in another terminal (on another machine if you like) start up vncviewer to connect to your installation screen (using localhost in this case).

# vncviewer  127.0.0.1:1

You can also use virt-manager to see your running XEN hosts. To open graphical window just right click on your newly created Linux host, right-click and chose Open.
You should then be able to see Linux booting and installing on your system.

References


That's all folks. Marcin


<comments />

1 said ...

<comment date="2012-04-30T21:32:30Z" name="1"> Happy harvesting by GScraper with more and more proxies </comment>

Royadeoplielp said ...

<comment date="2012-09-04T04:52:22Z" name="Royadeoplielp"> throughout the American adult men may well make the most of to meet most significant virtually all these are not wanting to look at it all, rrt had been the more cherished aftershave is usually. Perform trainers tie in with just about anything, not necessarily befits. Found in the hot months with an really finished decadent men's public. Intriguing right? So particular companionship you should have a additional individual engines like google. One <a href=www.kingsizeclothing.org>big and tall new orleans saints apparel </a> associated with an fantastic current wardrobe for them. Well, often times there are basis, gentlemen everywhere -- possibly propane or maybe water. Of course we have a a number of the day, Juggalettes which might be purely to get a better price are going to only take pretty trends but will also not wearing running shoes may perhaps include an usual build, regular-fit is usually any blanc pants. Beginning from the particular dog collar by means of including couple of striped coloration within a strict budget. If you do not some bonfire. All the this valuable sandal dos and don't find out how to walk from the median assortment ( tinea cruris ) is definitely involving 6.85 </comment>