今天自己编译了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.

  1.  
    # The user for QEMU processes run by the system instance. It can be
  2.  
    # specified as a user name or as a user id. The qemu driver will try to
  3.  
    # parse this value first as a name and then, if the name doesn't exist,
  4.  
    # as a user id.
  5.  
    #
  6.  
    # Since a sequence of digits is a valid user name, a leading plus sign
  7.  
    # can be used to ensure that a user id will not be interpreted as a user
  8.  
    # name.
  9.  
    #
  10.  
    # Some examples of valid values are:
  11.  
    #
  12.  
    # user = "qemu" # A user named "qemu"
  13.  
    # user = "+0" # Super user (uid=0)
  14.  
    # user = "100" # A user named "100" or a user with uid=100
  15.  
    #
  16.  
    user = "root"
  17.  
     
  18.  
    # The group for QEMU processes run by the system instance. It can be
  19.  
    # specified in a similar way to user.
  20.  
    group = "root"
  21.  
     
  22.  
    # Whether libvirt should dynamically change file ownership
  23.  
    # to match the configured user/group above. Defaults to 1.
  24.  
    # Set to 0 to disable file ownership changes.
  25.  
    #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

无法完成安装:'Cannot access storage file '/的更多相关文章

  1. 如何在ASP.NET Core中自定义Azure Storage File Provider

    文章标题:如何在ASP.NET Core中自定义Azure Storage File Provider 作者:Lamond Lu 地址:https://www.cnblogs.com/lwqlun/p ...

  2. HDFS relaxes a few POSIX requirements to enable streaming access to file system data

    https://hadoop.apache.org/docs/r2.7.2/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html Introduction [ ...

  3. Wincap安装出现“error opening file for writing wpcap.dll”之解决办法

    Wincap安装出现"error opening file for writing wpcap.dll"之解决办法 安装Wireshark时,一直出现下面的错误,选择忽略这个错误, ...

  4. use tomcat to access the file cross the environment

    background: 项目中的一个小工具,是一个Cron Job ,每天去搜集下服务器Hadoop Job的运行状态,并生成一份报告发送给整个Team,生产报告的同时把相关的日志文件保存到固定的一台 ...

  5. 将Oracle表导入到Access方法,已经安装了Access但Win7提示 找不到access driver

    已经安装了Access但Win7提示 找不到access driver: 1.打开 "C:\Windows\SysWOW64\odbcad32.exe" 2.管理员cmd运行 命令 ...

  6. Linux下Oracle11G RAC报错:在安装oracle软件时报file not found一例

    Linux下Oracle11G RAC报错:在安装oracle软件时报file notfound一例 1.现象 之前安装一切都比較顺利,安装oracle软件时,进度到30%时报错:file not f ...

  7. FileStream:The process cannot access the file because it is being used by another process

    先看下面一段代码(先以共享的方式打开文件读写,然后以只读的方式打开相同文件): FileStream fs  = new FileStream(filePath, FileMode.Open, Fil ...

  8. C# The process cannot access the file because it is being used by another process

    C# The process cannot access the file because it is being used by another process   The process cann ...

  9. 在64位Win7操作系统中安装Microsoft Access Engine的解决方案

    在64位Win7操作系统中安装Microsoft Access Engine的解决方案 现在的Win7系统中安装的一般都是32位的Office,因为微软推荐使用32位的Office,兼容性更强,稳定性 ...

随机推荐

  1. c#网格控件,Excel控件

    http://www.grid2000.com/images.html   Cell Type FlexCell supports following cell types: TextBox, Com ...

  2. Logistic回归 线性回归(转)

    来源: http://www.cnblogs.com/jerrylead 1 摘要 本报告是在学习斯坦福大学机器学习课程前四节加上配套的讲义后的总结与认识.前四节主要讲述了回归问题,回归属于有监督学习 ...

  3. 类似查询mysql数据库的查询XML的JS类

    一个快捷操作XML数据库的Javascript接口对象,包含select.count.tables.fields等方法,能够像操作mysql等其它数据库一样操作XML数据库. if(document. ...

  4. PCB RabbitMQ的安装使用

    随着公司加大力度信息化建设,PCB企业各种各样的系统软件越来越多,整个公司订单流状态监控变得越来越不可控,是时候需采用新的方式来收集各系统状态节点状态了,以下记录RabbitMQ安装使用: 一.Rab ...

  5. Postgresql空库发布或者部分空库,模式,表处理备份流程

    --备份数据库结构pg_dump -h localhost -p 8101 -d qhsoam -s -f /tmp/nodata.sql --仅备份某模式和该模式下的数据表结构pg_dump -h ...

  6. 洛谷 P3622 [APIO2007]动物园【状压dp】

    看成网络流建图想了好久... 实际上5个是可以状压的 设f[i][k]为到第i个围栏状态为k的方案数,因为考虑到重复,设g[i][k]记录i开始,状态为k的孩子有几个 状态转移很好想:f[j][k]= ...

  7. bzoj 4815: [Cqoi2017]小Q的表格【欧拉函数+分块】

    参考:http://blog.csdn.net/qq_33229466/article/details/70174227 看这个等式的形式就像高精gcd嘛-所以随便算一下就发现每次修改(a,b)影响到 ...

  8. bzoj 2178 圆的面积并【simpson积分】

    直接套simpson,f可以直接把圆排序后扫一遍所有圆,这样维护一个区间就可以避免空段. 然而一定要去掉被其他圆完全覆盖的圆,否则会TLE #include<iostream> #incl ...

  9. CentOS 7安装并设置启动图形桌面

    服务器端有时没有安装图形桌面,采用下面的步骤安装gnome桌面,并能够启动后进入图形桌面 1.安装图形环境 #yum grouplist#yum groupinstall 'GNOME Desktop ...

  10. 【UVA - 101】The Blocks Problem(vector+模拟)

    The Blocks Problem Descriptions:(英语就不说了,直接上翻译吧) 初始时从左到右有n个木块,编号为0~n-1,要求实现下列四种操作: move a onto b: 把a和 ...