gpt4 book ai didi

kubernetes - 使用 libvirt 启动 Codeready 容器导致 "format of backing image was not specified in the image metadata"

转载 作者:行者123 更新时间:2023-12-02 11:38:31 25 4
gpt4 key购买 nike

我正在尝试使用 CRC 在我的笔记本电脑(Ubuntu 20)上测试 Openshift 4。 CRC 1.17 版不支持 Virtualbox 虚拟化,因此请按照设置说明进行操作
https://access.redhat.com/documentation/en-us/red_hat_codeready_containers/1.17/html/getting_started_guide/installation_gsg
我正在使用 libvirt,但是当我使用 crc start 启动集群时它启动以下错误

INFO Checking if oc binary is cached              
INFO Checking if podman remote binary is cached
INFO Checking if goodhosts binary is cached
INFO Checking minimum RAM requirements
INFO Checking if running as non-root
INFO Checking if Virtualization is enabled
INFO Checking if KVM is enabled
INFO Checking if libvirt is installed
INFO Checking if user is part of libvirt group
INFO Checking if libvirt daemon is running
INFO Checking if a supported libvirt version is installed
INFO Checking if crc-driver-libvirt is installed
INFO Checking if libvirt 'crc' network is available
INFO Checking if libvirt 'crc' network is active
INFO Checking if NetworkManager is installed
INFO Checking if NetworkManager service is running
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists
INFO Starting CodeReady Containers VM for OpenShift 4.5.14...
ERRO Error starting stopped VM: virError(Code=55, Domain=18, Message='Requested operation is not valid: format of backing image '/home/claudiomerli/.crc/cache/crc_libvirt_4.5.14/crc.qcow2' of image '/home/claudiomerli/.crc/machines/crc/crc.qcow2' was not specified in the image metadata (See https://libvirt.org/kbase/backing_chains.html for troubleshooting)')
Error starting stopped VM: virError(Code=55, Domain=18, Message='Requested operation is not valid: format of backing image '/home/claudiomerli/.crc/cache/crc_libvirt_4.5.14/crc.qcow2' of image '/home/claudiomerli/.crc/machines/crc/crc.qcow2' was not specified in the image metadata (See https://libvirt.org/kbase/backing_chains.html for troubleshooting)')
我没有使用 libvirt 的经验,所以我一直坚持在网上,我没有找到任何东西......
谢谢

最佳答案

crc_libvirt_4.5.14 镜像存在问题。修复它的最简单方法是执行

qemu-img rebase -f qcow2 -F qcow2 -b /home/${USER}/.crc/cache/crc_libvirt_4.5.14/crc.qcow2 /home/${USER}/.crc/machines/crc/crc.qcow2
现在,如果你尝试做一个 crc start ,除非您将主目录列入白名单,否则您将面临与 Apparmor 相关的“权限被拒绝”错误。如果您不想修改 Apparmor 设置,请使用 /var/lib/libvirt/images应该是白名单。将图像移动到那里:
sudo mv /home/${USER}/.crc/machines/crc/crc.qcow2 /var/lib/libvirt/images
然后编辑指向新镜像位置的虚拟机设置: virsh edit crc ,然后替换 <source file='/home/yourusername/.crc/machines/crc/crc.qcow2'/><source file='/var/lib/libvirt/images/crc.qcow2'/> .
然后做 crc start而且……就是这样。
相关 Github 问题如下:
  • https://github.com/code-ready/crc/issues/1596
  • https://github.com/code-ready/crc/issues/1578
  • 关于kubernetes - 使用 libvirt 启动 Codeready 容器导致 "format of backing image was not specified in the image metadata",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64413928/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com