重庆思庄Oracle、Redhat认证学习论坛

标题: openstack nova-compute 无法启动,报Nova requires QEMU version 2.1.0 [打印本页]

作者: 郑全    时间: 2017-10-31 22:17
标题: openstack nova-compute 无法启动,报Nova requires QEMU version 2.1.0
openstack Pike for Centos7.4




环境:
CentOS7.4
openstack pike










错误1:Nova节点无法启动
[root@controller ~]# openstack compute service list
+----+------------------+------------+----------+---------+-------+----------------------------+
| ID | Binary           | Host       | Zone     | Status  | State | Updated At                 |
+----+------------------+------------+----------+---------+-------+----------------------------+
|  1 | nova-consoleauth | controller | internal | enabled | up    | 2017-10-31T11:23:02.000000 |
|  6 | nova-conductor   | controller | internal | enabled | up    | 2017-10-31T11:23:11.000000 |
|  7 | nova-console     | controller | internal | enabled | up    | 2017-10-31T11:23:02.000000 |
|  8 | nova-compute     | controller | nova     | enabled | down  | 2017-10-29T09:39:52.000000 |
|  9 | nova-scheduler   | controller | internal | enabled | up    | 2017-10-31T11:23:12.000000 |
+----+------------------+------------+----------+---------+-------+----------------------------+


察看日志:/var/log/nova/nova-compute,发现以下错误:


ERROR oslo_service.service InternalError: Nova requires QEMU version 2.1.0 or greater

解决:

错误报的很明显,qemu版本必须>=2.1.0,但centos7.4默认的qemu版本为2.0.0,所以必须升级qemu

https://wiki.qemu.org/Hosts/Linux

1.安装

yum -y install gcc gcc-c++ automake libtool bzip2-devel libuuid-devel spice-protocol spice-server-devel usbredir-devel bison flex libaio-devel libcap-devel libiscsi-devel
可选yum -y install git glib2-devel libfdt-devel pixman-devel zlib-devel
wget https://download.qemu.org/qemu-2.10.1.tar.xz
tar xvJf qemu-2.10.1.tar.xz
cd qemu-2.10.1
./configure --enable-usb-redir --enable-libusb --enable-spice --enable-kvm --enable-bzip2 --prefix=/opt/qemu --enable-linux-aio --enable-system --target-list=x86_64-softmmu,x86_64-linux-user
make -j4 && make install
2.备份原始qemu
mv -f /usr/libexec/qemu-kvm{,.bak}
mv -f /usr/bin/qemu-img{,.bak}
mv -f /usr/bin/qemu-io{,.bak}
mv -f /usr/bin/qemu-nbd{,.bak}
3.建软链
ln -s /opt/qemu/bin/qemu-system-x86_64 /usr/libexec/qemu-kvm
ln -s /opt/qemu/bin/qemu-img /usr/bin/
ln -s /opt/qemu/bin/qemu-io /usr/bin/
ln -s /opt/qemu/bin/qemu-nbd /usr/bin/
ln -s /opt/qemu/bin/qemu-system-x86_64 /usr/bin/qemu-system-x86_64
ln -s /opt/qemu/bin/qemu-x86_64 /usr/bin/qemu-x86_64

4.重启nova-compute
systemctl restart openstack-nova-compute

[root@controller bin]# systemctl status openstack-nova-compute
● openstack-nova-compute.service - OpenStack Nova Compute Server
   Loaded: loaded (/usr/lib/systemd/system/openstack-nova-compute.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2017-10-31 08:42:23 EDT; 1s ago
Main PID: 63979 (nova-compute)
   CGroup: /system.slice/openstack-nova-compute.service
           └─63979 /usr/bin/python2 /usr/bin/nova-compute
Oct 31 08:42:18 controller systemd[1]: Starting OpenStack Nova Compute Server...
Oct 31 08:42:23 controller systemd[1]: Started OpenStack Nova Compute Server.


[root@controller bin]# openstack compute service list
+----+------------------+------------+----------+---------+-------+----------------------------+
| ID | Binary           | Host       | Zone     | Status  | State | Updated At                 |
+----+------------------+------------+----------+---------+-------+----------------------------+
|  1 | nova-consoleauth | controller | internal | enabled | up    | 2017-10-31T12:43:11.000000 |
|  6 | nova-conductor   | controller | internal | enabled | up    | 2017-10-31T12:43:11.000000 |
|  7 | nova-console     | controller | internal | enabled | up    | 2017-10-31T12:43:02.000000 |
|  8 | nova-compute     | controller | nova     | enabled | up    | 2017-10-31T12:43:07.000000 |
|  9 | nova-scheduler   | controller | internal | enabled | up    | 2017-10-31T12:43:02.000000 |
+----+------------------+------------+----------+---------+-------+----------------------------+

通过以上处理后,问题解决.






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2