在 CentOS 上部署的 Cobbler 服务无法导入 openEuler 镜像的解决方案

如题,当在 CentOS 操作系统上部署 Cobbler 服务后,导入 openEuler 镜像会报如下错误:

$ cobbler import --name=openEuler-22.03-LTS --path=/mnt --arch=x86_64
task started: 2024-01-24_160031_import
task started (id=Media import, time=Wed Jan 24 16:00:31 2024)
Found a candidate signature: breed=suse, version=opensuse15.0
Found a candidate signature: breed=suse, version=opensuse15.1
Found a candidate signature: breed=redhat, version=rhel6
Found a candidate signature: breed=redhat, version=rhel7
Found a candidate signature: breed=redhat, version=fedora30
Found a candidate signature: breed=redhat, version=fedora28
Found a candidate signature: breed=redhat, version=fedora21
Found a candidate signature: breed=redhat, version=fedora20
Found a candidate signature: breed=redhat, version=fedora23
Found a candidate signature: breed=redhat, version=fedora22
Found a candidate signature: breed=redhat, version=fedora25
Found a candidate signature: breed=redhat, version=fedora24
Found a candidate signature: breed=redhat, version=fedora26
Found a candidate signature: breed=redhat, version=fedora29
Found a candidate signature: breed=redhat, version=cloudlinux6
Found a candidate signature: breed=redhat, version=fedora27
Found a candidate signature: breed=redhat, version=fedora16
Found a candidate signature: breed=redhat, version=fedora17
Found a candidate signature: breed=redhat, version=fedora18
Found a candidate signature: breed=redhat, version=fedora19
No signature matched in /var/www/cobbler/ks_mirror/openEuler-22.03-LTS-x86_64
!!! TASK FAILED !!!

报错信息显示不能查询到匹配 openEuler 镜像的签名,这是因为此 Cobbler 并未对 openEuler 做适配。既然如此,可以手动添加相应签名,以匹配 openEuler,具体做法为:在 /var/lib/cobbler/distro_signatures.json 文件中的 “breeds”: { } 部分添加以下内容

添加完成后,重启 cobblerd 服务,现在可以正常导入 openEuler 镜像了

$ cobbler import --name=openEuler-22.03-LTS --path=/mnt --arch=x86_64
task started: 2024-01-24_174124_import
task started (id=Media import, time=Wed Jan 24 17:41:24 2024)
Found a candidate signature: breed=suse, version=sles15generic
Found a candidate signature: breed=suse, version=opensuse15.0
Found a candidate signature: breed=suse, version=opensuse15.1
Found a candidate signature: breed=redhat, version=ovz7
Found a candidate signature: breed=redhat, version=fedora29
Found a candidate signature: breed=redhat, version=fedora28
Found a candidate signature: breed=redhat, version=fedora21
Found a candidate signature: breed=redhat, version=fedora20
Found a candidate signature: breed=redhat, version=fedora23
Found a candidate signature: breed=redhat, version=fedora22
Found a candidate signature: breed=redhat, version=fedora25
Found a candidate signature: breed=redhat, version=fedora24
Found a candidate signature: breed=redhat, version=fedora27
Found a candidate signature: breed=redhat, version=fedora26
Found a candidate signature: breed=redhat, version=cloudlinux6
Found a candidate signature: breed=redhat, version=fedora16
Found a candidate signature: breed=redhat, version=fedora31
Found a candidate signature: breed=redhat, version=rhel6
Found a candidate signature: breed=redhat, version=rhel7
Found a candidate signature: breed=redhat, version=fedora36
Found a candidate signature: breed=redhat, version=fedora37
Found a candidate signature: breed=redhat, version=fedora34
Found a candidate signature: breed=redhat, version=fedora35
Found a candidate signature: breed=redhat, version=fedora32
Found a candidate signature: breed=redhat, version=fedora33
Found a candidate signature: breed=redhat, version=fedora30
Found a candidate signature: breed=redhat, version=fedora17
Found a candidate signature: breed=redhat, version=fedora18
Found a candidate signature: breed=redhat, version=fedora19
Found a candidate signature: breed=openeuler, version=openeuler
Found a matching signature: breed=openeuler, version=openeuler
Adding distros from path /var/www/cobbler/ks_mirror/openEuler-22.03-LTS-x86_64:
creating new distro: openEuler-22.03-LTS-x86_64
creating new profile: openEuler-22.03-LTS-x86_64
associating repos
checking for rsync repo(s)
checking for rhn repo(s)
checking for yum repo(s)
starting descent into /var/www/cobbler/ks_mirror/openEuler-22.03-LTS-x86_64 for openEuler-22.03-LTS-x86_64
processing repo at : /var/www/cobbler/ks_mirror/openEuler-22.03-LTS-x86_64
directory /var/www/cobbler/ks_mirror/openEuler-22.03-LTS-x86_64 is missing xml comps file, skipping
*** TASK COMPLETE ***

当然,还有更简单的办法,直接在 openEuler 操作系统上部署 Cobbler 即可,此 Cobbler 已经适配 openEuler

5 Likes

赞一个!

可以,不过还是直接用openEuler部署cobbler来的方便一些