todaygood / linux-lab

everything kb,case about linux
1 stars 0 forks source link

Failed to start libvirtd service #4

Open todaygood opened 6 years ago

todaygood commented 6 years ago

Issue

服务器正常下电之后,发现libvirtd服务器启动不了。

Sep 19 08:31:35 cloud-sz-kolla-b13-01.sz.cloud.genomics.cn systemd[1]: Starting Virtualization daemon...
Sep 19 08:31:35 cloud-sz-kolla-b13-01.sz.cloud.genomics.cn systemd[1]: Started Virtualization daemon.
Sep 19 08:31:41 cloud-sz-kolla-b13-01.sz.cloud.genomics.cn libvirtd[86299]: 2018-09-19 00:31:41.235+0000: 86339: info : libvirt version: 3.9.0, package: 14.el7_5.5 (CentOS BuildSystem <http://bugs.centos.org>, 2018-05-22-02:42:56, c1bm.rdu2.centos.org)
Sep 19 08:31:41 cloud-sz-kolla-b13-01.sz.cloud.genomics.cn libvirtd[86299]: 2018-09-19 00:31:41.235+0000: 86339: info : hostname: cloud-sz-kolla-b13-01.sz.cloud.genomics.cn
Sep 19 08:31:41 cloud-sz-kolla-b13-01.sz.cloud.genomics.cn libvirtd[86299]: 2018-09-19 00:31:41.235+0000: 86339: error : virGetUserID:1041 : invalid argument: Failed to parse user 'qemu'
Sep 19 08:31:41 cloud-sz-kolla-b13-01.sz.cloud.genomics.cn libvirtd[86299]: 2018-09-19 00:31:41.236+0000: 86339: error : virStateInitialize:775 : Initialization of QEMU state driver failed: invalid argument: Failed to parse user 'qemu'
Sep 19 08:31:41 cloud-sz-kolla-b13-01.sz.cloud.genomics.cn libvirtd[86299]: 2018-09-19 00:31:41.236+0000: 86339: error : daemonRunStateInit:837 : Driver state initialization failed
todaygood commented 6 years ago

编辑/etc/passwd
qemu:x:994:991::/:/sbin/nologin 注意user id 没有使用过,group id 是group libvirt的id

[root@cloud-sz-kolla-b13-01 ~]# id qemu
uid=994(qemu) gid=991(libvirt) groups=991(libvirt),36(kvm)

重启libvirtd服务器,解决。