系统:centos7.1
安装环境:桌面环境、kvm基础服务
一、关闭selinux
[root@localhost ~]# setenforce 0 [root@localhost ~]# sed -i ‘s/enforcing/disabled/g‘ /etc/selinux/config
二、关闭iptables
[root@localhost ~]# systemctl stop firewalld [root@localhost ~]# systemctl disable firewalld
三、确认服务器cpu是否支持虚拟化
[root@localhost ~]# grep -o ‘vmx\|svm‘ /proc/cpuinf vmx vmx vmx vmx vmx vmx vmx vmx
四、安装桌面
1、已经安装的软件以及可以安装的软件
2、安装图形桌面
[root@localhost ~]# yum -y groupinstall "X Window System" "GNOME Desktop"
3、安装vncserver
[root@localhost ~]# yum -y install tigervnc-server
4、配置vnc
[root@localhost ~]# vncserver You will require a password to access your desktops. Password: Verify: xauth: file /root/.Xauthority does not exist New ‘localhost.localdomain:1 (root)‘ desktop is localhost.localdomain:1 Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/localhost.localdomain:1.log
5、使用vnc连接测试
五、安装kvm
1、安装kvm依赖包
[root@localhost ~]# yum -y install qemu-kvm libvirt virt-install bridge-utils virt-manager [root@localhost ~]# lsmod |grep kvmkvm_intel 148081 0 kvm 461126 1 kvm_intel
2、启动libvirt服务
[root@localhost ~]# systemctl start libvirtd [root@localhost ~]# systemctl enable libvirtd
这样就可以创建kvm虚拟机了
本文出自 “LINUX” 博客,请务必保留此出处http://wangpengtai.blog.51cto.com/3882831/1953235
原文地址:http://wangpengtai.blog.51cto.com/3882831/1953235