Language and Page Formatting Options
12.4. Detaching an Assigned PCI Device
virshor virt-manager so it is available for host use.
Procedure 12.6. Detaching a PCI device from a guest with virsh
Detach the deviceUse the following command to detach the PCI device from the guest by removing it in the guest's XML file:
# virsh detach-device name_of_guest file.xml
Re-attach the device to the host (optional)If the device is in
managedmode, skip this step. The device will be returned to the host automatically.If the device is not using
managedmode, use the following command to re-attach the PCI device to the host machine:
# virsh nodedev-reattach deviceFor example, to re-attach the
pci_0000_01_00_0device to the host:
virsh nodedev-reattach pci_0000_01_00_0The device is now available for host use.
Procedure 12.7. Detaching a PCI Device from a guest with virt-manager
Open the virtual hardware details screenIn virt-manager, double-click on the virtual machine that contains the device. Select the Show virtual hardware details button to display a list of virtual hardware.
Figure 12.4. The virtual hardware details button
Select and remove the deviceSelect the PCI device to be detached from the list of virtual devices in the left panel.
Figure 12.5. Selecting the PCI device to be detachedClick the Remove button to confirm. The device is now available for host use.