15.5. Attaching host devices to virtual machines by using the web console
To add specific functionalities to your virtual machine (VM), you can use the web console to attach host devices to the VM.
Prerequisites
You have installed the RHEL 10 web console.
For instructions, see Installing and enabling the web console.
If you are attaching PCI devices, ensure that the status of the
managedattribute of thehostdevelement is set toyes.注意When attaching PCI devices to your VM, do not omit the
managedattribute of thehostdevelement, or set it tono. If you do so, PCI devices cannot automatically detach from the host when you pass them to the VM. They also cannot automatically reattach to the host when you turn off the VM.As a consequence, the host might become unresponsive or shut down unexpectedly.
You can find the status of the
managedattribute in your VM’s XML configuration. The following example opens the XML configuration of theexample-VM-1VM.# virsh edit example-VM-1- Back up important data from the VM.
Optional: Back up the XML configuration of your VM. For example, to back up the
example-VM-1VM:# virsh dumpxml example-VM-1 > example-VM-1.xml- The web console VM plugin is installed on your system.
Procedure
- Log in to the RHEL 10 web console.
In the interface, click the VM to which you want to attach a host device.
A new page opens with an Overview section with basic information about the selected VM and a Console section to access the VM’s graphical interface.
Scroll to .
The Host devices section displays information about the devices attached to the VM and options to Add or Remove devices.
Click .
The Add host device dialog is displayed.
- Select the device you want to attach to the VM.
Click
The selected device is attached to the VM.
Verification
- Run the VM and check if the device is displayed in the Host devices section.