How to install an Ubuntu VM under CentOS/Red Hat Xen

 

  
 

How to install an Ubuntu VM under CentOS/Red Hat Xen


My process is to create the VM under Ubuntu/Gutsy and then move it across

Resources

There is an article at: http://www.howtoforge.com/ubuntu-7.10-server-install-xen-from-ubuntu-rep... which unfortunately has a number of flaws. For more information, see:

A. fix up xen-tools:

append to > /etc/xen-tools/xm.tmpl
extra = ' TERM=xterm xencons=tty console=tty1'

append to > /usr/lib/xen-tools/gutsy.d/15-disable-hwclock
rm -f ${prefix}/etc/init.d/hwclock.sh ${prefix}/etc/init.d/hwclockfirst.sh ${prefix}/etc/udev/rules.d/85-hwclock.rules
chmod -x ${prefix}/lib/udev/set_hwclock

/etc/init.d/xend restart #restart the xend system

B. create the xen image:

xen-create-image --hostname=xen1.example.com --size=2Gb --swap=256Mb --ide /
--ip=192.168.1.14 --netmask=255.255.255.0 --gateway=192.168.1.1 --force /
--dir=/home/xen --memory=256Mb --arch=i386 --kernel=/boot/vmlinuz-2.6.22-14-xen /
--initrd=/boot/initrd.img-2.6.22-14-xen --debootstrap --dist=gutsy /
--mirror=http://de.archive.ubuntu.com/ubuntu/ --passwd

C. Start it to test it and also find the mac address

xm create -c /etc/xen/xen1.example.com.cfg
ifconfig #and note the mac address
xm shutdown xen1.example.com #then shut it down

modify /etc/xen/xen1.example.com.cfg to include after the mac address, e.g.:
vif = ['mac=00:16:3E:4E:B5:9B, bridge=xenbr0', 'ip=192.168.1.22' ]

D. Copy the image and .cfg files to Centos machine

/usr/sbin/xm create -c /etc/xen/xen2.example.com.cfg #start it up
(this seems a more reliable method of starting it than using the virtual manager gui)

E. Install extras on the image

#upgrade server to desktop
apt-get update
apt-get upgrade
aptitude install ubuntu-desktop

Install NX server so as to be able to log into a desktop from another machine (MUCH better than VNC)
Info from this page: http://www.nomachine.com/download-package.php?Prod_Id=359

see here for installation: http://drup.org/installing-nx-server

apt-get install kubuntu-desktop #I prefer kubuntu installed over the top of ubuntu

-Notes on mount:
mount -o loop -t iso9660 filename.iso /mnt/iso
mount -o loop -t ext3 /home/xen/domains/xen1.example.com/disk.img /mnt/xen1

F. Move image based VM into an LVM based VM (much more efficient

See here: http://quadruple.ca/lvm-commands for details

 

 

from: http://drup.org/how-install-ubuntu-vm-under-centosred-hat-xen

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值