kevinols
Contributor
Contributor

VixDiskLib_Open fails in VDDK 7.0 using a vmPath in the vmxSpec

With VDDK 6.7.3 I could successfully call VixDiskLib_Open using a vmPath in the vmxSpec. In 7.0 I get the following errors:

VixDiskLib: VixDiskLib_OpenEx: Open a disk.

VixDiskLib: VixDiskLib_OpenEx: Failed to start session. Invalid search specifier: vmPath:/Shavlik/vm/ESXI6.7-QA-W2K16X64-1 at 5736.

VixDiskLib: VixDiskLib_Open: Cannot open disk [ESXi6.7] ESXI6.7-W2K16X64-1/ESXI6.7-W2K16X64-1-000002.vmdk. Error 1 (Unknown error) at 5813.

If I use a moref in the vmxSpec in 7.0, VixDiskLib_Open succeeds.

Was the ability to specify a vmPath in the vmxSpec deliberately removed in 7.0 or is this a bug that will be fixed?

0 Kudos
3 Replies
bourne83
Contributor
Contributor

The same question.

0 Kudos
bigmaverick
Contributor
Contributor

@kevinols @bourne83  could you find a solution how to use vmPath in VixDiskLib_Open?

Tags (1)
0 Kudos
goppi
Enthusiast
Enthusiast

I don't think this is possible any longer.

You have to use moRef or reference the vm with the following string:

<vmxFile>?dcPath=<dataCenter>&<dataStore>

Example:

myVmName.vmx?myDatacenterName&myDatastoreName.

if you want to connect to ESXi directly and not via VCSA use the string "ha-datacenter" for data center name.

The VDDK documentation really sucks - sorry!

0 Kudos