3

I was looking to find the details of the Virtual Machine using govc.

I was able to fetch the details of the instance using govc vm.info, but the result had details of CPU, Memory, IP Address and other not about disk storage, which I can see on vsphere console or by logging into system.

Is there any using govc to find the disk attached to the instance ??

Abhijeet Kasurde
  • 3,937
  • 1
  • 24
  • 33
Sumit Murari
  • 1,597
  • 3
  • 28
  • 43

2 Answers2

3

I asked this on govc's Github repo.

You can use:

To get <path/to/vm>, use

govc vm.info vm-name-here

To get all the details of the VM

govc ls -l -json <path/to/vm>
Abhijeet Kasurde
  • 3,937
  • 1
  • 24
  • 33
Sumit Murari
  • 1,597
  • 3
  • 28
  • 43
2

You can also get information about devices using

$ govc device.info -vm VirtualMachineName
Abhijeet Kasurde
  • 3,937
  • 1
  • 24
  • 33