Insert desired props in XML format using $ sudo virsh edit <domain>
To query usb devices reported on host system, run lsusb -v | grep ${target_name}
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x0000'/>
<product id='0x0000'/>
</source>
<address type='usb' bus='0' port='10'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x10' slot='0x00' function='0x0'/>
</source>
<address type='pci' domain='0x0000' bus='0x10' slot='0x00' function='0x0' multifunction='on'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x10' slot='0x00' function='0x1'/>
</source>
<address type='pci' domain='0x0000' bus='0x10' slot='0x00' function='0x1'/>
</hostdev>
Ensure that the disk is not mounted on host for filesystems such as XFS, EXT4
to avoid write path and cache conflicts.
Disk or Disk Partition
<disk type='block' device='disk'>
<driver name='qemu' type='raw' io='threads'/>
<source dev='/dev/nvme0'/>
<target dev='vdb' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x10' slot='0x00' function='0x0'/>
</disk>
Exposes Guest VMs to local network (versus default behind NAT) for attaching IP address.
<interface type='direct'>
<mac address='<<MAC_ADDRESS>>'/>
<source dev='enp10s0' mode='vepa'/>
<model type='rtl8139'/>
<address type='pci' domain='0x0000' bus='0x12' slot='0x01' function='0x0'/>
</interface>