[libvirt-users] Oracle RAC in libvirt+KVM environment

Paolo Bonzini pbonzini at redhat.com
Tue Aug 20 08:33:23 UTC 2013


Il 20/08/2013 08:00, Timon Wang ha scritto:
>     <disk type='file' device='disk'>
>       <driver name='qemu' type='raw' cache='none'/>
>       <source file='/home/images/win2008_2_sys'/>
>       <target dev='hda' bus='ide'/>
>       <boot order='3'/>
>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>     </disk>
>     <disk type='file' device='cdrom'>
>       <driver name='qemu' type='raw'/>
>       <source file='/home/isos/windows2008_64r2.iso'/>
>       <target dev='sdc' bus='ide'/>
>       <readonly/>
>       <boot order='1'/>
>       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
>     </disk>
>     <disk type='block' device='disk'>

I'm not sure this will be enough, but if you want passthrough to the
host device you should use device='lun' here.  However, you still would
not be able to issue SCSI reservations unless you run QEMU with the
CAP_SYS_RAWIO capability (using "<disk ... rawio='yes'>").

Most important, it still would be unsafe to do this if the same device
is passed to multiple virtual machines on the same host.  You need to
have NPIV and create separate virtual HBAs.  Then each virtual machine
should get a separate virtual HBA.  Otherwise, persistent reservations
are not attached to a particular virtual machine, but generically to the
host.

>       <driver name='qemu' type='raw'/>
>       <source dev='/dev/fedora/q_disk'/>
>       <target dev='sda' bus='virtio'/>

You are not exposing a virtio-scsi disk here.  You are exposing a
virtio-blk disk.  You can see this from the type='pci' address that
libvirt gave to the disk.

If you use bus='scsi', you will see that libvirt will use type='drive'
for the address.

>     <controller type='scsi' index='0' model='virtio-scsi'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
> function='0x0'/>
>     </controller>

This is okay.

>   <qemu:commandline>
>     <qemu:arg value='-rtc-td-hack'/>
>   </qemu:commandline>

FWIW, this can be replaced with

  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
  </clock>

(you already have the <clock> element, but no <timer> element inside).

Paolo

> </domain>
> 
> 
> 
> On 8/19/13, Paolo Bonzini <pbonzini at redhat.com> wrote:
>> Il 15/08/2013 12:01, Timon Wang ha scritto:
>>> Thanks.
>>>
>>> I have read the link you provide, there is another link which tells me
>>> to pass a NPIV discovery lun as a disk, this is seen as a local direct
>>> access disk in windows. RAC and Failure Cluster both consider this
>>> pass through disk as local disk, not a share disk, and the setup
>>> process failed.
>>>
>>> Hyper-v provides a virtual Fiber Channel implementation, so I
>>> wondering if kvm has the same solution like it.
>>
>> Can you include the XML file you are using for the domain?
>>
>> Paolo
>>
>>
> 
> 




More information about the libvirt-users mailing list