6.10. Host Devices


6.10.1. Adding a Host Device to a Virtual Machine

Virtual machines can be directly attached to the host devices for improved performance if a compatible host has been configured for direct device assignment. Host devices are devices that are physically plugged into the host, including SCSI (for example tapes, disks, changers), PCI (for example NICs, GPUs, and HBAs), and USB (for example mice, cameras, and disks).

Procedure 6.15. Adding Host Devices to a Virtual Machine

  1. Select a virtual machine and click the Host Devices tab in the details pane to list the host devices already attached to this virtual machine. A virtual machine can only have devices attached from the same host. If a virtual machine has attached devices from one host, and you attach a device from another host, the attached devices from the previous host will be automatically removed.
    Attaching host devices to a virtual machine requires the virtual machine to be in a Down state. If the virtual machine is running, the changes will not take effect until after the virtual machine has been shut down.
  2. Click Add device to open the Add Host Devices window.
  3. Use the Pinned Host dropdown menu to select a host.
  4. Use the Capability dropdown menu to list the pci, scsi, or usb_device host devices.
  5. Select the check boxes of the devices to attach to the virtual machine from the Available Host Devices pane and click the directional arrow button to transfer these devices to the Host Devices to be attached pane, creating a list of the devices to attach to the virtual machine.
  6. When you have transferred all desired host devices to the Host Devices to be attached pane, click OK to attach these devices to the virtual machine and close the window.
These host devices will be attached to the virtual machine when the virtual machine is next powered on.

6.10.2. Removing Host Devices from a Virtual Machine

Remove a host device from a virtual machine to which it has been directly attached using the details pane of the virtual machine.
If you are removing all host devices directly attached to the virtual machine in order to add devices from a different host, you can instead add the devices from the desired host, which will automatically remove all of the devices already attached to the virtual machine.

Procedure 6.16. Removing a Host Device from a Virtual Machine

  1. Select the virtual machine and click the Host Devices tab in the details pane to list the host devices attached to the virtual machine.
  2. Select the host device to detach from the virtual machine, or hold Ctrl to select multiple devices, and click Remove device to open the Remove Host Device(s) window.
  3. Click OK to confirm and detach these devices from the virtual machine.

6.10.3. Pinning a Virtual Machine to Another Host

You can use the Host Devices tab in the details pane of a virtual machine to pin it to a specific host.
If the virtual machine has any host devices attached to it, pinning it to another host will automatically remove the host devices from the virtual machine.

Procedure 6.17. Pinning a Virtual Machine to a Host

  1. Select a virtual machine and click the Host Devices tab in the details pane.
  2. Click Pin to another host to open the Pin VM to Host window.
  3. Use the Host drop-down menu to select a host.
  4. Click OK to pin the virtual machine to the selected host.
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.