当前位置: > 虚拟化 Virtualization > oVirt >

oVirt虚拟机启动报sanlock错误

时间:2019-11-21 11:14来源:linux.it.net.cn 作者:IT
现象:

  虚拟机使用了一段时间,虚拟机关机,然后再开机出现错误;

后台日志:

Thread-570342::ERROR::2018-02-05 15:31:17,944::vm::761::virt.vm::(_startUnderlyingVm) vmId=`18988d57-d0d3-4ff5-9e3a-146f2de4b6f2`::The vm start process failed
Traceback (most recent call last):
  File "/usr/share/vdsm/virt/vm.py", line 705, in _startUnderlyingVm
    self._run()
  File "/usr/share/vdsm/virt/vm.py", line 1944, in _run
    self._connection.createXML(domxml, flags),
  File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 124, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 1313, in wrapper
    return func(inst, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3611, in createXML
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: 内部错误:Process exited prior to exec: libvirt: Lock Driver 错误 : 为 sanlock 守护进程打开插槽失败: 拒绝连接

Thread-570342::INFO::2018-02-05 15:31:17,947::vm::1332::virt.vm::(setDownStatus) vmId=`18988d57-d0d3-4ff5-9e3a-146f2de4b6f2`::Changed state to Down: 内部错误:Process exited prior to exec: libvirt: Lock Driver >错误 : 为 sanlock 守护进程打开插槽失败: 拒绝连接 (code=1)
sanlock.log
2018-02-05 15:37:59+0800 6554608 [135834]: sanlock daemon started 3.2.4 host 3c4a8445-6b22-42df-9b06-91d9774dae1d.host01
2018-02-05 15:37:59+0800 6554608 [135834]: set scheduler RR|RESET_ON_FORK priority 99 failed: Operation not permitted

解决方案:

  重新启动libvirtd服务,因为libvirt里面使用了sanlock。

问题排查:

  sanlock里面的错误,sched_setscheduler(2)引起了sanlock没有实时调度,当机器出现高负载IO的时候时得sanlock丢失了它的deadlines


(责任编辑:IT)
------分隔线----------------------------