KVM软件安装/Guest OS图形模式安装

KVM软件安装

首先你的Linux操作系统得带有图形化界面

虚拟机开启硬件虚拟化

  • 关闭防火墙和selinux
[root@server-d ~]# systemctl stop firewalld
[root@server-d ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@server-d ~]# vim /etc/sysconfig/selinux
[root@server-d ~]# cat /etc/sysconfig/selinux

# 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 three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted


[root@server-d ~]# setenforce 0
  • 查看cpu是否支持VT(虚拟化)技术
 cat /proc/cpuinfo | grep -E 'vmx|svm'
  • 清理环境:卸载KVM
     yum remove `rpm -qa | egrep 'qemu|virt|KVM'` -y

     rm -rf /var/lib/libvirt/  /etc/libvirt/
  • 安装软件(CentOS7)
yum install *qemu* *virt* librbdi-devel -y
  • 启动服务,并查看KVM模块加载
[root@server-d ~]# systemctl start libvirtd
[root@server-d ~]# systemctl enable libvirtd
[root@server-d ~]# lsmod |grep kvm
kvm_intel             188793  0
kvm                   653928  1 kvm_intel
irqbypass              13503  1 kvm

Guest OS图形模式安装

yum install -y cockpit
systemctl start cockpit
查看端口
[root@server-d ~]# netstat -lntp | grep 9090
tcp6       0      0 :::9090                 :::*                    LISTEN      1/systemd

查看你主机ip,浏览器访问页面
在这里插入图片描述

在这里插入图片描述

关闭cockpit

[root@server-d ~]# systemctl stop cockpit.socket
[root@server-d ~]# netstat -nltp
  • 上传镜像文件至你自己选择任意目录下
[root@server-d ~]# ls
anaconda-ks.cfg               initial-setup-ks.cfg  模板  图片  下载  桌面
CentOS-7-x86_64-DVD-1810.iso  公共                  视频  文档  音乐
virt-manager
  • 弹出界面
    在这里插入图片描述

  • 安装虚拟机,选择本地安装

在这里插入图片描述

  • 选择你上传上来的镜像文件

在这里插入图片描述

按照步骤后面可以默认不变
在这里插入图片描述

然后按照安装虚拟机步骤进行即可

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值