免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7455 | 回复: 6

关于KVM在NFS环境下运行的问题 [复制链接]

论坛徽章:
0
发表于 2010-12-02 23:39 |显示全部楼层
我把NFS服务器的/vps挂载到KVM主机的/mnt上,mnt目录我已经设成了777了,但是使用virt-install 行创建虚拟机,出现这样的错误:
大侠们,能告诉是什么原因造成的吗,如果有这方面经验,可不可发一份配置我看看
[root@kvm002 mnt]#  virt-install
ERROR    A name is required for the virtual machine. (use --prompt to run interactively)
[root@kvm002 mnt]#  virt-install  --prompt
What is the name of your virtual machine? 116.254.191.19
How much RAM should be allocated (in megabytes)? 2048
What would you like to use as the disk (file path)? /mnt/116.254.191.19.s
How large would you like the disk (/mnt/116.254.191.19.s) to be (in gigabytes)? 10
  What is the install CD-ROM/ISO or URL? /vps/isos/win2003sp2.iso


Starting install...
Allocating '116.254.191.19.s'                                                                                |  10 GB     00:00     
ERROR    internal error process exited while connecting to monitor: char device redirected to /dev/pts/5
qemu: could not open disk image /mnt/116.254.191.19.s: Permission denied

Domain installation does not appear to have been
successful.  If it was, you can restart your domain
by running 'virsh start 116.254.191.19'; otherwise, please
restart your installation.
ERROR    internal error process exited while connecting to monitor: char device redirected to /dev/pts/5
qemu: could not open disk image /mnt/116.254.191.19.img: Permission denied
Traceback (most recent call last):
  File "/usr/sbin/virt-install", line 1054, in <module>
    main()
  File "/usr/sbin/virt-install", line 936, in main
    start_time, guest.start_install)
  File "/usr/sbin/virt-install", line 978, in do_install
    dom = install_func(conscb, progresscb, wait=(not wait))
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 973, in start_install
    return self._do_install(consolecb, meter, removeOld, wait)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1038, in _do_install
    "install")
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1009, in _create_guest
    dom = self.conn.createLinux(start_xml, 0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1270, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error process exited while connecting to monitor: char device redirected to /dev/pts/5
qemu: could not open disk image /mnt/116.254.191.19.img: Permission denied

/mnt

论坛徽章:
1
操作系统版块每日发帖之星
日期:2015-07-11 22:20:00
发表于 2010-12-03 11:50 |显示全部楼层
selinux策略默认禁止kvm使用nfs资源。我初步推测你的问题是由此导致。
1)
# setenforce 0
2)
编辑 /etc/selinux/config
把 SELINUX=enforcing 改为 SELINUX=disabled
3)
确认 /mnt/116.254.191.19.s 是否存在。请给出ls输出
4)
重试安装

论坛徽章:
0
发表于 2010-12-04 01:42 |显示全部楼层
感谢版本,的确是这个问题,困扰我挺久拉

论坛徽章:
0
发表于 2010-12-14 18:41 |显示全部楼层
还有一种可能,
禁用nfsv4

论坛徽章:
0
发表于 2013-05-21 20:10 |显示全部楼层
I met a similar problem when installing a virtual machine in SUSE12.3 by using interfacial QEMU-KVM, but I could not find a /etc/selinux/config to solve this permission-denied-problem. So I switched to installing it  in console expecting to find an easy way to change authorities, accidentally, the problem never show up. Could anybody tell me what happened?

论坛徽章:
9
寅虎
日期:2014-06-03 14:10:05午马
日期:2015-01-08 16:49:52白羊座
日期:2015-01-16 12:58:182015年迎新春徽章
日期:2015-03-04 09:57:092015元宵节徽章
日期:2015-03-06 15:51:33NBA常规赛纪念章
日期:2015-05-04 22:32:03IT运维版块每日发帖之星
日期:2015-08-04 06:20:0015-16赛季CBA联赛之北京
日期:2015-12-14 09:40:0315-16赛季CBA联赛之青岛
日期:2016-07-25 11:23:07
发表于 2014-07-23 17:26 |显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
发表于 2014-08-15 10:45
去这里看看吧很经典的http://www.16qianjin.com/
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP