Masaki Kimura
2013-Aug-27 10:29 UTC
Re: [libvirt-users] Oracle RAC in libvirt+KVM environment
>> I found that scsicmd can't pass all the scsi3_test but the result of >> sg_inq is the same as it in the host. >> >> I am absolutely confused about this situation. Am I missed some >> information about it?I guess this is caused by the lack of capability. Please check if enough capability was added to kvm process by the following steps. 1. Check the pid of kvm process. # ps -C qemu-system-x86_64 -o pid 5177 2. Check the capability for the process. # getpcaps 5177 Capabilities for `5177': = cap_sys_rawio+i In my fedora19 environment, as seen in above, only cap_sys_rawio+i was added with rawio='yes'. Even though, cap_sys_rawio+ep is required to pass-through SCSI Reservation from the guest. Note that I succeeded to pass-through SCSI Reservation with the following steps in my environment, not a Windows guest though. 1. Stop the guest. 2. Add CAP_SYS_RAWIO(effective, permitted) to qemu-kvm. # setcap cap_sys_rawio=ep /usr/bin/qemu-system-x86_64 3. Start the guest. However, I don't think this is the right way to workaround it, because it gives cap_sys_rawio+ep to all the kvm processes executed from this binary. I believe following patches, which are not merged yet, are trying to solve this problem in a different approach. - [PATCH v3 part2] Add per-device sysfs knob to enable unrestricted, unprivileged SG_IO https://lkml.org/lkml/2013/5/23/294 - [RFC PATCH 0/4] SG_IO filtering via sysfs and minimal whitelist https://lkml.org/lkml/2013/5/27/230 Any comments on this? Masaki
Paolo Bonzini
2013-Aug-27 11:07 UTC
Re: [libvirt-users] Oracle RAC in libvirt+KVM environment
Il 27/08/2013 12:29, Masaki Kimura ha scritto:> I believe following patches, which are not merged yet, are trying to solve > this problem in a different approach. > - [PATCH v3 part2] Add per-device sysfs knob to enable unrestricted, > unprivileged SG_IO > https://lkml.org/lkml/2013/5/23/294 > - [RFC PATCH 0/4] SG_IO filtering via sysfs and minimal whitelist > https://lkml.org/lkml/2013/5/27/230 > > > Any comments on this?Yes, that's correct. Paolo
Timon Wang
2013-Aug-27 12:09 UTC
Re: [libvirt-users] Oracle RAC in libvirt+KVM environment
Thanks, all the test in SCSICMD.exe can pass now, when I set the ep caps on qemu process. We found that sg_persist --read-keys can't get the same result in VM and host, and now we get the same result in both VM and host mode. But Windows 2008 Failover Cluster Still can't get the cluster disk configured, with some error said that the driver can't support the cluster. Thanks, I think I have dig into the windows Failover Cluster to find why it can't support cluster, I will ask somebody in MSDN. On Tue, Aug 27, 2013 at 7:07 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:> Il 27/08/2013 12:29, Masaki Kimura ha scritto: >> I believe following patches, which are not merged yet, are trying to solve >> this problem in a different approach. >> - [PATCH v3 part2] Add per-device sysfs knob to enable unrestricted, >> unprivileged SG_IO >> https://lkml.org/lkml/2013/5/23/294 >> - [RFC PATCH 0/4] SG_IO filtering via sysfs and minimal whitelist >> https://lkml.org/lkml/2013/5/27/230 >> >> >> Any comments on this? > > Yes, that's correct. > > Paolo-- Focus on: Server Vitualization, Network security,Scanner,NodeJS,JAVA,WWW Blog: http://www.nohouse.net