LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-16-2005, 03:12 AM   #1
vijayind
Member
 
Registered: Feb 2004
Distribution: Debian Sarge
Posts: 33

Rep: Reputation: 15
Using Xen in FC4


Hi,
I would like to know, how to install a virtual Suse 9.3(I got the cd's) using Xen in FC4.
I saw a quickstart guide on fedoraproject.org, could n't understand much of it.

Is there a safe way using Xen without blowing my disk ???
 
Old 06-16-2005, 08:01 PM   #2
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
The basic idea is that you will need a xen-enabled kernel for your domain 0 (hypervisor), so that you can run your virtual domains in (on?) it.
ie. You end up with another kernel to choose from in your boot menu.
I'd be surprised if you 'blew' your disk (I haven't found a way yet ... )

The simplest way is to download the xen install package (v2.0.6) from the xen homepage.
http://www.cl.cam.ac.uk/Research/SRG/netos/xen/
The nicest way is to download the source, and compile a new kernel yourself
(this can take a bit of work, depending on your requirements )

You then need a filesystem of some sort that the virtual domain can use.

I'm not familiar with the Suse cd's so I can't help you there ...

Keep reading your quickstart, it'll make sense eventually:
http://www.fedoraproject.org/wiki/FedoraXenQuickstart
and don't forget the xen wiki http://wiki.xensource.com/xenwiki/XenFaq
and mailing list archives http://lists.xensource.com/archives/html/xen-users/
oh, the user manual is great, too http://www.cl.cam.ac.uk/Research/SRG...user/user.html

hint:
xen0 is the kernel your machine will end up booting on
xenU is the kernel for virtual domains.
 
Old 06-16-2005, 09:27 PM   #3
vijayind
Member
 
Registered: Feb 2004
Distribution: Debian Sarge
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks i will try it out!!!
 
Old 07-26-2005, 12:40 PM   #4
VincentB
Member
 
Registered: Jun 2003
Location: Brussels, Belgium
Distribution: Ubuntu 6.10
Posts: 139

Rep: Reputation: 15
All,

I am also very interested in better understanding how to install a full distro (let's say Suse for instance) in a virtual machine for XEN (my physical machine runs also FC 4.0)
I have nowhere found a 'bullet points' installation guide which usually describes btw the installation of a very light Linux.

If you have succeeded in this installation,may I kindly ask you to post here the 'installation process' you have followed?

Thanks in advance,

Regards,

Vincent

Last edited by VincentB; 07-26-2005 at 02:13 PM.
 
Old 07-26-2005, 07:55 PM   #5
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
First, you need to get Xen installed, and your dom0 kernel booting. Then ...

I'm not familiar with Suse, but here are a couple of ideas:

1.
- create a filesystem for the new domU (have a look at LVM ... very nice features)
- run your installer in a chroot environment on the new filesystem (see Appendix A of xen user manual for example of a Debian chroot install)
- copy over the domU kernel and kernel modules to the new filesystem and enter the details of the new kernel in the xen config file for the new domU (in /etc/xen/)
- either create a swap partition or swap file to be exported from dom0 to the domU .... or create a swapfile on the domU partition.

or
2.
- I guess what you could do is install Suse normally in it's own partition (no need to install a bootloader), reboot into your dom0 and then copy over the domU kernel and kernel modules.

Remember:
- agp support isn't functional yet ... wait for Xen 3.0 for that.
- use grub as a bootloader for dom0 (I don't think lilo works for xen)


As far as a 'bullet-point' step-by-step guide goes, look in Appendix A of the Xen User Manual:
http://www.cl.cam.ac.uk/Research/SRG...user/user.html
or
http://www.cl.cam.ac.uk/Research/SRG...admes/user.pdf
You can certainly make a slim install of Debian


Hmmm. installation procedure I've followed ... heh
I'm not sure this will help you, but you asked for it!
The first few times I've done chroot installs.
These days I make a snapshot of a running domU and copy the contents of the snapshot into
a new partition. I modify a few config details (network, hostname, etc), boot the new domU
and customise it for it's intended purpose.
eg.
Here are some of my rough (pasted) notes of my latest domU project:
(The formatting won't work, oh well)

20050725 Creating Bluetooth proxy domU
# Prerequisites:
# domU kernel with USB and Bluetooth support
#
# Existing:
# An LV of 384MB in VG vg0, named WebServer (you can guess it's purpose!)
# domU and snapshot mountpoints in /mnt
# WebServer LV has a swapfile image rather than an imported swap

# ###############################################################
# Setup partition for new domU
# ###############################################################
# Create snapshot of existing WebServer LV
lvcreate -s -L 32M -n WebServer-snapshot /dev/vg0/WebServer

# Create LV for new domU
lvcreate -L 384M -n BluetoothProxy vg0
mke2fs -j /dev/vg0/BluetoothProxy

# Copy contents of WebServer-snapshot to BluetoothProxy LV
mount /dev/vg0/WebServer-snapshot /mnt/snapshot/
mount /dev/vg0/BluetoothProxy /mnt/domU/
cp -a /mnt/snapshot/* /mnt/domU/

# Delete snapshot
umount /mnt/snapshot/
lvremove /dev/vg0/WebServer-snapshot

# ###############################################################
# Change some configuration settings
# ###############################################################
# Change import configs in BluetoothProxy
vi /mnt/domU/etc/fstab
# remove /var/www mountpoint
vi /mnt/domU/etc/network/interfaces
# change IP address to unique value (eg. 192.168.2.247)
vi /mnt/domU/etc/hostname
# change hostname to BluetoothProxy
vi /mnt/domU/etc/hosts
# change local name to BluetoothProxy

# Unmount the new domU LV
umount /mnt/domU

# Create new domU config
cp /etc/xen/WebServer /etc/xen/BluetoothProxy
vi /etc/xen/BluetoothProxy
# change name to BluetoothProxy:
# name = "BluetoothProxy"
# change disk exports:
# disk = [ 'phy:/dev/vg0/BluetoothProxy,/dev/hda3,w']

# Add new domU's IP to dom0's hosts list
vi /etc/hosts
# 192.168.2.247 BluetoothProxy

# ###############################################################
# Start the new domU
# ###############################################################
# Start BluetoothProxy domU
xm create BluetoothProxy

# Connect to console of BluetoothProxy (seperate terminal used)
xm console 3 # 9603 was the reported port number upon creation

# Create module dependencies
depmod -ae

# change passwd for root
passwd

# start dselect and remove/add required packages




# ###############################################################
# Stop the new domU
# ###############################################################
xm shutdown BluetoothProxy

# ###############################################################
# Allow the BluetoothProxy to control the USB Host Controller
# ###############################################################
vi /boot/grub/menu.lst
# append physdev_dom0_hide=(00:07.2) to the kernel line
# where pci-id is obtained from lspci
vi /etc/xen/BluetoothProxy
# allow the domU to have the USB Host Controller
# pci = ['00,07,2']

# Load USB utilities and control progs
apt-get install hotplug
modprobe hci_vhci
lsmod
# Module Size Used by
# hci_vhci 4992 0
# bluetooth 44164 1 hci_vhci
######################################
# OOps, ran out of room ... THE POWER OF LVM !!!!
######################################
xm shutdown BluetoothProxy
lvextend -L +50M /dev/vg0/BluetoothProxy
ext2resize /dev/vg0/BluetoothProxy
######################################

# Install bluetooth utils
apt-get install bluez-utils


cd /usr/src/xen/linux-2.6.11-xenU
make ARCH=xen menuconfig
# XEN --->
#[*] Privileged Guest (domain 0)
#[*] Physical device access
#[*] Block-device backend driver
# [ ] Network-device backend driver
# X86 Processor Configuration --->
# Bus options (PCI, PCMCIA, EISA, MCA, ISA) --->
#[*] PCI support
#[*] Legacy /proc/pci interface
#[*] PCI device name database
# Device Drivers --->
# Networking support --->
# <M> Bluetooth subsystem support --->
# --- Bluetooth subsystem support
# <M> L2CAP protocol support
# <M> SCO links support
# <M> RFCOMM protocol support
#[*] RFCOMM TTY support
# <M> BNEP protocol support
#[*] Multicast filter support
#[*] Protocol filter support
# <M> HIDP protocol support
# Bluetooth device drivers --->
# <M> HCI USB driver
#[*] SCO (voice) support
# <M> HCI VHCI (Virtual HCI device) driver # Device Drivers --->
# Multimedia devices --->
# <M> Video For Linux
# USB support --->
# <M> Support for Host-side USB
#[*] USB device filesystem
# <M> UHCI HCD (most Intel and VIA) support
# <M> USB STV680 (Pencam) Camera support

cd ..
make dist

# copy new kernels and modules over
scp dist/install/boot/vmlinuz-2.6.11.12* wench:/boot/

# Fix this later
scp -r dist/install/lib/modules/2.6.11.12-BluetoothProxy/kernel wench:/mnt/domU/lib/modules/2.6.11.12-BluetoothProxy/
#scp -r dist/install/lib/modules/2.6.11.12-xenU/kernel wench:/mnt/lib/modules/2.6.11.12-xenU/
scp -r dist/install/lib/modules/2.6.11.12-xen0/kernel wench:/lib/modules/2.6.11.12-xen0/

# make backup modules for xenUs on xen0 root (if space available)


installed udev

re-enabled IRQ for USB in BIOS

in /etc/default/bluez-utils
PAND_ENABLED=1
PAND_OPTIONS="--listen --role NAP"

domU config[*] IP: advanced router [*] Network packet filtering (replaces ipchains) --->
IP: Netfilter Configuration --->
<M> Connection tracking (required for masq/NAT) [*] Connection tracking flow accounting[*] Connection mark tracking support
<M> IP tables support (required for filtering/masq/NAT)
*** ALL AS MODULES
<M> BNEP protocol support [*] Multicast filter support[*] Protocol filter support

note:
- wench is the server (dom0)
- WebServer and BluetoothProxy are domUs.
- building process took place on another machine (hence the scp copies)

Last edited by uberNUT69; 07-26-2005 at 07:59 PM.
 
Old 07-26-2005, 08:23 PM   #6
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
ps. check this out:
http://wiki.xensource.com/xenwiki/CoolConfigurations
 
Old 07-27-2005, 12:30 AM   #7
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
This might give you a few hints too:
http://www.suse.de/~garloff/linux/xen/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is Xen TSHF-Megsy Linux - Software 2 10-31-2005 01:05 PM
about xen kpachopoulos Linux - General 6 09-03-2005 08:46 AM
XEN - FC4 - XM command ??? VincentB Linux - Newbie 2 07-30-2005 05:32 AM
XEN and FC4 VincentB Linux - Newbie 1 07-26-2005 02:45 PM
FC4 and Xen xwindows not working aolds Linux - Newbie 3 07-23-2005 12:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 10:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration