VMware {code} Community
drdamour
Contributor
Contributor
Jump to solution

Can i get the the ESX display name property via VIX?

I can't seem to figure out how to get the display name property of a VirtualMachine hosted on an ESX server via VIX. Is there a property i can pass to get Properties to get this?

0 Kudos
1 Solution

Accepted Solutions
lemke
VMware Employee
VMware Employee
Jump to solution

Yes, that's part of the problem; its currently unsupported which is why its not visible.

View solution in original post

0 Kudos
4 Replies
lemke
VMware Employee
VMware Employee
Jump to solution

VIX_PROPERTY_VM_NAME should be the property to use, but unless I'm missing something in the code, its not properly hooked up for ESX. A bug has been filed.

0 Kudos
drdamour
Contributor
Contributor
Jump to solution

I don't see VIX_PROPERTY_VM_NAME in the SDK, do you know what the integer value of it would be (and where would i go look this up).

From vix.h:

/* VIX_HANDLETYPE_VM properties */

VIX_PROPERTY_VM_NUM_VCPUS = 101,

VIX_PROPERTY_VM_VMX_PATHNAME = 103,

VIX_PROPERTY_VM_VMTEAM_PATHNAME = 105,

VIX_PROPERTY_VM_MEMORY_SIZE = 106,

VIX_PROPERTY_VM_READ_ONLY = 107,

VIX_PROPERTY_VM_IN_VMTEAM = 128,

VIX_PROPERTY_VM_POWER_STATE = 129,

VIX_PROPERTY_VM_TOOLS_STATE = 152,

VIX_PROPERTY_VM_IS_RUNNING = 196,

VIX_PROPERTY_VM_SUPPORTED_FEATURES = 197,

VIX_PROPERTY_VM_IS_RECORDING = 236,

VIX_PROPERTY_VM_IS_REPLAYING = 237,

0 Kudos
lemke
VMware Employee
VMware Employee
Jump to solution

Yes, that's part of the problem; its currently unsupported which is why its not visible.

0 Kudos
wslpkers
Contributor
Contributor
Jump to solution

Hey drdamour,

I'm a little unsure about ESX, but a Virtual Machine under Virtual Server 1 and 2 has a VMX file which contains a "displayName" property. You can obtain this by using the "ReadVariable" method of the VM object (VixVM_ReadVariable) using VIX_VM_CONFIG_RUNTIME_ONLY (2).

Hope this helps at all

0 Kudos