【问题描述】

创建boot_from_volume的虚机时,磁盘后端为NFS,创建失败。

【错误日志】

nova-compute模块

Could not open '/var/lib/nova/mnt/b4a8885bf81bd517182c73c35df4496d/volume-598ddf2f-94c6-495d-b57b-20ebf2c337a8': Permission denied

: libvirtError: internal error: process exited while connecting to monitor: 2019-08-26T06:33:56.800031Z qemu-kvm: -drive file=/var/lib/nova/mnt/b4a8885bf81bd517182c73c35df4496d/volume-598ddf2f-94c6-495d-b57b-20ebf2c337a8,format=raw,if=none,id=drive-virtio-disk0,serial=598ddf2f-94c6-495d-b57b-20ebf2c337a8,cache=none,aio=native: Could not open '/var/lib/nova/mnt/b4a8885bf81bd517182c73c35df4496d/volume-598ddf2f-94c6-495d-b57b-20ebf2c337a8': Permission denied

2019-08-26 14:33:57.414 32 ERROR nova.virt.libvirt.driver [req-1e4be617-e159-4143-b925-00c52ea8ee05 f100901926164d48a913314f2776dfb4 e5debbe49ff24cd68f9a35cc2a934beb - default default] [instance: d512503a-467b-4992-8c51-19de191e131b] Failed to start libvirt guest: libvirtError: internal error: process exited while connecting to monitor: 2019-08-26T06:33:56.800031Z qemu-kvm: -drive file=/var/lib/nova/mnt/b4a8885bf81bd517182c73c35df4496d/volume-598ddf2f-94c6-495d-b57b-20ebf2c337a8,format=raw,if=none,id=drive-virtio-disk0,serial=598ddf2f-94c6-495d-b57b-20ebf2c337a8,cache=none,aio=native: Could not open '/var/lib/nova/mnt/b4a8885bf81bd517182c73c35df4496d/volume-598ddf2f-94c6-495d-b57b-20ebf2c337a8': Permission denied

2019-08-26 14:33:57.613 32 WARNING nova.compute.manager [req-dff6b914-4398-4a3f-876d-22a2972a1158 9e49905829cf4f72aa143aa5417c0e91 e49b1ca2e06c4aae87cbc70b6782d86a - default default] [instance: d512503a-467b-4992-8c51-19de191e131b] Received unexpected event network-vif-plugged-4aead7f4-3d5d-41bd-bd96-524219c69b5a for instance with vm_state building and task_state spawning.

2019-08-26 14:33:58.276 32 INFO os_vif [req-1e4be617-e159-4143-b925-00c52ea8ee05 f100901926164d48a913314f2776dfb4 e5debbe49ff24cd68f9a35cc2a934beb - default default] Successfully unplugged vif VIFBridge(active=False,address=fa:16:3e:a8:05:ba,bridge_name='qbr4aead7f4-3d',has_traffic_filtering=True,id=4aead7f4-3d5d-41bd-bd96-524219c69b5a,network=Network(8ff093db-c8fb-4909-9ecb-95291fcfccd1),plugin='ovs',port_profile=VIFPortProfileOpenVSwitch,preserve_on_delete=False,vif_name='tap4aead7f4-3d')

2019-08-26 14:33:59.069 32 INFO nova.virt.libvirt.driver [req-1e4be617-e159-4143-b925-00c52ea8ee05 f100901926164d48a913314f2776dfb4 e5debbe49ff24cd68f9a35cc2a934beb - default default] [instance: d512503a-467b-4992-8c51-19de191e131b] Deleting instance files /var/lib/kolla/volumes/nova/d512503a-467b-4992-8c51-19de191e131b_del

2019-08-26 14:33:59.070 32 INFO nova.virt.libvirt.driver [req-1e4be617-e159-4143-b925-00c52ea8ee05 f100901926164d48a913314f2776dfb4 e5debbe49ff24cd68f9a35cc2a934beb - default default] [instance: d512503a-467b-4992-8c51-19de191e131b] Deletion of /var/lib/kolla/volumes/nova/d512503a-467b-4992-8c51-19de191e131b_del complete

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [req-1e4be617-e159-4143-b925-00c52ea8ee05 f100901926164d48a913314f2776dfb4 e5debbe49ff24cd68f9a35cc2a934beb - default default] [instance: d512503a-467b-4992-8c51-19de191e131b] Instance failed to spawn: libvirtError: internal error: process exited while connecting to monitor: 2019-08-26T06:33:56.800031Z qemu-kvm: -drive file=/var/lib/nova/mnt/b4a8885bf81bd517182c73c35df4496d/volume-598ddf2f-94c6-495d-b57b-20ebf2c337a8,format=raw,if=none,id=drive-virtio-disk0,serial=598ddf2f-94c6-495d-b57b-20ebf2c337a8,cache=none,aio=native: Could not open '/var/lib/nova/mnt/b4a8885bf81bd517182c73c35df4496d/volume-598ddf2f-94c6-495d-b57b-20ebf2c337a8': Permission denied

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] Traceback (most recent call last):

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2296, in _build_resources

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] yield resources

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2111, in _build_and_run_instance

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] block_device_info=block_device_info)

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 2965, in spawn

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] destroy_disks_on_failure=True)

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5516, in _create_domain_and_network

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] destroy_disks_on_failure)

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] self.force_reraise()

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] six.reraise(self.type_, self.value, self.tb)

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5486, in _create_domain_and_network

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] post_xml_callback=post_xml_callback)

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5404, in _create_domain

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] guest.launch(pause=pause)

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/guest.py", line 144, in launch

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] self._encoded_xml, errors='ignore')

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] self.force_reraise()

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] six.reraise(self.type_, self.value, self.tb)

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/guest.py", line 139, in launch

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] return self._domain.createWithFlags(flags)

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 186, in doit

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] result = proxy_call(self._autowrap, f, *args, **kwargs)

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 144, in proxy_call

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] rv = execute(f, *args, **kwargs)

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 125, in execute

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] six.reraise(c, e, tb)

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 83, in tworker

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] rv = meth(*args, **kwargs)

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1099, in createWithFlags

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed', dom=self)

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b] libvirtError: internal error: process exited while connecting to monitor: 2019-08-26T06:33:56.800031Z qemu-kvm: -drive file=/var/lib/nova/mnt/b4a8885bf81bd517182c73c35df4496d/volume-598ddf2f-94c6-495d-b57b-20ebf2c337a8,format=raw,if=none,id=drive-virtio-disk0,serial=598ddf2f-94c6-495d-b57b-20ebf2c337a8,cache=none,aio=native: Could not open '/var/lib/nova/mnt/b4a8885bf81bd517182c73c35df4496d/volume-598ddf2f-94c6-495d-b57b-20ebf2c337a8': Permission denied

2019-08-26 14:33:59.256 32 ERROR nova.compute.manager [instance: d512503a-467b-4992-8c51-19de191e131b]

2019-08-26 14:33:59.269 32 INFO nova.compute.manager [req-1e4be617-e159-4143-b925-00c52ea8ee05 f100901926164d48a913314f2776dfb4 e5debbe49ff24cd68f9a35cc2a934beb - default default] [instance: d512503a-467b-4992-8c51-19de191e131b] Terminating instance

【定位原因】

由于使用了K8S,nova-compute这个pod是使用root用户启动的,但是在使用libvirt调用某些接口的时候,默认使用了nova用户。

/var/lib/nova/mnt/文件夹的属主为root,其他用户无写权限,nova用户写失败,导致创建虚机失败。

【修改方法】

修改/var/lib/nova/mnt/文件夹的属主为nova,或者给nova用户赋权即可解决。

(已解决)Could not open '/var/lib/nova/mnt/*/volume-*': Permission denied的更多相关文章

  1. docker dial unix /var/run/docker.sock: connect: permission denied

    Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker. ...

  2. Ubuntu16.04系统下 解决“无法获得锁 /var/lib/dpkg/lock -open (11:资源暂时不可用)、无法锁定管理目录(/var/lib/dpkg/),是否有其他进程正占用它?”的方法

    在Ubuntu16.04下安装软件,例如:sudo apt-get install lrzsz时提示: 无法获得锁 /var/lib/dpkg/lock - open (11: 资源暂时不可用) 无法 ...

  3. ubuntu 解决“无法获得锁 /var/lib/dpkg/lock -open (11:资源暂时不可用)”的方法

    原文链接:https://www.cnblogs.com/kaid/p/8616385.html 在ubuntu系统的termial下,用apt-get install 安装软件的时候,如果在未完成下 ...

  4. ubuntu 解决“无法获得锁 /var/lib/dpkg/lock -open”的方法

      在ubuntu系统终端下,用apt-get install 安装软件的时候,如果在未完成下载的情况下将终端中断,此时 apt-get进程可能没有结束.结果,如果再次运行apt-get instal ...

  5. 【转】ubunt 安装 yum出现 ubuntu 解决“无法获得锁 /var/lib/dpkg/lock -open (11:资源暂时不可用)”的方法

    今天本来是用xshell 链接本地的linux的,然而链接的时候没有主动弹出输入 用户名和密码的对话框,google搜了下,遇到了上面的问题. 解决办法如下:1.终端输入 ps  aux ,列出进程. ...

  6. zzw原创_解决Could not chdir to home directory /test/bdctool: Permission denied一例

    1.用命令新建一用户 adduser -d /test/bdctool  -m bdctool 2.用新用户登录,报错:Could not chdir to home directory /test/ ...

  7. 解决使用Qt creator时出现Cannot overwrite file ..Permission denied

    前两天在linux下使用Qt creator, 切换到了管理员使用了Qt creator后,再切换为普通用户,发现出现了 Cannot overwrite file ..Permission deni ...

  8. qemu-img convert -c disk /var/lib/nova/instances/_base/94a107318b54108fc8e76fff21a86d7c390a20bf -O qcow2 hebin.qcow2

  9. 解决Ubuntu的root账号无法登录SSH问题-Permission denied, please try again.

    http://www.cnblogs.com/yixius/articles/6971054.html

随机推荐

  1. 配置并访问NFS共享

    NFS服务器 192.168.2.5 NFS客户机 192.168.2.100 软件包nfs-utils用来提供NFS共享服务及相关工具,而软件包rpcbind用来提供RPC协议的支持 服务器 修改/ ...

  2. DOM 事件流与事件处理程序

    ㈠事件流 ▶事件:是文档和浏览器窗口中发生的,特定的交互瞬间. ▶事件流:描述的是从页面中接受事件的顺序   ⑴DOM事件冒泡 定义:事件最开始由最具体的元素(文档中嵌套层次最深的那个节点)接受,然后 ...

  3. mysql优化(下)

    优化SQL语句:(1)不要使用   select  *(2)尽量在where字段上添加索引:(3)模糊查询中%前置不能使用索引,比如  like ‘%a’;(4)使用or语句时,两侧语句都有索引时才使 ...

  4. ckeditor+粘贴word

    最近公司做项目需要实现一个功能,在网页富文本编辑器中实现粘贴Word图文的功能. 我们在网站中使用的Web编辑器比较多,都是根据用户需求来选择的.目前还没有固定哪一个编辑器 有时候用的是UEditor ...

  5. FZU - 2103 Bin & Jing in wonderland

    FZU - 2103 Bin & Jing in wonderland 题目大意:有n个礼物,每次得到第i个礼物的概率是p[i],一个人一共得到了k个礼物,然后按编号排序后挑选出r个编号最大的 ...

  6. Open_Read_Write函数基本使用

    先来一个小插曲,我们知道read函数等是系统调用函数,应该在第二页的手册里头,可是我man 2 read的时候却找不到,由此到/usr/sharead/man/man2目录下查看的时候发现此目录为空, ...

  7. Java线程之Timer

    简述 java.util.Timer是一个定时器,用来调度线程在某个时间执行.在初始化Timer时,开启一个线程循环提取TaskQueue任务数组中的任务, 如果任务数组为空,线程等待直到添加任务: ...

  8. SQL事务回滚

    BEGIN TRAN标记事务开始 COMMIT TRAN 提交事务 一般把DML语句(select ,delete,update,insert语句)放在BEGIN TRAN...COMMIT TRAN ...

  9. JavaWeb_(Hibernate框架)Hibernate中事务

    Hibernate中事务 事务的性质 事物的隔离级别 配置事务的隔离级别 事务的性质 原子性:原子,不可再分,一个操作不能分为更小的操作,要么全都执行,要么全不执行. 一致性:事务在完成时,必须使得所 ...

  10. gitk、Git GUI 图形化工具中文显示乱码的解决方案

    在Windows下使用gitk.Git-Gui时,可能会出现代码中的中文乱码的情况.解决方法:在软件的安装目录下,在Git\mingw64\etc\gitconfig文件末尾添加: [gui]enco ...