kvm版本更换导致的虚拟机启动错误解决(版本低于原来安装kvm时的kvm版本)

简介: kvm版本更换导致的虚拟机启动错误解决(版本低于原来安装kvm时的kvm版本)

问题出现的情况:

一,使用在高版本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版本很重要。

目录
相关文章
|
15天前
|
存储 分布式计算 Linux
安装篇--CentOS 7 虚拟机安装
VMware 装 CentOS 7 不知道从哪下手?这篇超详细图文教程手把手教你在 VMware Workstation 中完成 CentOS 7 桌面系统的完整安装流程。从 ISO 镜像下载、虚拟机配置,到安装图形界面、设置用户密码,每一步都有截图讲解,适合零基础新手快速上手。装好之后无论你是要搭 Hadoop 集群,还是练 Linux ,这个环境都够你折腾一整天!
339 3
|
3月前
|
编解码 网络协议 网络安全
OpenWrt x86 虚拟机VMware ESXi安装
OpenWrt x86 虚拟机VMware ESXi安装
|
7月前
|
缓存 Linux 调度
【YashanDB数据库】VMware虚拟机使用默认安装,在掉电之后数据库无法启动
VMware虚拟机使用默认安装,在掉电之后数据库无法启动
|
7月前
|
IDE 测试技术 数据库
【YashanDB知识库】使用vmware虚拟机安装的YashanDB,本机无法访问
在 VMware 虚拟机中安装并测试 YashanDB,数据库及虚拟机运行正常,但本地 IDE 工具无法连接虚拟机中的数据库。问题可能与 VMware 网络适配器配置或网络模式(如 NAT、桥接)有关,导致网络通信异常。需检查虚拟机网络设置、IP 地址配置以及防火墙规则,确保本地与虚拟机间网络连通性。目前无明确修复版本。
|
5月前
|
人工智能 安全 虚拟化
企业级Win11纯净部署指南|VMware虚拟机安装+GPT分区优化+绕过限制详解(小白必看)
Windows 11 是微软推出的新一代操作系统,以其直观交互和 AI 技术为核心升级亮点。界面采用圆角设计与居中任务栏布局,支持多窗口贴靠分屏、虚拟桌面功能,大幅提升多任务处理效率。系统深度集成了 Copilot 智能助手,提供语音写作、照片编辑等便捷功能,并通过 DirectStorage 和 DirectX 12 Ultimate 技术优化游戏体验。本文详细介绍 Windows 11 的下载、U盘制作及安装步骤,帮助用户快速上手全新系统。
428 21
|
6月前
|
域名解析 API PHP
VM虚拟机全版本网盘+免费本地网络穿透端口映射实时同步动态家庭IP教程
本文介绍了如何通过网络穿透技术让公网直接访问家庭电脑,充分发挥本地硬件性能。相比第三方服务受限于转发带宽,此方法利用自家宽带实现更高效率。文章详细讲解了端口映射教程,包括不同网络环境(仅光猫、光猫+路由器)下的设置步骤,并提供实时同步动态IP的两种方案:自建服务器或使用三方API接口。最后附上VM虚拟机全版本下载链接,便于用户在穿透后将服务运行于虚拟环境中,提升安全性与适用性。
|
8月前
|
存储 编解码 虚拟化
【2025最新】VMware Workstation Pro 虚拟机配置与安装VMware Tools 感受它的强大~
VMware Tools 是 VMware 虚拟机中自带的一种增强工具,能够显著提升虚拟机的性能和用户体验。它提供了优化的显卡驱动程序、文件共享与拖放功能、时间同步以及跨虚拟机和宿主机的复制粘贴功能。安装 VMware Tools 可以让虚拟机在 VMware 平台上运行得更加高效,并且对于老旧系统(如 Win98、Win2000、WinXP)也能提供必要的驱动支持。每个虚拟机都需要独立安装与其操作系统版本相匹配的 VMware Tools,以确保最佳兼容性和性能表现。
758 6
【2025最新】VMware Workstation Pro 虚拟机配置与安装VMware Tools 感受它的强大~
|
8月前
|
Web App开发 安全 Linux
【独家揭秘2025】VMware Workstation Pro虚拟机:免费安装教程大放送,一键解锁操作系统模拟神器!
VMware Workstation Pro 是由威睿(VMware)公司开发的一款功能强大的桌面虚拟化软件,允许用户在同一台物理计算机上同时运行多个操作系统,如Windows、..
504 2
【独家揭秘2025】VMware Workstation Pro虚拟机:免费安装教程大放送,一键解锁操作系统模拟神器!
|
7月前
|
IDE 测试技术 网络安全
【YashanDB知识库】使用vmware虚拟机安装的YashanDB,本机无法访问
【YashanDB知识库】使用vmware虚拟机安装的YashanDB,本机无法访问
|
12月前
|
数据可视化 大数据 Linux
OpenEuler虚拟机安装保姆级教程 | 附可视化界面
本文介绍了如何在VMware中安装openEuler操作系统,从选择合适的镜像版本下载开始,到创建虚拟机、配置CPU虚拟化、进行系统安装、设置网络连接,直至安装DDE桌面环境实现图形化操作。openEuler是一款由华为开源的操作系统,支持多种处理器架构,广泛应用于数据库、大数据、云计算等领域。文中还分享了安装过程中的注意事项及解决网络问题的方法,适合初次接触openEuler的用户参考学习。
3924 3
OpenEuler虚拟机安装保姆级教程 | 附可视化界面