15.4. Removing a PCI passthrough device for host re-use

Perform the following steps to remove a PCI passthrough device so that the host regains full access to the device:
  1. List all PCI devices

    For a list of only PCI devices, run the following command:
    # virsh nodedev-list | grep pci
    Each PCI device is identified by a string in the following format (where 8086 is a variable that in this case represents Intel equipment, and **** is a four digit hexadecimal code specific to each device):
    pci_8086_****

    Note

    Comparing lspci output to lspci -n (which turns off name resolution) output can assist in deriving which device has which device identifier code.
  2. Remove and re-attach the device

    After removing the device either from the guest XML file or virt-manager, run the virsh nodedev-reattach command to return its use to the host, substituting your PCI device name that is designated for removal:
    # virsh nodedev-reattach pci_8086_3a6c
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.