Example of a multipathed SCSI tape and medium changer device configuration

Provide one virtual SCSI device for each configuration path.

About this task

This example provides a configuration for the topology as shown in SCSI tapes and medium changers as virtual SCSI devices.

Procedure

  1. Create a domain configuration-XML file with one configured virtual HBA for each host device.
    This configuration groups all virtual SCSI devices that represent the same host device in an own virtual HBA.
    <domain type="kvm">
      <name>VM1</name>
      ...
      <devices>
         ...
        <controller type="scsi" model="virtio-scsi" index="0">
           <address type="ccw" cssid="0xfe" ssid="0" devno="0x0002"/>
        </controller>
        <controller type="scsi" model="virtio-scsi" index="1">
           <address type="ccw" cssid="0xfe" ssid="0" devno="0x0004"/>
        </controller>
        ...
      </devices>
    </domain>
    
  2. Create separate device configuration-XML files for the SCSI tape device, both connected to the virtual HBA 0.
    1. The first file configures SCSI device name 0:0:0:0, which is the path of SCSI LUN 0 via SCSI host 0.
      <hostdev mode="subsystem" type="scsi">
           <source>
              <adapter name="scsi_host0"/>
              <address bus="0" target="0" unit="0"/>
           </source>
           <address type="drive" controller="0" bus="0" target="0" unit="0"/>
      </hostdev>
      
    2. The second file configures SCSI device name 1:0:0:0, which is the path via SCSI host 1.
      <hostdev mode="subsystem" type="scsi">
           <source>
              <adapter name="scsi_host1"/>
              <address bus="0" target="0" unit="0"/>
           </source>
           <address type="drive" controller="0" bus="0" target="0" unit="100"/>
      </hostdev>
      
  3. Create separate device configuration-XML files for the SCSI medium changer device, both connected to the virtual HBA 1.
    1. The first file configures SCSI device name 0:0:0:1, which is the path of SCSI LUN 1 via SCSI host 0.
      <hostdev mode="subsystem" type="scsi">
           <source>
              <adapter name="scsi_host0"/>
              <address bus="0" target="0" unit="1"/>
           </source>
           <address type="drive" controller="1" bus="0" target="0" unit="1"/>
      </hostdev>
      
    2. The second file configures SCSI device name 1:0:0:1, which is the path via SCSI host 1.
      <hostdev mode="subsystem" type="scsi">
           <source>
              <adapter name="scsi_host1"/>
              <address bus="0" target="0" unit="1"/>
           </source>
           <address type="drive" controller="1" bus="0" target="0" unit="101"/>
      </hostdev>