openeuler安装KVM+cockpit经验分享

KVM安装
1,相关包说明
qemu-kvm #主要的KVM程序包
python-virtinst #创建虚拟机所需要的命令行工具和程序库
virt-top #虚拟机统计命令
virt-viewer #GUI连接程序,连接到已配置好的虚拟机
libvirt #C语言工具包,提供libvirt服务 虚拟机管理工具
libvirt-client #为虚拟客户机提供的C语言工具包
virt-install #虚拟机命令行工具
bridge-utils #构建和管理桥接设备的工具
qemu-kvm-tools # 安装KVM 调试工具,可不安装
qemu-img # qemu 组件,创建磁盘、启动虚拟机等
virt-manager # 图形界面管理虚拟机
egrep -o ‘vmx|svm’ /proc/cpuinfo #检查cpu是否支持虚拟化
2,KVM安装
yum -y install qemu-kvm libvirt virt-install bridge-utils virt-manager
3,开机启动
systemctl start libvirtd && systemctl enable libvirtd

Cockpit安装
1,相关包说明
cockpit-dashboard是仪表盘模块
cockpit-storaged是存储管理的模块
cockpit-networkmanager是网络管理模块
cockpit-packagekit是软件更新和应用程序安装模块(通常默认安装)
cockpit-pcp是持久和更细粒度的性能数据(根据需要从UI安装)
2,cockpit安装
yum -y install cockpit
3,cockpit-machines安装
openeuler系统没有cockpit-machines包,需要使用CentOS Stream cockpit-machines和libvirt-dbus的包
3.1,下载cockpit-machines和libvirt-dbus
wget https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/cockpit-machines-326-1.el9.noarch.rpm
wget https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/libvirt-dbus-1.4.1-5.el9.x86_64.rpm
3.2,安装
yum install -y libvirt-dbus-1.4.1-5.el9.x86_64.rpm && yum install -y cockpit-machines-326-1.el9.noarch.rpm
4,防火墙放行cockpit
firewall-cmd -–add-service=cockpit
firewall-cmd -–add-service=cockpit --per
设置开机自启服务并现在启动
systemctl enable --now cockpit.socket
5,进入cockpit管理页面
https://主机地址:9090