今天自己编译了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. jsp 中href链接有前缀

    在jsp页面中,如果有一个链接写为:“href="www.hqvolunteer.org"”(链接到的是外网),这样发布项目了后,把鼠标移到上面显示的是:你的项目路径/www.hq ...

  2. Ordeby then by

    先按orderby排序,再按thenby排序 return PartialView("_ClickRangeOnCategory", articles.OrderByDescend ...

  3. poj1419 求最大独立集

    题目链接:http://poj.org/problem?id=1419 题意:求最大独立集 思路: 这里有一个定理: 最大独立集=补图的最大团最大团=补图的最大独立集 所以这里我们只要求给出的图的最大 ...

  4. rpm安装总结(转载)

    转自:http://www.cnblogs.com/nuke/archive/2009/03/03/1402067.html 在RedHat Linux和Mandrake等兼容RedHat的发行版中, ...

  5. CF915E Physical Education Lessons(珂朵莉树)

    中文题面 据说正解是动态开点线段树而且标记也不难下传的样子 然而这种区间推平的题目还是喜欢写珂朵莉树啊……码量小…… 虽然真要构造的话随便卡…… //minamoto #include<cstd ...

  6. spring boot+mybatis报错mapper无法注入

    搭建spring boot项目时启动出现的问题,先来看异常片段: Error starting ApplicationContext. To display the conditions report ...

  7. 【爬坑系列】之docker的overlay网络配置(未完,待续)

    理论知识储备: 想了解vxlan网络的知识:https://www.cnblogs.com/shuiguizi/p/10923841.html 想了解docker网络的原理知识:https://www ...

  8. Spring @requestBody

    页面提交请求参数有两种,一种是form格式,一种是json格式 jQuery的$.post方法虽然也可以传递json格式数据,但实际上是用的form格式提交,jquery会帮你把json转成form格 ...

  9. CMake学习笔记四:usb_cam的CMakeLists解析

    最近在学习cmake,在完整看了<cmake实践>一书后,跟着书上例程敲了跑了一遍,也写了几篇相关读书笔记,算是勉强基本入门了.所以找了usb_cam软件包的CMakeLists.txt来 ...

  10. [Usaco2005 Jan]Sumsets 求和

    Description Farmer John commanded his cows to search for different sets of numbers that sum to a giv ...