• 无法完成安装:'Cannot access storage file '/


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

  • 相关阅读:
    南京网络赛a(离线 树状数组)
    super_log(欧拉降幂)
    ac自动机模板 hdu2222
    Seek the Name, Seek the Fame POJ
    Power Strings(求循环次数最多的循环节 kmp)
    Period(循环节 nxt数组的应用)
    kmp 算法回顾(Number Sequence HDU
    最短路 2 (百度之星 初赛3 B)(floyd)
    path(优先队列,dijk拓展)
    (银联复赛)爱喝「肥宅快乐水」的班长
  • 原文地址:https://www.cnblogs.com/marklove/p/9231721.html
Copyright © 2020-2023  润新知