今天自己编译了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. Python装饰器单例

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/dutsoft/article/details/52057981#!/usr/bin/python#c ...

  2. bzoj1878 [SDOI2009]HH的项链——树状数组

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1878 离线树状数组,巧妙的思路呢: 给每种项链记录一个最后出现的位置lst,根据项链最后出现 ...

  3. vue tab切换demo

    定义tab页面切换的内容 var app=new Vue({ el:'#app', data:{ navTabs:[ { text:"tab1", isActive:true, t ...

  4. css模型

    外边距: margin:1px 2px 3px 4px; 上     右     下     左 内边距: padding:1px 2px 3px 4px; 上     右     下     左 边 ...

  5. 【黑金教程笔记之006】【建模篇】【Lab 05 SOS信号之一】—笔记

    sos_module.v是产生SOS信号的功能模块.即有次序的输出莫斯码:点.画.间隔.control_module.v是一个定时触发器,每一段时间使能sos_module.v. 模块: /***** ...

  6. tableView 顶部多出一部分解决方法

    1.self.automaticallyAdjustsScrollViewInsets = NO; 此方法解决之后 不能保证tableView 能彻底的滑动到底部 2. self.edgesForEx ...

  7. [SRM625 Div1 Hard] Seatfriends

    题目链接:Portal Vjudge Solution 一开始拿到这一题Sb了,把空放到dp中一起考虑了,这样计数就变得很麻烦. 其实我们可以把空位拿出来,假设它是存在的,最后再放回去. 那么就可以钦 ...

  8. UVA 11149 Power of Matrix 构造矩阵

    题目大意:意思就是让求A(A是矩阵)+A2+A3+A4+A5+A6+······+AK,其中矩阵范围n<=40,k<=1000000. 解题思路:由于k的取值范围很大,所以很自然地想到了二 ...

  9. ACM_最小公倍数

    Lowest Common Multiple Plus Time Limit: 2000/1000ms (Java/Others) Problem Description: 求n个数的最小公倍数. I ...

  10. Android 插件技术:动态加载dex技术初探

    1.Android动态加载dex技术初探 http://blog.csdn.net/u013478336/article/details/50734108 Android使用Dalvik虚拟机加载可执 ...