Attaching a disk with virsh attach-disk causes guest to crash

When attempting to add a disk to a running guest using virsh attach-disk, the virtual machine reports successful attachment.

Symptoms

A virsh attach-disk command results in a success message and a subsequent crash of a guest in secure execution mode.

Causes

Guests in secure execution mode require iommu=on to be set for all virtio devices to allow the use of bounce buffers. Adding a device without allowing bounce buffers destabilizes the guest.

Resolving the problem

All virtio devices must be configured with the specification iommu=on to allow the use of bounce buffers.

User response

To attach a disk to a guest running in secure execution mode, use the virsh attach-device command with a device configuration XML. For details about the command, see . For an example, see .