建议使用以下浏览器,以获得最佳体验。 IE 9.0+以上版本 Chrome 31+ 谷歌浏览器 Firefox 30+ 火狐浏览器
请选择 进入手机版 | 继续访问电脑版
设置昵称

在此一键设置昵称,即可参与社区互动!

确定
我再想想
选择版块
标签
您还可以添加5个标签
  • 没有搜索到和“关键字”相关的标签
  • 云产品
  • 解决方案
  • 技术领域
  • 通用技术
  • 平台功能
取消

yiran_zhou

发帖: 2粉丝: 1

发消息 + 关注

发表于2020年10月20日 15:09:19 537 4
直达本楼层的链接
楼主
显示全部楼层
[问题求助] 运行中的虚拟机被暂停

【功能模块】


【操作步骤&问题现象】

1、创建虚拟机,并将虚拟机开机

2、虚拟机正常试用

3、虚拟机被置为暂停状态,且无法恢复,恢复时报错为:"internal error: unable to execute QEMU command 'cont': Resetting the Virtual Machine is required"

4、查看qemu 日志,发现错误 "error: kvm run failed Bad address" 

5、查看系统日志,发现存在kvm 异常 "kernel: kvm[50057]: Unexpected L2 read permission error"

6、此时只能通过 virsh destroy 将虚拟机杀掉,并重新创建,虚拟机可恢复运行。



【环境信息】

OS: CentOS 7.6

kernel: kernel-4.14.0-115.el7a.0.1.aarch64

libvirt: 4.5.0-33.el7_8.1.aarch64

qemu: 2.12.0-44.1.el7_8.1.aarch64


虚拟机配置:

<domain type='kvm' id='49'>

  <name>c9df1828-9833-4a63-9a06-de0e38a5be07</name>

  <uuid>c03b1be8-6427-4402-a116-ff5be1082ec1</uuid>

  <maxMemory slots='255' unit='KiB'>4194304000</maxMemory>

  <memory unit='KiB'>4194304</memory>

  <currentMemory unit='KiB'>4194304</currentMemory>

  <vcpu placement='static' current='4'>96</vcpu>

  <resource>

    <partition>/machine</partition>

  </resource>

  <os>

    <type arch='aarch64' machine='virt-rhel7.6.0'>hvm</type>

    <loader readonly='yes' type='pflash'>/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw</loader>

    <nvram>/var/lib/libvirt/qemu/nvram/c9df1828-9833-4a63-9a06-de0e38a5be07_VARS.fd</nvram>

    <bootmenu enable='yes'/>

  </os>

  <features>

    <acpi/>

    <apic/>

    <pae/>

    <gic version='3'/>

  </features>

  <cpu mode='host-passthrough' check='none'>

    <topology sockets='24' cores='4' threads='1'/>

    <numa>

      <cell id='0' cpus='0-95' memory='4194304' unit='KiB'/>

    </numa>

  </cpu>

  <clock offset='utc'/>

  <on_poweroff>destroy</on_poweroff>

  <on_reboot>restart</on_reboot>

  <on_crash>restart</on_crash>

  <devices>

    <emulator>/usr/libexec/qemu-kvm</emulator>

    <disk type='network' device='disk'>

      <driver name='qemu' type='raw' cache='none' io='native'/>

      <source protocol='iscsi' name='iqn.2016-02.com.smartx:system:zbs-iscsi-datastore-1597224703931c/227'>

        <host name='127.0.0.1' port='3260'/>

      </source>

      <target dev='vda' bus='virtio'/>

      <iotune>

        <group_name></group_name>

      </iotune>

      <serial>239b8561-eb59-4ac8-b575-0386c1c31a22</serial>

      <boot order='1'/>

      <alias name='virtio-disk0'/>

      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>

    </disk>

    <disk type='file' device='cdrom'>

      <driver name='qemu' type='raw'/>

      <source file='/usr/share/smartx/images/03750025-7ad4-4a6a-a96b-31b0b6baa552'/>

      <backingStore/>

      <target dev='sda' bus='scsi'/>

      <readonly/>

      <boot order='2'/>

      <alias name='scsi0-0-0-0'/>

      <address type='drive' controller='0' bus='0' target='0' unit='0'/>

    </disk>

    <controller type='virtio-serial' index='0' ports='2'>

      <alias name='virtio-serial0'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>

    </controller>

    <controller type='pci' index='0' model='pcie-root'>

      <alias name='pcie.0'/>

    </controller>

    <controller type='pci' index='1' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='1' port='0x8'/>

      <alias name='pci.1'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>

    </controller>

    <controller type='pci' index='2' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='2' port='0x9'/>

      <alias name='pci.2'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>

    </controller>

    <controller type='pci' index='3' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='3' port='0xa'/>

      <alias name='pci.3'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>

    </controller>

    <controller type='pci' index='4' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='4' port='0xb'/>

      <alias name='pci.4'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>

    </controller>

    <controller type='pci' index='5' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='5' port='0xc'/>

      <alias name='pci.5'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>

    </controller>

    <controller type='pci' index='6' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='6' port='0xd'/>

      <alias name='pci.6'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>

    </controller>

    <controller type='pci' index='7' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='7' port='0xe'/>

      <alias name='pci.7'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>

    </controller>

    <controller type='pci' index='8' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='8' port='0xf'/>

      <alias name='pci.8'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/>

    </controller>

    <controller type='pci' index='9' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='9' port='0x18'/>

      <alias name='pci.9'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>

    </controller>

    <controller type='pci' index='10' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='10' port='0x19'/>

      <alias name='pci.10'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>

    </controller>

    <controller type='pci' index='11' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='11' port='0x1a'/>

      <alias name='pci.11'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>

    </controller>

    <controller type='pci' index='12' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='12' port='0x1b'/>

      <alias name='pci.12'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>

    </controller>

    <controller type='pci' index='13' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='13' port='0x1c'/>

      <alias name='pci.13'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>

    </controller>

    <controller type='pci' index='14' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='14' port='0x1d'/>

      <alias name='pci.14'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>

    </controller>

    <controller type='pci' index='15' model='pcie-root-port'>

      <model name='pcie-root-port'/>

      <target chassis='15' port='0x1e'/>

      <alias name='pci.15'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x6'/>

    </controller>

    <controller type='usb' index='0' model='qemu-xhci' ports='8'>

      <alias name='usb'/>

      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>

    </controller>

    <controller type='scsi' index='0' model='virtio-scsi'>

      <alias name='scsi0'/>

      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>

    </controller>

    <interface type='bridge'>

      <mac address='52:54:00:22:72:2c'/>

      <source bridge='ovsbr-mgt'/>

      <vlan>

        <tag id='65'/>

      </vlan>

      <virtualport type='openvswitch'>

        <parameters interfaceid='f04e9439-53aa-4e75-b778-f5bb51263d74'/>

      </virtualport>

      <target dev='vnet0'/>

      <model type='virtio'/>

      <link state='up'/>

      <alias name='net0'/>

      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>

    </interface>

    <serial type='pty'>

      <source path='/dev/pts/8'/>

      <target type='system-serial' port='1'>

        <model name='pl011'/>

      </target>

      <alias name='serial0'/>

    </serial>

    <serial type='file'>

      <source path='/usr/share/smartx/vm/serial/c9df1828-9833-4a63-9a06-de0e38a5be07.log'/>

      <target type='system-serial' port='0'>

        <model name='pl011'/>

      </target>

      <alias name='serial1'/>

    </serial>

    <console type='pty'>

      <source path='/dev/pts/8'/>

      <target type='serial' port='1'/>

      <alias name='serial0'/>

    </console>

    <channel type='unix'>

      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-49-c9df1828-9833-4a63-9/org.qemu.guest_agent.0'/>

      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>

      <alias name='channel0'/>

      <address type='virtio-serial' controller='0' bus='0' port='1'/>

    </channel>

    <input type='mouse' bus='usb'>

      <alias name='input0'/>

      <address type='usb' bus='0' port='1'/>

    </input>

    <input type='keyboard' bus='usb'>

      <alias name='input1'/>

      <address type='usb' bus='0' port='2'/>

    </input>

    <input type='tablet' bus='usb'>

      <alias name='input2'/>

      <address type='usb' bus='0' port='3'/>

    </input>

    <graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'>

      <listen type='address' address='127.0.0.1'/>

    </graphics>

    <video>

      <model type='virtio' heads='1' primary='yes'/>

      <alias name='video0'/>

      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>

    </video>

    <memballoon model='virtio'>

      <stats period='10'/>

      <alias name='balloon0'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>

    </memballoon>

  </devices>

  <seclabel type='dynamic' model='dac' relabel='yes'>

    <label>+107:+107</label>

    <imagelabel>+107:+107</imagelabel>

  </seclabel>

</domain>


【截图信息】

image.png

image.png


【日志信息】(可选,上传日志内容或者附件)


举报
分享

分享文章到朋友圈

分享文章到微博
发表于2020年10月20日 15:41:22
直达本楼层的链接
沙发
显示全部楼层

可以查看虚拟机的memory和hugetlb分组是否设置了内存上限,如果有取消设置上限

评论
yiran_zhou 2020-10-20 19:38 评论

没有设置相关的内存上限,请问还有什么方向么?

... 查看全部
点赞 评论 引用 举报
发表于2020年10月20日 15:42:49
直达本楼层的链接
板凳
显示全部楼层

将qemu用于的权限设置为root再试下看看

评论
yiran_zhou 2020-10-20 19:34 评论

这里没有理解,能具体一些么? 因为这个错误复现周期非常长(>30天),所以感觉不会是用户权限的问题?

... 查看全部
点赞 评论 引用 举报
发表于2020年10月20日 15:57:53
直达本楼层的链接
地板
显示全部楼层

另外,用的什么系统安装的QEMU-KVM,QEMU-KVM版本用的是系统默认的还是其他版本

评论
yiran_zhou 2020-10-20 19:33 评论

在帖子中有贴详细的信息,这个配置是鲲鹏虚拟化配置中推荐的版本。 【环境信息】 OS: CentOS 7.6 kernel: kernel-4.14.0-115.el7a.0.1.aarch64 libvirt: 4.5.0-33.el7_8.1.aarch64 qemu: 2.12.0-44.1.el7_8.1.aarch64

... 查看全部
点赞 评论 引用 举报
更新于2021年01月21日 11:07:59
直达本楼层的链接
5#
显示全部楼层

该问题已解决,是由Linux低版本内核bug引入,虚机在做内存申请时会产生缺页中断,物理机的KVM模块会对缺页中断过程中的esr_el2寄存器值做判断。判断到EC=0x20、FSC=0xF的情况,会认为无法处理,申请失败。但是其中S1PTW=1的场景不应当直接返回失败,这就触发了虚机hang死。4.19以上版本内核已合入补丁


具体参考论坛发帖:

https://bbs.huaweicloud.com/forum/thread-102720-1-1.html

点赞 评论 引用 举报

游客

富文本
Markdown
您需要登录后才可以回帖 登录 | 立即注册