Example: Adding a disk to a guest running in secure execution mode
Procedure
-
Configure the disk in a separate device configuration XML file. This configuration must include
the
iommu=setting.on
Specifyiommu=in the XML file as an attribute of the driver element within the disk configuration.on
For example, in this MyDisk.xml file, iommu is set toon
for a disk:<disk type="block" device="disk"> <driver name="qemu" type="raw" cache="none" io="native" iothread="2"iommu=/> ...on
- Specify this device configuration XML file as an argument for the virsh
attach-device command when you hotplug the disk. For example, this command picks up the MyDisk.xml configuration file for the disk:
# virsh attach-device --config Guest1 ~/MyDisk.xml
Tip: Also use the virsh attach-device command to attach interfaces.