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).

Adding Host Devices to a Virtual Machine

  1. Click ComputeVirtual Machines.
  2. Click a virtual machine’s name to go to the details view.
  3. Click the Host Devices tab 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.

  4. Click Add device to open the Add Host Devices window.
  5. Use the Pinned Host drop-down menu to select a host.
  6. Use the Capability drop-down menu to list the pci, scsi, or usb_device host devices.
  7. 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.
  8. 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

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

  1. Click ComputeVirtual Machines.
  2. Select a virtual machine to go to the details view.
  3. Click the Host Devices tab to list the host devices attached to the virtual machine.
  4. 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.
  5. 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 view 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 automatically removes the host devices from the virtual machine.

Pinning a Virtual Machine to a Host

  1. Click a virtual machine name and click the Host Devices tab.
  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.