发起问题
0

cinder在创建虚拟机时报错

提问于 2018-10-06 06:40:18 -0500

adm01 图像
2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume [req-72d85145-6792-42a7-aa8d-f0631f7dd107 e52401a3c57b44f680aabff68c5a943e e5f2845f9b3a4b6e931cd083fac95dd8 - default default] Failed to copy image 723be3c2-541c-4ff9-bc14-a03abc37a4a9 to volume: b2a9d458-ce8d-426f-8c5e-28d8a470c491: ProcessExecutionError: Unexpected error while running command.

2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume Traceback (most recent call last): 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume File "/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py", line 528, in _copy_image_to_volume 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume context, volume, image_service, image_id) 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/remotefs.py", line 444, in copy_image_to_volume 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume run_as_root=self._execute_as_root) 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume File "/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 421, in fetch_to_raw 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume run_as_root=run_as_root) 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume File "/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 505, in fetch_to_volume_format 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume run_as_root=run_as_root) 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume File "/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 284, in convert_image 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume passphrase_file=passphrase_file) 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume File "/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 240, in _convert_image 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume utils.execute(cmd, run_as_root=run_as_root) 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume File "/usr/lib/python2.7/site-packages/cinder/utils.py", line 126, in execute 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume return processutils.execute(cmd, **kwargs) 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume File "/usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py", line 424, in execute 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume cmd=sanitized_cmd) 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume ProcessExecutionError: Unexpected error while running command. 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume Command: qemu-img convert -O raw -f qcow2 /var/lib/cinder/conversion/tmpNlpj3sopenstack-cinder@nfs /var/lib/cinder/mnt/c4634b0491d8c4252d4cd3d8065de876/volume-b2a9d458-ce8d-426f-8c5e-28d8a470c491 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume Exit code: 1 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume Stdout: u'' 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume Stderr: u"qemu-img: Could not open '/var/lib/cinder/mnt/c4634b0491d8c4252d4cd3d8065de876/volume-b2a9d458-ce8d-426f-8c5e-28d8a470c491': Failed to lock byte 100\n" 2018-10-06 19:08:20.098 157070 ERROR cinder.volume.flows.manager.create_volume

edit retag flag offensive close merge delete
0

回答 2019-12-16 20:58:17 -0500

nicholas666 图像

cinder 从镜像创建卷。新把镜像下载到/var/lib/cinder/conversion/ 然后调用qemu-img convert 去转换磁盘格式

qemu-img convert -O raw -f qcow2 /var/lib/cinder/conversion/tmpNlpj3sopenstack-cinder@nfs /var/lib/cinder/mnt/c4634b0491d8c4252d4cd3d8065de876/volume-b2a9d458-ce8d-426f-8c5e-28d8a470c491

日志中出现的这个错误Failed to lock byte 100。是你在使用 NFS or GlusterFS 时qemu的一个错误。 (Qemu Aborted (core dumped) for 'qemu-kvm: Failed to lock byte 100' when remote NFS or GlusterFS volume stopped during the block mirror(or block commit/stream) process) 参考:https://cbs.centos.org/koji/buildinfo?buildID=26484

edit flag offensive delete link 更多

你的回答

Please start posting anonymously - your entry will be published after you log in or create a new account.

开始回答

提问工具

1 follower

统计

已提问: 2018-10-06 06:40:18 -0500

已查看: 274 次

最后更新: Oct 06 '18