Hi,
I wonder how can I discover the esx host from a call or a command to vSphere 6.0.0, Linux from the VM name.
Possibly via vSphere API, govc, pyvmomi, perl SDK ![]()
Regards, GQ
I don't understand what exactly you're asking here. There are multiple ways to discover ESXi hosts through vCenter. You need to be much more specific as to what you're trying to do, with what, and how.
Sorry, I forgot to said from a VM name
an expected input/output :
-------8<-----------------------
any_command --vm VM-NAME --server vc1.example.com
[...]
esx42.example.com
[...]
-------8<-----------------------
Sure, from PowerCLI it's as easy as a
get-vm -name <name> | Get-VMHost
But I said from a Linux box ![]()
Ever heard of PowerShell core?
No, never, any good pointer link ?
Found myself :
text: govc vm.info VM
json: govc vm.info -json=true VM > /tmp/file.json
No, never, any good pointer link ?
Maybe click the link in my previous reply?
