Sumit Murari
Sumit Murari

Reputation: 1689

Find disk attached to vm using govc

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 ??

Upvotes: 3

Views: 5310

Answers (2)

Sumit Murari
Sumit Murari

Reputation: 1689

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>

Upvotes: 3

Abhijeet Kasurde
Abhijeet Kasurde

Reputation: 4117

You can also get information about devices using

$ govc device.info -vm VirtualMachineName

Upvotes: 2

Related Questions