centos7.8在宿主机上安装kvm虚拟化的环境
yum -y install qemu-kvm libvirt virt-manager virt-install virt-viewer
systemctl start --now libvirtd
Ubuntu 安装 KVM
yum -y istall qemu-kvm virt-manager libvirt-daemon-system
#如果没有开启CPU虚拟化功能会提示以下信息
[root@ubuntu1804 ~]#kvm-ok
INFO: Your CPU does not support KVM extensions
KVM acceleration can NOT be used
#添加CPU的虚拟化支持再执行
[root@ubuntu1804 ~]#kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
ps:centos8提供了供基于Web的虚拟机管理方式
[root@centos8 ~]#yum -y install cockpit
[root@centos8 ~]#systemctl enable --now cockpit.socket
Created symlink /etc/systemd/system/sockets.target.wants/cockpit.socket →
/usr/lib/systemd/system/cockpit.socket.
[root@centos8 ~]#dnf -y install cockpit
#打开浏览器,访问以下地址:
https://centos8主机:9090
在windos端安装virt-manager图形化工具
使用命令启动virt-manager工具
export DIRPLAY=10