Skip to content

Virtio-SCSI Controllers

Perform the following steps to map your virtual disk device to a Virtio-SCSI controller.

  1. Open Virtual Machine Manager either from the Application Launcher or by running the virt-manager command in your CLI. A new window will open.

  2. In the top menu of the Virtual Machine Manager window, click Edit > Preferences, then select the checkbox Enable XML editing.

    Click Close.

  3. Open your virtual machine configuration window by selecting the VM and clicking the Open button. A new window will open.

  4. Click the light bulb icon (Show virtual hardware details).

    • If you already have a Virtio-SCSI controller that you want to map to your virtual disk device, proceed to Step 5.

    • If you want to create a new Virtio-SCSI controller, perform the following substeps:

      1. Click the Add Hardware button at the bottom of the left pane. A new window will open.

      2. In the left pane, select Controller. In the right pane, make sure that the Type is specified as SCSI and Model is VirtIO SCSI. If necessary, open the drop-down menus and select the specified type and model. Click Finish.

      3. A new Virtio-SCSI controller will appear in the pane on the left.

  5. In the left pane, click on the Virtio-SCSI controller that you want to map to your SCSI disk device. Open the XML tab in the right pane.

    Your configuration will look similar to this:

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

    Notice the value of the index attribute. You will need to specify the same number as the value of the controller attribute in your disk configuration as described in the next step.

  6. In the left pane, click on the SCSI disk device that you want to map to your Virtio-SCSI controller, then open the XML tab in the right pane.

    Your configuration will look similar to this:

    <disk type="file" device="disk">
     <driver name="qemu" type="qcow2" cache="writethrough"/>
     <source file="scsi_disk.qcow2"/>
     <target dev="sdc" bus="scsi"/>
     <address type="drive" controller="4" bus="0" target="0" unit="2"/>
    </disk>
    

    Make sure that the controller value in the disk configuration matches the index value in the controller configuration as shown above.

  7. You can check whether the disk device has been properly mapped to the controller by selecting the SCSI controller in the left pane of the Virtual Hardware Details window and opening the Details tab.

    The Devices field will list the devices that are mapped to the selected controller.