创建实例失败,查看compute.log,如下异常:
libvirtError: internal error Process exited while reading console log output: chardev: opening backend "file" failed
ERROR nova.compute.manager [req-14367115-a9db-49d9-a4b6-f0aa2b10b126 264de00cea3348cda1b968f31b369e92 ac0da7079c8d4bc2b95009175b21fa66] [instance: 3f5ba1a1-c64c-4d18-8c52-3efb5f162ba0] Build error: ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 494, in _run_instance\n injected_files, admin_password)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 747, in _spawn\n block_device_info)\n', ' File "/usr/lib/python2.6/site-packages/nova/exception.py", line 117, in wrapped\n temp_level, payload)\n', ' File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__\n self.gen.next()\n', ' File "/usr/lib/python2.6/site-packages/nova/exception.py", line 92, in wrapped\n return f(*args, **kw)\n', ' File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 1092, in spawn\n block_device_info)\n', ' File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 1931, in _create_domain_and_network\n domain = self._create_domain(xml)\n', ' File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 1910, in _create_domain\n domain.createWithFlags(launch_flags)\n', ' File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 187, in doit\n result = proxy_call(self._autowrap, f, *args, **kwargs)\n', ' File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 147, in proxy_call\n rv = execute(f,*args,**kwargs)\n', ' File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 76, in tworker\n rv = meth(*args,**kwargs)\n', ' File "/usr/lib64/python2.6/site-packages/libvirt.py", line 708, in createWithFlags\n if ret == -1: raise libvirtError (\'virDomainCreateWithFlags() failed\', dom=self)\n', 'libvirtError: internal error Process exited while reading console log output: chardev: opening backend "file" failed\n\n']
异常显示libvirt无法读取console.log(/var/lib/nova/INSTANCE/compute.log)文件,修改/etc/libvirt/qemu.conf,注释
#
user = "root"
#group = "root"
#dynamic_ownership = 1
然后重启libvirt,/etc/init.d/libvirtd restart
文件本事是注释掉的,是我在群里问其他问题时,别人建议我去掉注释的,以后问问题要想为什么