无法完成安装:'Cannot access storage file '/
2024-09-02 18:39:14
今天自己编译了spice-protocol spice-gtk spice qemu,然后想用virsh去创建一个虚机:
# virsh define demo.xml
定义域 demo(从 demo.xml)
# virsh start demo
cannot access storage file (as uid:107, gid:107) permission denied
解决方法:
Changing /etc/libvirt/qemu.conf
make working things.
Uncomment user/group to work as root
.
- # The user for QEMU processes run by the system instance. It can be
- # specified as a user name or as a user id. The qemu driver will try to
- # parse this value first as a name and then, if the name doesn't exist,
- # as a user id.
- #
- # Since a sequence of digits is a valid user name, a leading plus sign
- # can be used to ensure that a user id will not be interpreted as a user
- # name.
- #
- # Some examples of valid values are:
- #
- # user = "qemu" # A user named "qemu"
- # user = "+0" # Super user (uid=0)
- # user = "100" # A user named "100" or a user with uid=100
- #
- user = "root"
- # The group for QEMU processes run by the system instance. It can be
- # specified in a similar way to user.
- group = "root"
- # Whether libvirt should dynamically change file ownership
- # to match the configured user/group above. Defaults to 1.
- # Set to 0 to disable file ownership changes.
- #dynamic_ownership = 1
文章
cat /etc/passwd
qemu:x:107:107:qemu user:/:/sbin/nologin
ll /root/x.qcow2
-rwxrwxrwx 1 qemu qemu 1957691392 Dec 1 14:16 /root/x.qcow2
在各种权限都对的情况下,依然不能create
sed -i 's/#vnc_listen = "0.0.0.0"/vnc_listen = "0.0.0.0"/g' /etc/libvirt/qemu.conf
sed -i 's/#group = "root"/group = "root"/g' /etc/libvirt/qemu.conf
sed -i 's/#user = "root"/user = "root"/g' /etc/libvirt/qemu.conf
service libvirtd restart
UUID=0654F28654F277AF /media/h1/newsntfs ntfs defaults,nls=utf8,umask=111,uid=0,gid=0,dmask=000,fmask=000 0 0
最新文章
- Mysql数据库的基本概念和架构
- clip:rect矩形剪裁
- 简单看看这两个类 String和StringBuilder
- 安装mssql2008和启动时出现的问题及解决办法
- Java 调用 Javascript 函数的范例
- linux IO 内核参数调优 之 原理和参数介绍
- BAK文件怎么恢复到数据库中
- iOS 将系统文字设置为中文
- 修改tomcat编码方式
- Codeforces 1155F Delivery Oligopoly dp(看题解)
- [Swift]LeetCode315. 计算右侧小于当前元素的个数 | Count of Smaller Numbers After Self
- UNDO -- Concept
- LNMP环境
- Android 获取Activity当前view
- JavaWeb下载文件response
- web端ip定位
- SQL语句实现不存在即插入,存在则increase某字段的功能insert into … on duplicate key update
- matlab图像
- java之继承中的构造方法
- PC环境搭建——虚拟机配置双网卡
热门文章
- [Usaco2009 MAR] Earthquake Damage 2
- 520. Detect Capital(检测数组的大小写)
- bzoj 1499: [NOI2005]瑰丽华尔兹【dp+单调队列】
- SQL 初级教程学习(六)
- [POJ1741] Tree【树分治 点分治】
- magento controller直接渲染Block 以及传参
- Service官方教程(8)Bound Service示例之2-跨进程使用Messenger
- java 字符串的比较compareTo
- 员工管理系统(集合与IO流的结合使用 beta4.0 ObjectInputStream/ ObjectOutputStream)
- Python快速教程(转载)