问题描述
我正在尝试使用CRC在笔记本电脑(Ubuntu 20)上测试Openshift 4。 CRC 1.17版本不支持VirtualBox虚拟化,因此请按照设置说明进行操作
我正在使用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,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映像存在问题。解决此问题的最简单方法是执行
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
[self.collectionView registerNib:[UINib nibWithNibName:@"ClientCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:@"ClientCollectionViewCell"];
[_collectionView setDataSource:self];
[_collectionView setDelegate:self];
NSMutableDictionary *viewParams1 = [NSMutableDictionary new];
[viewParams1 setValue:@"cdata" forKey:@"view_name"];
[DIOSView viewGet:viewParams1 success:^(AFHTTPRequestOperation *operation,id responseObject) {
self.clientsWeek = [responseObject mutableCopy];
NSLog(@"The people are here %@",self.clientsWeek);
[self.collectionView reloadData];
} failure:^(AFHTTPRequestOperation *operation,NSError *error) {
NSLog(@"Failure: %@",[error localizedDescription]);
}];
}
现在,如果尝试执行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
,除非将主目录列入白名单,否则您将面临与Apparmor相关的“权限被拒绝”错误。如果您不想在Apparmor设置上乱搞,应该将crc start
列入白名单。将图像移到那里:
/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'/>
,就这样。
相关的Github问题: