centos5下xen安装虚拟机

参考资料http://linux.vbird.org/linux_enterprise/xen.php

 

鸣谢吴畅的支持http://t.sina.com.cn/wcmilan

 

一、需要安装的包

需要安装的包有

 

kernel-xen.x86_64                          2.6.18-194.32.1.el5         installed
kernel-xen-devel.x86_64                    2.6.18-194.32.1.el5         installed
xen.x86_64                                 3.0.3-105.el5_5.5           installed
xen-libs.x86_64                            3.0.3-105.el5_5.5           installed
最后一共装的是

Jan 18 19:17:02 Installed: bridge-utils-1.1-2.x86_64
Jan 18 19:17:04 Installed: SDL-1.2.10-8.el5.x86_64
Jan 18 19:17:04 Installed: xz-libs-4.999.9-0.3.beta.20091007git.el5.x86_64
Jan 18 19:17:05 Installed: qemu-0.9.0-4.x86_64
Jan 18 19:17:05 Installed: cyrus-sasl-md5-2.1.22-5.el5_4.3.x86_64
Jan 18 19:17:05 Installed: e4fsprogs-libs-1.41.9-3.el5.x86_64
Jan 18 19:17:05 Installed: xen-libs-3.0.3-105.el5_5.5.x86_64
Jan 18 19:17:06 Installed: iscsi-initiator-utils-6.2.0.871-0.20.el5_5.x86_64
Jan 18 19:17:06 Installed: libvirt-0.6.3-33.el5_5.3.x86_64
Jan 18 19:17:06 Installed: libvirt-python-0.6.3-33.el5_5.3.x86_64
Jan 18 19:17:06 Installed: python-virtinst-0.400.3-9.el5_5.1.noarch
Jan 18 19:17:19 Installed: kernel-xen-2.6.18-194.32.1.el5.x86_64
Jan 18 19:17:20 Installed: xen-3.0.3-105.el5_5.5.x86_64
Jan 18 19:36:44 Installed: kernel-xen-devel-2.6.18-194.32.1.el5.x86_64
二、修改内核为xen的内核,重启

cat /proc/cpuinfo |grep flags

 

amd的cpu,如果有svm,或者intel的cpu 如果有vmx则可以开启完全虚拟化,即hvm的选项

 

三、安装centos

网络安装

virt-install --paravirt --name tapas_os --ram=3072 --file=/opt/xen/dianxin.img --file-size=40 --nographics --location http://centos.scalethink.com/centos/5.5/os/x86_64/

四、安装ubuntu

镜像安装,只能使用hvm

virt-install --hvm --name tapasos127 --ram=3072 --os-type=linux --file=/opt/xen/tapas.img --file-size=40 --vnc -c /opt/ubuntu-10.04.1-alternate-amd64.iso

 

安装后需要在别的机器上装virt-manager连这宿主机来监控安装

 

网络安装

virt-install --paravirt --name tapas_os --ram=3072 --file=/opt/xen/dianxin.img --file-size=40 --nographics --location http://mirrors.163.com/ubuntu/dists/natty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/

 

 

ubuntu这个路径太恶心了。。。

 

 

你可能感兴趣的:(虚拟机,网络,centos,ubuntu,虚拟化,xen)