Centos7 使用kvm创建虚拟机
来自CloudWiki
1. KVM环境配置
关闭Selinux
(1) [root@ localhost ~]#vim /etc/sysconfig/selinux # 修改SELINUX=disabled # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted (2) [root@ localhost ~]#setenforce 0 #当次生效,getenforce 查看当前selinux状态 (3)关闭防火墙 [root@ localhost ~]#systemctl stop firewalld [root@ localhost ~]#systemctl disable firewalld (4)查看是否支持虚拟机 [root@localhost ~]# egrep -c '(vmx|svm)' /proc/cpuinfo 2 #如果执行这条命令的返回结果为0则表示CPU不支持虚拟化,如果返回结果为1或者大于1到数字则表示CPU支持虚拟。其中vmx为Intel的CPU指令集,svm为AMD的CPU指令集。