今天自己编译了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++中class在实例化前到底占用多少空间

    最近忽然想起一个问题,C++中class在实例化前到底占用多少空间?我隐约记得书上是这么说的“类在实例化时才分配空间”!但是当我写下这个小程序的时候,杯具产生了—— #include<iostr ...

  2. selenium中关于driver的小记

    1:  Ubuntu系统将driver放入 /usr/bin 目录下,即可直接启动浏览器. 2:  WIN10系统讲Driver放入python安装的根目录下,即可直接启动浏览器. 3:  WIN10 ...

  3. 51nod 1244 莫比乌斯函数之和 【莫比乌斯函数+杜教筛】

    和bzoj 3944比较像,但是时间卡的更死 设\( f(n)=\sum_{d|n}\mu(d) g(n)=\sum_{i=1}^{n}f(i) s(n)=\sum_{i=1}^{n}\mu(i) \ ...

  4. [App Store Connect帮助]七、在 App Store 上发行(3.4)提交至“App 审核”:将构建版本从审核中移除

    若要停止“App 审核”流程,您可以将该 App 版本从 App 审核中移除.要执行此项操作,App 状态必须为下列之一: 正在等待出口合规检查 正在等待审核 正在审核 等待开发者发布 等待 Appl ...

  5. MongoDB集群跨网络、跨集群同步方案

    MongoDB集群跨网络.跨集群数据同步有以下几个方案,此处只是简单介绍,不过详细描述. 1.MongoDB自带的复制方案 优点:实施简单,不需要额外的技术栈 缺点:网络双向可连通. 2.CDC同步方 ...

  6. echarts 实例demo 详细讲解

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head>     & ...

  7. Spark MLlib机器学习

    前言 Spark MLlib是Spark对常用的机器学习算法的实现库,同时包括相关的测试和数据生成器.

  8. C语言之图像旋转

    最近用到了图像向左或者向右旋转90°的情况,纠结了好一会儿,写下来供大家参考. 1 向左旋转90° //unsigned char *pImgData: 输入图像指针 //int WidthIn, i ...

  9. poj 1664 放苹果 递归

    题目链接: http://poj.org/problem?id=1664 题目描述: 有n个苹果,m个盒子,盒子和苹果都没有顺序,盒子可以为空,问:有多少种放置方式? 解题思路: 当前有n个苹果,m个 ...

  10. Android网络状态监控

    Android 监控网络状态 在Android网络应用程序开发中,经常要判断网络连接是否可用,因此经常有必要监听网络状态的变化.android的网络状态监听可以用BroadcastReceiver来接 ...