查看nova-compute日志出现如下报错:
qemu-img: Could not open \'/var/lib/nova/instances/13cf63f7-bab8-4a31-990d-046120802e1f/disk\': Failed to get shared "write" lock\nIs another process using the image?\n'
解决方法:
由于是用的容器环境部署,网上说的那种安装、卸载qemu-img的方法不可用,只能通过该python脚本的方式来实现。
docker exec -it -uroot nova_compute bash
vi /usr/lib/python2.7/site-packages/nova/virt/images.py
cmd = ('env', 'LC_ALL=C', 'LANG=C', 'qemu-img', 'info', '-U', path)
添加’-U’参数,保存重启容器