"wmic" command on windows is deprecated
The process of passing a diskdrive on windows seems to be using the wmic command witch is deprecated and does not come default on new versions of windows see https://learn.microsoft.com/en-us/windows/whats-new/deprecated-features
It currently can be re added. Settings > System > Optional Features > View Features > WMIC
Thanks @LJAM96. Unfortunately, I don't have enough resources to address this at this time. A PR would be welcome, though.
It currently can be re added. Settings > System > Optional Features > View Features > WMIC
That doesn't seem to be the case anymore
What about the PowerShell command
Get-CimInstance -ClassName Win32_diskdrive
?
See https://stackoverflow.com/questions/57121875/what-can-i-do-about-wmic-is-deprecated
Nothing, you would get stuck at the next step of the process:
C:\Windows\System32>%USERPROFILE%\go\bin\linsk ls dev:\\.\PHYSICALDRIVE1
time=2025-02-17T19:36:15.963+01:00 level=WARN msg="Using raw block device passthrough. Please note that it's YOUR responsibility to ensure that no device is mounted in your OS and the VM at the same time. Otherwise, you run serious risks. No further warnings will be issued." caller=vm
time=2025-02-17T19:36:15.998+01:00 level=ERROR msg="Failed to create vm instance" error="configure vm cmd block device passthrough: check whether device seems to be mounted (path '\\\\.\\PHYSICALDRIVE1'): exec wmic cmd: exec: \"wmic\": executable file not found in %PATH%"
Make the change here: https://github.com/AlexSSD7/linsk/blob/4c98a8500c4e73ecadeb0c354f07a6375eceb4d9/osspecifics/osspecifics_windows.go#L62
Then make a pull request.