VMware {code} Community
heupch
Contributor
Contributor

Using API to find all Files belonging to a VirtualMachine

Hello,

I am currently trying to find a way to use the API to receive information about all files  that belong to a certain virtual machine I am basically looking for the files listet here http://www.vmware.com/support/ws55/doc/ws_learning_files_in_a_vm.html (plus 1 or 2 more..).

However, I cannot find all the information i would like to have. To be more specific: I am missing the information on files with the following endings

- .vmxf

- .log

- .vmsd

- .vmem

- .hlog

I know, that I can find information about the .vmxf and .hlog files (maybe also the vmem - I didn't check that yet), I would however prefer to receive the information from the API (basically the only information I need is the file's location, which would in case of the .vmxf file be the property "extendedConfigFile"). I can also see, that log files might not be noted in any meta-information about the vm.

However, if there is a way to get some of the files I listed for a virtual machine via an API call, it would be great if you guys could point me at the right direction.

Thanks a lot in advance for any answers.

Chris

0 Kudos
3 Replies
heupch
Contributor
Contributor

Sorry, i meant:

"I know, that I can find information about the .vmxf and .hlog files (maybe also the vmem - I didn't check that yet), in the vmx-file of the virtual machine"

0 Kudos
BenN
Enthusiast
Enthusiast

Check out the 'layoutEx' property of a VirtualMachine, which is a VirtualMachineFileLayoutEx:

     http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.vm.FileLayoutEx.html

Note, though, that the page you link to is for VMware Workstation, whereas this forum is for VMware vSphere. Many of the files are

the same, but the vSphere API is not supported by Workstation.

heupch
Contributor
Contributor

Hello BenN,

thanks a lot for your quick answer! This is exactly what i was looking for.

Best regards,

Chris

0 Kudos