6.10. Host Devices
6.10.1. Adding a Host Device to a Virtual Machine
To improve performance, you can attach a host device to a virtual machine.
Host devices are physical devices connected to a particular host machine, such as:
- SCSI tape drives, disks, and changers
- PCI NICs, GPUs, and HBAs
- USB mice, cameras, and disks
To add a host device to a virtual machine, you use the virtual machine’s Host Devices properties. First, you select one of the cluster hosts and a device type. Then, you choose and attach one or more of the host devices on that host.
When you change the Pinned Host setting, it removes the current host devices. When you save these changes, in the virtual machine’s Host settings, it sets Start Running On to Specific Host(s) and specifies the host you selected earlier using the Pinned Host setting.
When you finish attaching one or more host devices, you run the virtual machine to apply the changes. The virtual machine starts on the host that has the attached host devices.
If the virtual machine cannot start on the specified host or access the host device, it cancels the start operation and produces an error message with information about the cause.
The state of the host is
- The host is configured for direct device assignment.
- In the Administration Portal, click → .
- Shut down the virtual machine.
- Click the name of the virtual machine to go to the details view.
- Click the Host Devices tab.
- Click Add Host Devices pane. . This opens the
- Use Pinned Host to select the host where the virtual machine runs.
Use Capability to list
- Use Available Host Devices to select devices.
- Click the down arrow to move devices to Host Devices to be attached.
- Click to attach these devices to the virtual machine and close the window.
Optional: If you attach a SCSI host device, configure the optimal driver.
- Click the Edit Virtual Machine pane. button. This opens the
- Click the Custom Properties tab.
- Click the Please select a key and select scsi_hostdev from the bottom of the drop-down list.
- In most cases, select scsi-hd. Otherwise, for tape or CD changer devices, select the scsi_generic option. For more details, see Virtual Machine Custom Properties Settings Explained.
- Click the button.
- Run the virtual machine.
- While the virtual machine starts running, watch for Operation Canceled error messages.
If you cannot add a host device to a virtual machine, or a virtual machine cannot start running with the attached host devices, it generates Operation Canceled error messages. For example:
Operation Canceled Error while executing action: <vm name>: * Cannot run VM. There is no host that satisfies current scheduling constraints. See below for details: * The host <first_hostname> did not satisfy internal filter HostDevice because it does not support host device passthrough. * The host <second_hostname> did not satisfy internal filter HostDevice because the host does not provide requested host devices.
You can fix the error by removing the host device from the virtual machine or correcting the issues the error message describes. For example:
Respond to a
The host <hostname> did not satisfy internal filter HostDevice because it does not support host device passthroughmessage by configuring the host for device passthrough and restarting the virtual machine.
Respond to the
The host <hostname> did not satisfy internal filter HostDevice because the host does not provide requested host devicesmessage by adding the host device to the host.
Respond to a
Cannot add Host devices because the VM is in Up statusmessage by shutting down the virtual machine before adding a host device.
Verify that the state of the host is
- Host Devices in the Virtual Machine Management Guide.
- Pinning a Virtual Machine to Multiple Hosts
- Configuring a Host for PCI Passthrough
- Additional Hardware Considerations for Using Device Assignment in Hardware Considerations for Implementing SR-IOV.
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.
- Click → .
- Select a virtual machine to go to the details view.
- Click the Host Devices tab to list the host devices attached to the virtual machine.
Select the host device to detach from the virtual machine, or hold
Ctrlto select multiple devices, and click . This opens the Remove Host Device(s) window.
- Click 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
- Click a virtual machine name and click the Host Devices tab.
- Click Pin to another host. This opens the Pin VM to Host window.
- Use the Host drop-down menu to select a host.
- Click to pin the virtual machine to the selected host.