系统:centos7.1
安装环境:桌面环境、kvm基础服务
一、关闭selinux
[[email protected] ~]# setenforce 0 [[email protected] ~]# sed -i ‘s/enforcing/disabled/g‘ /etc/selinux/config
二、关闭iptables
[[email protected] ~]# systemctl stop firewalld [[email protected] ~]# systemctl disable firewalld
三、确认服务器cpu是否支持虚拟化
[[email protected] ~]# grep -o ‘vmx\|svm‘ /proc/cpuinf vmx vmx vmx vmx vmx vmx vmx vmx
四、安装桌面
1、已经安装的软件以及可以安装的软件
2、安装图形桌面
[[email protected] ~]# yum -y groupinstall "X Window System" "GNOME Desktop"
3、安装vncserver
[[email protected] ~]# yum -y install tigervnc-server
4、配置vnc
[[email protected] ~]# 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依赖包
[[email protected] ~]# yum -y install qemu-kvm libvirt virt-install bridge-utils virt-manager [[email protected] ~]# lsmod |grep kvmkvm_intel 148081 0 kvm 461126 1 kvm_intel
2、启动libvirt服务
[[email protected] ~]# systemctl start libvirtd [[email protected] ~]# systemctl enable libvirtd
这样就可以创建kvm虚拟机了
时间: 2024-12-13 18:49:27