<address> as child element of <hostdev> or <disk>

Specifies the address of a pass-through device on the guest. Such devices are connected to the virtual server through a controller or through the VFIO framework.

Text content

None.

Selected attributes

The set of relevant attributes depends on the device type: drive, ccw, or pci.

type="drive"
Specifies a SCSI device. The parent element can be hostdev or disk.
controller
Specifies the virtual controller of the virtual device. Enter the index attribute value of the respective controller element.
bus
Specifies the virtual SCSI bus of the virtual device.
target
Specifies the virtual SCSI target of the virtual device. This value can be in the range 0 - 255.
unit
Specifies the unit number (LUN) of the virtual SCSI device.
type="ccw"
Specifies a device that is attached to the virtual channel subsystem, for example a VFIO pass-through DASD. The parent element is hostdev.
cssid
Specifies the channel subsystem number of the device. Must be 0xfe. In the device address on the guest, this value resolves to 0.
ssid
Specifies the subchannel set of the device. Valid values are in the range 0x0 - 0x3.
devno
Specifies the device number of the device. Must be a unique value in the range 0x0000 - 0xffff.
type="pci"
Specifies a VFIO pass-through PCI device. The parent element is hostdev. You can but need not specify valid values for the domain, bus, slot, and function of the PCI address. If you omit these specification, libvirt generates valid values for you.
domain
Specifies the virtual PCI domain number. Must be 0x0000.
bus
Specifies the virtual PCI bus. Must be 0x00.
slot
Specifies the virtual PCI slot. Valid values are in the range 0x01 - 0x1f.
function
Specifies the virtual PCI function. Must be 0x0.

Usage

Parent elements

Child elements

<zpci>

Examples

<devices>
    ...
    <hostdev mode="subsystem" type="mdev" model="vfio-ccw">
       <source>
          <address uuid="90c6c135-ad44-41d0-b1b7-bae47de48627"/>
       </source>
       <address type="ccw" cssid="0xfe" ssid="0x0" devno="0x00a1"/>
    </hostdev>
    ...
    <hostdev mode="subsystem" type="pci">
       <driver name="vfio"/>
       <source>
         <address domain="0x0002" bus="0x00" slot="0x00" function="0x0"/>
       </source>
       <address type="pci"> 
          <zpci uid="0x0001" fid="0x00000000"/>
       </address>
    </hostdev>
    ...
    <controller type="scsi" model="virtio-scsi" index="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>
    ...
    <controller type="scsi" model="virtio-scsi" index="1"/>
    <disk type="file" device="cdrom">
        <driver name="qemu" type="raw" io="native" cache="none"/>
        <source file="/var/lib/libvirt/images/cd.iso"/>
        <target dev="vda" bus="scsi"/>
        <address type="drive" controller="1" bus="0" target="0" unit="0"/>
        <readonly/>
    </disk>
    ...
</devices>