openEuler 24.03 (LTS) cockpit 安装完成没有虚拟机选项的分享

yum search cockpit cockpit-machines
只有cockpit 没有cockpit-machines
1.yum install -y cockpit
2.下载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.先安装libvirt-dbus,再安装cockpit-machines
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 默认端口(可选)我本地安装了 Prometheus有冲突所以修改

vim /usr/lib/systemd/system/cockpit.socket

ListenStream=9090  
改为
ListenStream=9988

5.重新加载配置
systemctl daemon-reload
systemctl restart cockpit

6.验证
netstat -anltp | grep cockpit
7.防火墙放行
firewall-cmd --zone=public --add-port=9988/tcp --permanent
firewall-cmd --reload
8.浏览器登录
http://127.0.0.1:9988

其他: 端口可改可不改,我本地有冲突所以改了端口,登录账号和密码就是linux登录的秘密。