
수많은 VMWare VM의 "하드웨어" 버전을 확인하려고 합니다. vSphere 콘솔에 액세스할 수 없습니다.
VMWare 도구 서비스가 설치되어 있고 C:\Program Files\VMWare\VMWare Tools\vmtoolsd.exe --cmd "info-get"
유망해 보이지만 지정할 키 이름에 대한 세부 정보를 찾을 수 없습니다.
VMWare 장치 드라이버 버전을 확인하거나 쿼리하는 것과 같은 다른 방법이 있습니까 wmic
?
답변1
이론적으로는 당신이 요구하는 것이 가능해야 합니다.
그러나 VMWare에서는 특별히 잘 구현되지 않은 것으로 보입니다.
확장 옵션은 올바르게 말한 대로 VMToolsd.exe를 사용하여 게스트에서 쿼리할 수 있어야 합니다. 그러나 그것은 작동하지 않는 것 같습니다.
vmtoolsd.exe --cmd "info-get virtualHW.version"
vmx 파일에 포함된 하드웨어 버전을 반환해야 하지만 그렇지 않습니다.
Simonbaev가 작성한 이 스레드의 게시물은 게스트로부터 이 정보를 쿼리할 수 있도록 하이퍼바이저 수준 변경이 필요한 문제를 강조하는 것 같습니다. https://communities.vmware.com/message/2184934
$ vmware-cmd --config esxi-24 "[DS_104.24_150] LTSP2/LTSP2.vmx" setguestinfo myTest "hello world"
setguestinfo(myTest hello world) = 1
$ vmware-cmd --config esxi-24 "[DS_104.24_150] LTSP2/LTSP2.vmx" getguestinfo myTest
getguestinfo(myTest) = hello world
$ vmtoolsd --cmd "info-get guestinfo.myTest"
No value found
$ vmtoolsd --cmd "info-get myTest"
Invalid key name supplied
$ vmware-cmd --config esxi-24 "[DS_104.24_150] LTSP2/LTSP2.vmx" setguestinfo guestinfo.myTest "bla-bla-bla"
setguestinfo(guestinfo.myTest bla-bla-bla) = 1
$ vmware-cmd --config esxi-24 "[DS_104.24_150] LTSP2/LTSP2.vmx" getguestinfo guestinfo.myTest
getguestinfo(guestinfo.myTest) = bla-bla-bla
$ vmtoolsd --cmd "info-get guestinfo.myTest"
bla-bla-bla
이는 필요할 때 해당 정보를 표시하려면 가상화 팀의 도움이 필요하다는 의미입니다.
그러나 그 시점에서는 모든 프로덕션 서버의 구성 파일을 해킹할 필요가 없는 방식으로 해당 정보를 추출하는 스크립트를 실행하도록 할 수도 있습니다(아마도 모두 재부팅해야 할 수도 있음).
예를 들어 PowerCLI에서
Get-VM | Get-VMAdvancedConfiguration -key virtualHW.version