kvm版本更换导致的虚拟机启动错误解决(版本低于原来安装kvm时的kvm版本)
2023-09-14 09:13:15 时间
问题出现的情况:
一,
使用在高版本kvm安装的虚拟机的配置xml文件,该虚拟机启动的时候报错如下:
[root@centos1 ~]# virsh create centos.xml
error: Failed to create domain from centos.xml
error: internal error: process exited while connecting to monitor: qemu-kvm: -machine pc-i440fx-rhel7.6.0,accel=kvm,usb=off,dump-guest-core=off: Unsupported machine type
Use -machine help to list supported machines!
[root@centos1 ~]# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-05-09 20:41:10 CST; 1min 18s ago
Docs: man:libvirtd(8)
https://libvirt.org
Main PID: 1620 (libvirtd)
Tasks: 19 (limit: 32768)
CGroup: /system.slice/libvirtd.service
├─1286 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelpe...
├─1287 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelpe...
└─1620 /usr/sbin/libvirtd
May 09 20:41:16 centos1 libvirtd[1620]: 2022-05-09 12:41:16.846+0000: 1623: info : hostname: centos1
May 09 20:41:16 centos1 libvirtd[1620]: 2022-05-09 12:41:16.846+0000: 1623: error : qemuMonitorOpenUnix:379 : failed to connect to monitor ... process
May 09 20:41:16 centos1 libvirtd[1620]: 2022-05-09 12:41:16.846+0000: 1623: error : qemuProcessReportLogError:1924 : internal error: proces...ine type
May 09 20:41:16 centos1 libvirtd[1620]: Use -machine help to list supported machines!
May 09 20:41:23 centos1 libvirtd[1620]: 2022-05-09 12:41:23.493+0000: 1623: error : qemuMonitorOpenUnix:379 : failed to connect to monitor ... process
May 09 20:41:23 centos1 libvirtd[1620]: 2022-05-09 12:41:23.493+0000: 1623: error : qemuProcessReportLogError:1924 : internal error: proces...ine type
May 09 20:41:23 centos1 libvirtd[1620]: Use -machine help to list supported machines!
May 09 20:42:19 centos1 libvirtd[1620]: 2022-05-09 12:42:19.295+0000: 1623: error : qemuMonitorOpenUnix:379 : failed to connect to monitor ... process
May 09 20:42:19 centos1 libvirtd[1620]: 2022-05-09 12:42:19.295+0000: 1623: error : qemuProcessReportLogError:1924 : internal error: proces...ine type
May 09 20:42:19 centos1 libvirtd[1620]: Use -machine help to list supported machines!
Hint: Some lines were ellipsized, use -l to show in full.
二,
两个版本的对比:
安装虚拟机所使用的kvm版本(注意了,这个版本的kvm需要高版本的内核支持,说人话就是要升级内核才可以正常使用kvm):
[root@centos1 ~]# virsh -c qemu:///system
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # version
Compiled against library: libvirt 4.5.0
Using library: libvirt 4.5.0
Using API: QEMU 4.5.0
Running hypervisor: QEMU 2.12.0
上面报错的kvm版本:
[root@centos1 ~]# virsh -c qemu:///system
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # version
Compiled against library: libvirt 4.5.0
Using library: libvirt 4.5.0
Using API: QEMU 4.5.0
Running hypervisor: QEMU 1.5.3
xml文件的machine标签内内容:
<domain type='kvm'>
<name>centos</name>
<uuid>a15efb24-5075-46a8-9732-8e489ece5aba</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-rhel7.6.0'>hvm</type>
<boot dev='hd'/>
三,
解决方法:
使用命令/usr/libexec/qemu-kvm -machine help
查看支持的类型
[root@centos1 ~]# /usr/libexec/qemu-kvm -machine help
Supported machines are:
none empty machine
pc RHEL 7.0.0 PC (i440FX + PIIX, 1996) (alias of pc-i440fx-rhel7.0.0)
pc-i440fx-rhel7.0.0 RHEL 7.0.0 PC (i440FX + PIIX, 1996) (default)
rhel6.6.0 RHEL 6.6.0 PC
rhel6.5.0 RHEL 6.5.0 PC
rhel6.4.0 RHEL 6.4.0 PC
rhel6.3.0 RHEL 6.3.0 PC
rhel6.2.0 RHEL 6.2.0 PC
rhel6.1.0 RHEL 6.1.0 PC
rhel6.0.0 RHEL 6.0.0 PC
发现里面有个alias of pc-i440fx-rhel7.0.0 ,而原文件内是alias of pc-i440fx-rhel7.6.0, 因此,将6改成0,再次启动虚拟机没有报错,此问题彻底解决。
总结:kvm版本需要注意,选择一个合适的kvm版本很重要。
相关文章
- 虚拟机安装苹果系统 出现不可恢复的错误解决办法
- [Win10]安装msi时2503,2502错误及其解决
- SQL Server 2012安装错误案例:Error while enabling Windows feature: NetFx3, Error Code: -2146498298
- Oracle安装错误ora-00922(zhuan)
- 检查错误的视频文件
- 【IOS-COCOS2D-X 游戏开发之十一】NEW CCSPRITE()带来的错误&使用CCUSERDEFAULT及PVR.CCZ在COCOS2DX中要注意!
- 解决Office 2013无法打开文件并提示错误的问题
- PCL RANSAC剔除错误匹配点对
- ArcGIS 安装中,SQL的使用出现错误的解决
- "visual studio 2012 安装引擎拒绝访问" 错误的解决
- 调用Hybris API时遇到的错误消息Cannot find user with uid如何解决
- paip.python错误解决13
- git错误non-fast-forward后的冲突解决
- 解决Data source rejected establishment of connection, message from server: “Too many connections“的错误
- 【错误记录】Ubuntu 安装 Linux 内核后需要重新安装 VMware Tools 软件进行兼容操作
- 【错误记录】Groovy 注入方法报错 ( Cannot add new method [hello] for arguments [[]]. It already exists )
- Win11系统电脑安装steam客户端出现错误怎么办?
- [ Azure - VM ] 快速解决 Redhat 安装源 RHEL yum 出现 “Unable to read consumer identity” 错误
- 安装spark local运行出现错误NoClassDefFoundError: org/slf4j/Logger 原来是要设置hadoop home和spark classpath虽然without hadoop
- ElasticSearch-5.3.1集群环境搭建,安装ElasticSearch-head插件,安装错误解决
- yum安装错误集锦
- yum安装出现错误
- HBASE中的常见错误
- 成功解决解决VM软件安装Linux的Ubuntu过程,开启Linux出现Oprating System not found错误
- Mysql错误1452 - Cannot add or update a child row: a foreign key constraint fails 原因及解决方法
- 安装SQLserver2008时出现的错误