Because of the non-atomicity of 'exists? ... QueryAvailableDisksForVmfs() ... CreateVmfsDatastore()' [1] a vCenter-initiated rescan_vmfs might have found the datastore and mounted it or [2] another host might have initiated CreateVmfsDatastore() before this call gets made. So it would be good to have some kind of rescue... at least

    rescue RbVmomi::VIM::DuplicateName # cover case [1]

I don't know what would happen if another host has a CreateVmfsDatastore() in progress on the device.