Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3015975
  • 博文数量: 535
  • 博客积分: 15788
  • 博客等级: 上将
  • 技术积分: 6507
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-07 09:11
文章分类

全部博文(535)

文章存档

2016年(1)

2015年(1)

2014年(10)

2013年(26)

2012年(43)

2011年(86)

2010年(76)

2009年(136)

2008年(97)

2007年(59)

分类: LINUX

2011-08-02 10:23:12

  1. virsh # attach-disk vmsample /usr/local/CentOS-5.6-x86_64/CentOS-5.6-x86_64-bin-2of8.iso hdb --type cdrom --mode readonly --sourcetype file
  2. error: Failed to attach disk
  3. error: operation failed: could not change media on ide0-cd1: Could not open '/usr/local/CentOS-5.6-x86_64/CentOS-5.6-x86_64-bin-2of8.iso
打开审核:
semodule -DB

tail -f /var/log/audit/audit.log
type=AVC msg=audit(1312250683.885:166363): avc:  denied  { write } for  pid=32281 comm="qemu-kvm" name="CentOS-5.6-x86_64-bin-2of8.iso" dev=sda5 ino=47054858 scontext=system_u:system_r:svirt_t:s0:c661,c697 tcontext=system_u:object_r:virt_content_t:s0 tclass=file
type=SYSCALL msg=audit(1312250683.885:166363): arch=c000003e syscall=2 success=no exit=-13 a0=1fd010d0 a1=1002 a2=0 a3=1 items=0 ppid=1 pid=32281 auid=508 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=23312 comm="qemu-kvm" exe="/usr/libexec/qemu-kvm" subj=system_u:system_r:svirt_t:s0:c661,c697 key=(null)

这是一个bug
BZ#
Previously, when a CD image with a read-only flag set was ejected from a drive on a guest, the read-only flag was preserved. Consequently, the image could not be re-attached to the drive. A patch has been provided to address this issue, and the read-write flag is now set correctly when an image is ejected from a drive, allowing CD images to be changed on-the-fly

红帽已经给出了patch,但是需要访问rhn。

或者等到RHEL5.7解决这个问题。

或者关闭selinux。




阅读(3449) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~