P_Koetsier
Contributor
Contributor

I looked into this in more detail, and found documentation for the CreateVirtualDisk_Task that it used by the vmkfstools script. It states that the datacenter parameter is only needed when using a datastore path, not when using a "URL referring to the virtual disk to be created.".

I found that using a command like this worked fine:

vmkfstools --server vc.my.domain --vihost esxhost.my.domain --username user --password pwd --createrdmpassthru /vmfs/devices/disks/naa.99999999999999999999999999999999 'https://vc.my.domain/folder/test_directory/test_rdm.vmdk?dcPath=datacenter&dsName=datastore'

Note that the "/folder" string in the URL is part of the syntax, it does not signify a directory in which you want to create the vmdk file. There is more information about the URL syntax here: http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvim.VirtualDiskMa...

Reply
0 Kudos