kvm虚拟机迁移到openstack环境,提示InvalidDiskInfo Disk info file is invalid qemu-img fai
问题描述在把kvm虚拟机的disk文件迁移到openstack环境后,重启提示错误无法启动。问题log2019-11-07 15:36:51.177 25109 ERROR nova.compute.manager2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager [req-72afe4de-d806-4934-8548-a7...
·
问题描述
在把kvm虚拟机的disk文件迁移到openstack环境后,重启提示错误无法启动。
问题log
2019-11-07 15:36:51.177 25109 ERROR nova.compute.manager
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager [req-72afe4de-d806-4934-8548-a74a2d623f7e - - - - -] Error updating resources for node ostack-228-19.: InvalidDiskInfo: Disk info file is invalid: qemu-img failed to execute on /data/nova/instances/d3c0e570-d6c0-46fd-b1b5-c3a7f55a2c5e/disk : Unexpected error while running command.
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager Traceback (most recent call last):
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 7540, in update_available_resource_for_node
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager rt.update_available_resource(context, nodename)
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 690, in update_available_resource
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager resources = self.driver.get_available_resource(nodename)
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 6477, in get_available_resource
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager disk_over_committed = self._get_disk_over_committed_size_total()
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 8001, in _get_disk_over_committed_size_total
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager config, block_device_info)
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 7903, in _get_instance_disk_info_from_config
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager qemu_img_info = disk_api.get_disk_info(path)
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/virt/disk/api.py", line 136, in get_disk_info
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager return images.qemu_img_info(path)
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/virt/images.py", line 87, in qemu_img_info
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager raise exception.InvalidDiskInfo(reason=msg)
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager InvalidDiskInfo: Disk info file is invalid: qemu-img failed to execute on /data/nova/instances/d3c0e570-d6c0-46fd-b1b5-c3a7f55a2c5e/disk : Unexpected error while running command.
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager Command: /usr/bin/python2 -m oslo_concurrency.prlimit --as=1073741824 --cpu=30 -- env LC_ALL=C LANG=C qemu-img info /data/nova/instances/d3c0e570-d6c0-46fd-b1b5-c3a7f55a2c5e/disk --force-share
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager Exit code: 1
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager Stdout: u''
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager Stderr: u"qemu-img: Could not open '/data/nova/instances/d3c0e570-d6c0-46fd-b1b5-c3a7f55a2c5e/disk': Could not open '/data/nova/instances/d3c0e570-d6c0-46fd-b1b5-c3a7f55a2c5e/disk': Permission denied\n"
2019-11-07 15:37:53.180 25109 ERROR nova.compute.manager
问题分析
日志中我们清晰的看到,有权限不容许的报错
处理方法
把disk文件的所属权设置为nova
chown nova:nova disk
更多推荐
已为社区贡献3条内容
所有评论(0)