티스토리 뷰


OS: Ubuntu 9.04 server (64-bit)

Installing Xen on Ubuntu 9.04
># apt-get install ubuntu-xen-server

1. Get the xen binary packages from the following web sites:
* It seems that the package is no longer exists in the ftp server (2011/02/23)
># sudo dpkg -i linux-modules-2.6.26-2-xen-amd64_2.6.26-21_amd64.deb 
># sudo dpkg -i linux-image-2.6.26-2-xen-amd64_2.6.26-21_amd64.deb

After the xen kernel package installation, it should update the grub boot loader automatically, but
just in case, here is an example. 

># vi /boot/grub/menu.lst
title   Xen 3.3 / Ubuntu 9.04, kernel 2.6.26-2-xen-amd64
root    (hd0,0)
kernel    /boot/xen-3.3.gz
module    /boot/vmlinuz-2.6.26-2-xen-amd64 root=UUID=6259683d-02ee-4b29-a3ce-a74c90384c6e ro console=tty0
module    /boot/initrd.img-2.6.26-2-xen-amd64
quiet

># reboot

Installing a virtual machine (domU)
* using xen-create-image to create a VM, 
># vim /etc/xen-tools/xen-tools.conf
size   = 4Gb      # Disk image size.
memory = 512Mb    # Memory size
swap   = 512Mb      # Swap size
fs     = ext3            # use the EXT3 filesystem for the disk image.
dist   = jaunty         # Default distribution to install.
image  = sparse     # Specify sparse vs. full disk images.

gateway   = 192.168.1.1
netmask   = 255.255.255.0
broadcast = 192.168.1.255

Bug fix (making sure that the console is showed up when executing xm console)
* Ensuring a getty on /dev/hvc0
># cd /usr/lib/xen-tools/
># ln -s edgy.d jaunty.d
># vim jaunty.d/30-disable-gettys
 #
#  Remove the links for upstart
#
rm ${prefix}/etc/event.d/tty[!1]
cat ${prefix}/etc/event.d/hvc0 | sed "s/tty1/hvc0/" > ${prefix}/etc/event.d/hvc0

># vim /etc/xen-tools/partitions.d/green
[root]
size=2G
type=ext3
mountpoint=/
options=sync,errors=remount-ro

[swap]
size=512M
type=swap

># sudo xen-create-image --hostname=green4 --ip=192.168.1.167 --dist=jaunty \
 --mirror=http://kr.archive.ubuntu.com/ubuntu --arch=amd64 --partitions=green \
 --force --boot --passwd --role udev

># xm console green4

References.
1. 
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함