No MSFT_Disk objects found with property 'Number' equal to '3' After Updating Drivers
LewisWildgoose opened this issue · 0 comments
LewisWildgoose commented
Just recently updated my GPU drivers users Nvidia Geforce Experience, however, when trying to run the update drivers script to update the VM drivers, I get the following error:
PS D:\Downloads\GPU-Hyper-V\Easy-GPU-PV-main\Easy-GPU-PV-main> ./Update-VMGpuPartitionDriver.ps1 -VMName "GPUPV" -GPUName "AUTO"
Mounting Drive...
Get-Disk : No MSFT_Disk objects found with property 'Number' equal to '3'. Verify the value of the property and retry.
At D:\Downloads\GPU-Hyper-V\Easy-GPU-PV-main\Easy-GPU-PV-main\Update-VMGpuPartitionDriver.ps1:39 char:55
+ ... DriveLetter = (Mount-VHD -Path $VHD.Path -PassThru | Get-Disk | Get-P ...
+ ~~~~~~~~
+ CategoryInfo : ObjectNotFound: (3:UInt32) [Get-Disk], CimJobException
+ FullyQualifiedErrorId : CmdletizationQuery_NotFound_Number,Get-Disk
Copying GPU Files - this could take a while...
INFO : Finding and copying driver files for NVIDIA GeForce RTX 3060 to VM. This could take a while...
Then a load of errors form because it couldn't mount the drive. If I try rerun the command it complains about the process being in use. My formatting of the command should match:
$params = @{
VMName = "GPUPV"
SourcePath = "D:\Downloads\GPU-Hyper-V\Win10_22H2_EnglishInternational_x64v1.iso"
Edition = 6
VhdFormat = "VHDX"
DiskLayout = "UEFI"
SizeBytes = 40GB
MemoryAmount = 16GB
CPUCores = 4
NetworkSwitch = "Default Switch"
VHDPath = "D:\VMs\HyperV"
UnattendPath = "$PSScriptRoot"+"\autounattend.xml"
GPUName = "AUTO"
GPUResourceAllocationPercentage = 50
Team_ID = ""
Key = ""
Username = "GPUVM"
Autologon = "true"
If I list both Get-Disk and Get-PhysicalDisk:
PS D:\Downloads\GPU-Hyper-V\Easy-GPU-PV-main\Easy-GPU-PV-main> get-disk
Number Friendly Name Serial Number HealthStatus OperationalStatus Total Size Partition
Style
------ ------------- ------------- ------------ ----------------- ---------- ----------
0 ADATA SU630 2L082L2852NY Healthy Online 447.13 GB GPT
2 CT1000P5PSSD8 0000_0000_0000_0001_00A0_7523... Healthy Online 931.51 GB GPT
1 WDC WD100EZAZ-11TDBA0 4DH04A1Z Healthy Online 9.1 TB GPT
PS D:\Downloads\GPU-Hyper-V\Easy-GPU-PV-main\Easy-GPU-PV-main> get-physicaldisk
Number FriendlyName SerialNumber MediaType CanPool OperationalStatus HealthStatus Usage
------ ------------ ------------ --------- ------- ----------------- ------------ -----
2 CT1000P5PSSD8 0000_0000_0000_0001_00A0_7523_42AE_8A56. SSD False OK Healthy Auto-Select
1 WDC WD100EZAZ-11TDBA0 4DH04A1Z HDD False OK Healthy Auto-Select
0 ADATA SU630 2L082L2852NY SSD False OK Healthy Auto-Select
PS D:\Downloads\GPU-Hyper-V\Easy-GPU-PV-main\Easy-GPU-PV-main> ./Update-VMGpuPartitionDriver.ps1 -VMName "GPUPV" -GPUName "AUTO"
Mounting Drive...
Get-Disk : No MSFT_Disk objects found with property 'Number' equal to '3'. Verify the value of the property and retry.
At D:\Downloads\GPU-Hyper-V\Easy-GPU-PV-main\Easy-GPU-PV-main\Update-VMGpuPartitionDriver.ps1:39 char:55
+ ... DriveLetter = (Mount-VHD -Path $VHD.Path -PassThru | Get-Disk | Get-P ...
+ ~~~~~~~~
+ CategoryInfo : ObjectNotFound: (3:UInt32) [Get-Disk], CimJobException
+ FullyQualifiedErrorId : CmdletizationQuery_NotFound_Number,Get-Disk
Copying GPU Files - this could take a while...
INFO : Finding and copying driver files for NVIDIA GeForce RTX 3060 to VM. This could take a while...
PS D:\Downloads\GPU-Hyper-V\Easy-GPU-PV-main\Easy-GPU-PV-main> get-physicaldisk
Number FriendlyName SerialNumber MediaType CanPool OperationalStatus HealthStatus Usage
------ ------------ ------------ --------- ------- ----------------- ------------ -----
2 CT1000P5PSSD8 0000_0000_0000_0001_00A0_7523_42AE_8A56. SSD False OK Healthy Auto-Select
1 WDC WD100EZAZ-11TDBA0 4DH04A1Z HDD False OK Healthy Auto-Select
3 Msft Virtual Disk HDD False OK Healthy Auto-Select
0 ADATA SU630 2L082L2852NY SSD False OK Healthy Auto-Select
PS D:\Downloads\GPU-Hyper-V\Easy-GPU-PV-main\Easy-GPU-PV-main>
Additionally, my VM only has the one HDD attached: https://i.imgur.com/PEqSibD.png
Any ideas? This is driving me up the wall.