PowerCli error when running command Get-PassthroughDevice when used with a VM with GPU
search cancel

PowerCli error when running command Get-PassthroughDevice when used with a VM with GPU

book

Article ID: 402025

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

The VM #####  has a PCI Device 0 with NVIDIA GRID vGPU grid_v100d-2b.

You are getting an error for this VM and for all others with a GPU Device present:

 

Get-PassthroughDevice        Unable to cast object of type 'VMware.Vim.VirtualPCIPassthroughVmiopBackingInfo' to type 'VMware.Vim.VirtualPCIPassthroughDeviceBackingInfo'.

Environment

vCenter Server 8.x

vCenter Server 7.x

Powershell 7.4

PowerCLI13.3

Cause

Incorrect command.

Command Get-PassthroughDevice is used for physical passthrough devices (directpath I/O)

Resolution

Please use the command below to list all VMs with their name and vGPU backing 

Get-VM | Select-Object Name,@{Name=”vGPU”;Expression={$_.ExtensionData.Config.Hardware.Device.Backing.vgpu}}