VMware Cloud Community
ShubhadaS
Contributor
Contributor

mount/unmount datastore and attach/detachLUN with vCO

Hi,

    
We want to mount/unmount datastore and attach/detatchLUN in vCenter with help of vCO workflows.

For unmounting datastore and detatching LUNs I found a scripting methods unmountvmfsvolume(), detachScsiLun() respectively.

Are these correct methods?  If yes, these methods accept lunuuid and vmfsuuid as a parameter. From where I can get these parameters?

Regards,

Shubhada

Reply
0 Kudos
2 Replies
tschoergez
Leadership
Leadership

Hi,

try to use ONYX (labs.vmware.com/flings/onyx) to figure out the proper API methods tasks you do manually via the vSphere Client.

For the ids: See this thread, and the linked discussions there, the storageSystem attribute of the host configuration should bring you to the needed information.

https://communities.vmware.com/thread/465430

Cheers,

Joerg

Reply
0 Kudos
King_Robert
Hot Shot
Hot Shot

To detach a storage device using the vSphere client:

  1. Select on the desired host.
  2. Click the Configuration tab.
  3. Click Storage Adapters.
  4. Click on the applicable host bus adapter.
  5. Right-click on the applicable device.
  6. Click Detach.
  7. Repeat Steps 2-7 for each host that can access the storage device.
Reply
0 Kudos