Fedora 16安装XEN虚拟机


XEN 最初是作为剑桥大学的一个项目,目前 XEN.ORG 社区在负责它的开发及维护,它已经在开源社区中得到了极大的发展。

XEN 是一种直接运行在硬件上一层软件,它可以让电脑硬件上同时跑多个用户的操作系统。由于对 x86, x86-64, Itanium, Power PC, 

和 ARM 这些处理器的支持,所以 XEN 管理工具可以支持的操作系统有 Linux, NetBSD,FreeBSD,Solaris, Windows 和其他一些

运行在 XEN 上的正常的操作系统。

下面我将分3步讲解Fedora16下如何安装XEN虚拟机,并创建DomU:

(一)安装前的配置

(二)安装XEN虚拟机

(三)创建DomU


建议:

在安装XEN时,为保证用户权限不受限避免出现权限错误,建议用root用户登录安装。

如不知道如何开启root用户登录,请阅读设置Fedora能够使用root用户登录


--------------------------------------------------------------------

(一)安装前的配置

安装好Fedora16后,先对其进行适当配置再进行XEN的安装,可提高XEN安装的成功率。

1)配置网络服务,使其自动启动

[root@localhost ~]$ chkconfig network on

[root@localhost ~]$ /etc/init.d/network start


2)关闭SELinux,编辑/etc/selinux/config文件,将SELINUX改为disabled,如下

[root@localhost ~]$ gedit /etc/selinux/config

  1. # This file controls the state of SELinux on the system.  
  2. # SELINUX= can take one of these three values:  
  3. #     enforcing - SELinux security policy is enforced.  
  4. #     permissive - SELinux prints warnings instead of enforcing.  
  5. #     disabled - No SELinux policy is loaded.  
  6. SELINUX=disabled  
  7. # SELINUXTYPE= can take one of these two values:  
  8. #     targeted - Targeted processes are protected,  
  9. #     mls - Multi Level Security protection.  
  10. SELINUXTYPE=targeted   


3)编辑/etc/hosts文件,为安装Fedora16时指定的主机名添加一项,如下

[root@localhost ~]$ gedit /etc/hosts

  1. 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4  
  2. ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6  
  3. 127.0.0.1    f16 localhost.localdomain  

4)更新Fedora16系统

[root@localhost ~]$ yum update


5)禁用防火墙

[root@localhost ~]$ chkconfig iptables off


6)禁用ksmtuned服务,但前和XEN不兼容

[root@localhost ~]$ chkconfig ksmtuned off


7)重启系统,选择最新的内核

[root@localhost ~]$ reboot



      

(二)安装XEN虚拟机

重启选择新内核登录后,就可以安装XEN了,在安装XEN之前,我们先安装一些XEN运行时可能会用到到包。

1)安装一些开发库和开发工具

[root@localhost ~]$ yum groupinstall "Development Libraries"

[root@localhost ~]$ yum groupinstall "Development Tools"

2)安装XEN运行时可能会用到的包

[root@localhost ~]$ yum install transfig wget texi2html libaio-devel dev86 glibc-devel e2fsprogs-devel gitk mkinitrd iasl xz-devel bzip2-devel

pciutils-libs pciutils-devel SDL-devel libX11-devel gtk2-devel bridge-utils PyXML qemu-common qemu-img mercurial
[root@localhost ~]$ yum install glibc-devel.i686

3)所有必要的包都已安装,接着可以安装XEN和其依赖包

[root@localhost ~]$ yum install xen

4)启动相关服务

[root@localhost ~]# /etc/init.d/xenconsoled start

[root@localhost ~]# /etc/init.d/xend start

[root@localhost ~]# /etc/init.d/xendomains start

[root@localhost ~]# /etc/init.d/xencommons start

[root@localhost ~]# /etc/init.d/xenstored start

[root@localhost ~]# /etc/init.d/libvirtd start

5)重启进入XEN的Dom0

[root@localhost ~]$ reboot

  • 1
  • 2
  • 下一页

相关内容