嘿,我想为我的 hyper-v 虚拟机分配一个 USB 端口。但我遇到了错误。在最后一个命令“Add-VMAssignableDevice...”之后,我在底部收到一个错误。有什么想法可以解决这个问题吗?
$vm = "Client_A"
$locationPath ="Port_#0007.Hub_#0002"
#Set automatic stop action to TurnOff
Set-VM -Name $vm -AutomaticStopAction TurnOff
#Enable Write-Combining on the CPU
Set-VM -GuestControlledCacheTypes $true -VMName $vm
#Configure 32 bit MMIO space
Set-VM -LowMemoryMappedIoSpace 3Gb -VMName $vm
#Configure Greater than 32 bit MMIO space
Set-VM -HighMemoryMappedIoSpace 33280Mb -VMName $vm
#assign to virtual machine
Add-VMAssignableDevice -LocationPath $locationPath -VMName $vm ```
Error : ```Add-VMAssignableDevice : The specified device 'Port_#0007.Hub_#0002' was not found on server 'DESKTOP-16VOLV0'.
At line:1 char:1
+ Add-VMAssignableDevice -LocationPath $locationPath -VMName $vm ```