Hyper-V
Get the Physical Host name of a Virtual Machine - easy identify host name
Looking the following registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters is easy to find the physical hostname
https://gallery.technet.microsoft.com/scriptcenter/Get-the-Physical-Host-name-1e3485bd

VMware
How to extract host information from within a VM?
From time to time, I see this question come up asking how one might be able to extract a certain piece of information from either ESX(i) or the management APIs (vSphere API) from within a virtual machine. The simple answer is you can not, by default the guest operating system has no idea of the underlying hypervisor nor does it have the access to the management APIs. This of course, assumes you are following VMware's best practices in isolated and segregating off your management network from your virtual machine network.

Having said that, there are certain bits of information that you can extract about your ESX(i) host from within the guestOS using some of the utilities that is installed with VMware Tools.
https://www.virtuallyghetto.com/2011/01/how-to-extract-host-information-from.html
KVP.
Hyper-V KVP - (key-value-pair) Data Exchange Host to VM
Это механизм, который позволяет обмениваться сообщениями с виртуалкой в виде KeyValuePair через WMI. Но, придётся на виртуалку сначала записать инфу, которую тебе надо достать на хосте
Собсна, именно так сам Hyper-V и получает данные из ВМ, типа айпишника её итд
https://blogs.msdn.microsoft.com/kebab/2014/06/24/sending-messages-and-commands-to-a-hyper-v-virtual-machine-guest-os-using-the-kvp-exchange/

Profile

robopet3

May 2023

S M T W T F S
 12 3456
78910111213
14151617181920
21222324252627
28293031   

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 4th, 2025 01:52 am
Powered by Dreamwidth Studios