Fixed error when attempting to access datastore

Encountered this when trying to spin up kubernetes cluster on vsphere. More changes may be needed.