Skip to content

SATA Controllers

Perform the following steps to map your SATA disk device to a SATA 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). From the list on the left, select the SATA disk device to which you want to map a SATA controller.

  5. In the right pane, open the XML tab and find the following line:

    <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    

    Edit the line so that the value of the controller attribute is equal to the amount of SATA controllers that already exist in your VM configuration. If there are no SATA controllers in your configuration, specify 0 as the controller value.

    Click Apply. A new SATA controller will appear in the left pane.

    Attention

    If the new controller did not appear, choose a higher number for the controller attribute.

  6. Click on the newly created SATA controller, then open the XML tab in the right pane. Your configuration should look similar to this:

    <controller type="sata" index="0">
     <address type="pci" domain="0x0000" bus="0x10" slot="0x03" function="0x0"/>
    </controller>
    
    The index attribute value is the controller number. In order for the controller to be mapped to the disk device, the values in both the controller and the disk device configuration must be the same. For example:

    • Controller XML configuration:

      <controller type="sata" index="1">
       <address type="pci" domain="0x0000" bus="0x10" slot="0x03" function="0x0"/>
      </controller>
      

    • Disk device XML configuration:

      <disk type="file" device="disk">
          <driver name="qemu" type="qcow2" cache="writethrough"/>
          <source file="sata_disk.qcow2"/>
          <target dev="sdd" bus="sata"/>
          <address type="drive" controller="1" bus="0" target="0" unit="3"/>
      </disk>
      

  7. You can check whether the disk device has been properly mapped to the controller by selecting the SATA 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.