Creating datastore using devicepath

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Creating datastore using devicepath

I get errors while trying to query the VMFS datastore options. Below is the code i am using which is throwing an error.

def createDatastore(si, uuid):
    dp="/vmfs/devices/disks/"+ str(uuid)
    print "Device path: %s" %dp
        vmfs_ds_options =
    except vim.fault.NotFound:
        print "Not found"
    except vim.fault.HostConfigFault:
        print "host config fault"
    except vmodl.fault.NotSupported:
        print "Not supported"
    except Exception as e:
        print ("Unexpected error: %s" %e)

        print "Query success"

# python -s -u root -p Abcd123! --uuid eui.3221784b198087db8ccb707400000001
Device path: /vmfs/devices/disks/eui.3221784b198087db8ccb707400000001
Unexpected error: _InvokeMethod() takes at least 2 arguments (1 given)

From the documentation here (, the function takes only 2 arguments and the second is optional.  I get the same error if add the vmfsMajorVersion argument to the function. Am i missing something ?