KVM创建存储池中报错:确认输入时未捕获的错误:constructor returned null解决

简介: KVM创建存储池中报错:确认输入时未捕获的错误:constructor returned null解决

Uncaught error validating input: constructor returned NULL


Uncaught error validating input: constructor returned NULL  Traceback (most recent call last):   File "/usr/share/virt-manager/virtManager/createpool.py", line 398, in forward     self.finish()   File "/usr/share/virt-manager/virtManager/createpool.py", line 427, in finish     self.reset_finish_cursor()   File "/usr/share/virt-manager/virtManager/baseclass.py", line 278, in reset_finish_cursor     cursor = Gdk.Cursor.new_from_name(gdk_window.get_display(), "default") TypeError: constructor returned NULL

image.png

解决:


       其实问题很简单,大家在安装KVM的时候都是使用yum安装的吧,使用的应该是阿里或清华等源,这些源呢,存放的KVM的包都是较新的,所以我们需要去下载内核对应的版本KVM,如何来找呢,找到当前系统版本的光盘,来进行挂载到本地,搭建本地yum即可。但是如果你是进行企业使用的话,还是使用较新的版本即可,可以更新内核。

解决方法:

1.将当前装的KVM全部卸载干净

yum -y  remove qemu-kvm qemu-kvm-tools virt-install qemu-img bridge-utils libvirt virt-manager
yum remove `rpm -qa | egrep 'qemu|virt|KVM'` -y
rm -rf /var/lib/libvirt /etc/libvirt/

2.搭建本地yum源

       将当前系统的光盘进行挂载到本地(如果是真实环境的话,需要使用移动存储设备将镜像拷贝到本地进行挂载)

image.png

 挂载

mount /dev/sr0 /mnt

       将本地所有yum进行备份失效

[root@localhost ~]# ls /etc/yum.repos.d/
CentOS-Base.repo        
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

   编写本地yum源

[root@localhost ~]# vi /etc/yum.repos.d/local.repo 
[local]
name=local
baseurl=file:///mnt
gpgcheck=0

清除缓存

[root@localhost ~]# yum clean all
已加载插件:fastestmirror, langpacks
正在清理软件源: local
Cleaning up everything
Cleaning up list of fastest mirrors

3.安装KVM

yum -y  install qemu-kvm qemu-kvm-tools virt-install qemu-img bridge-utils libvirt virt-manager

4.测试

       开启服务

1. systemctl start libvirtd
2. systemctl enable libvirtd

打开KVM客户端

[root@localhost ~]# virt-manager


d2e3ba1d5340489a924fa3c5a77bd2c2.png

更新内核尝试(第二种)

       不需要进行卸载,需要根据下载的KVM版本,更新系统内核,然后重启,重试,需要更新的软件包较多,只适用于真实场景中

yum install *qemu* *virt* librbd1-devel -y
[root@localhost ~]# yum update -y

CentOS8

yum upgrade rpm -y
目录
相关文章
|
9月前
|
容器
Echarts报错 Cant read property getWidth of null的解决方案
Echarts报错 Cant read property getWidth of null的解决方案
88 0
|
JSON 前端开发 API
【跨域报错解决方案】Access to XMLHttpRequest at ‘http://xxx.com/xxx‘ from origin ‘null‘ has been blocked by
【跨域报错解决方案】Access to XMLHttpRequest at ‘http://xxx.com/xxx‘ from origin ‘null‘ has been blocked by
1885 0
|
6月前
|
缓存 关系型数据库 MySQL
【异常解决】缓存报错:Null key returned for cache operation (maybe you are using named params on classes withou
【异常解决】缓存报错:Null key returned for cache operation (maybe you are using named params on classes withou
208 0
|
6月前
|
缓存 Cloud Native JavaScript
猫头虎的技术博客:解决npm报错 npm ERR! Cannot read properties of null (reading ‘pickAlgorithm‘)报错问题
猫头虎的技术博客:解决npm报错 npm ERR! Cannot read properties of null (reading ‘pickAlgorithm‘)报错问题
120 0
|
9月前
|
JavaScript
解决npm ERR! Cannot read properties of null (reading ‘pickAlgorithm‘)报错问题
在vue项目中,使用npm i 命令安装node modules时,出现报错。
|
10月前
|
Dart 安全
Flutter开发Cannot run with sound null safety报错
Flutter开发Cannot run with sound null safety报错
|
10月前
springSecurity报错:Cannot pass a null GrantedAuthority collection
springSecurity报错:Cannot pass a null GrantedAuthority collection
88 0
|
11月前
|
SQL 监控 druid
事务未能正确提交导致Druid报错connection holder is null(2)
事务未能正确提交导致Druid报错connection holder is null(2)
726 0
|
11月前
|
SQL 存储 网络协议
事务未能正确提交导致Druid报错connection holder is null(1)
事务未能正确提交导致Druid报错connection holder is null
362 0
|
2月前
|
机器学习/深度学习 SQL 关系型数据库
【MySQL进阶之路丨第十一篇】一文带你精通MySQL NULL值处理、正则表达式
【MySQL进阶之路丨第十一篇】一文带你精通MySQL NULL值处理、正则表达式
36 0