Forum Discussion

andrea_moccia's avatar
3 years ago
Solved

Mount a VVOL datastore

Hello all, I'm trying to mount a VVOL datastore using Mount-PfaVvolDatastore - https://blog.purestorage.com/uncategorized/mounting-a-vvol-datastore-with-powercli/. This is working fine on windows but I need to do this from a linux container and having issues with the import of PureStorage.FlashArray.VMware. I have no problem importing and using other PowerShell SDK1/SDK2 modules on the container, but I think I need PureStorage.FlashArray.VMware to mount VVOL, or is there another recommended way of doing this? First error I get is about loading of PureStorage.FlashArray.VVol - see below. I can work around this by pointing directly to the psd1 but then it fails to load PureStorage.FlashArray.VMware.vVol.Replication.psm1 and even manually pointing to the psd1/psm1 doesn't seem to help.

  • found an alternative way of doing this, so I am good, thanks Alex $esxhost = get-vmhost _hostname_ $vvolname = "_vvol_ds_name_" $vvol = Get-Datastore $vvolname $id = $esxhost.ID.Split("-")[-1] $hds="HostDatastoreSystem-datastoreSystem-"+$id $spec = New-Object VMware.Vim.HostDatastoreSystemVvolDatastoreSpec $spec.Name = $vvol.Name $spec.ScId = $http://vvol.ExtensionData.Info|vvol.ExtensionData.Info.Url.Split("/")[5] $_this = Get-View -Id $hds $_this.CreateVvolDatastore($spec)
  • Mount-PfaVvolDatastore -vasaArray $vasaArray -cluster $cluster -datastoreName "VVOL" Exception: Please either pass in one or more FlashArray connections or create connections via the new-PfaConnection cmdlet.
  • looks like it's looking for a connection to flasharray. Which iks strange. From Windows this command works just fine without need to establish a connection to FA
  • In the past with Core I've had to do the new-pfa workflow and either set it as the default array or set it as the variable.
  • oh, but I think technically the pure powershell sdk still has some wonkiness with it with core vs the windows version.
  • mmh even if I set the default array or if I pass the flasharray variable it doesn't work, as it's not expecting it when passing the -vasaarray *PS /runner> $Global:DefaultFlashArray* Disposed : False EndPoint : http://oitpurex101lhc.options-it.com|oitpurex101lhc.options-it.com UserName : *** ApiVersion : 1.19 Role : ArrayAdmin ApiToken : 7c03e48c-731d-fb4d-24ce-881f07677cfa *PS /runner> $fa* Disposed : False EndPoint : http://oitpurex101lhc.options-it.com|oitpurex101lhc.options-it.com UserName : *** ApiVersion : 1.19 Role : ArrayAdmin ApiToken : 7c03e48c-731d-fb4d-24ce-881f07677cfa *PS /runner> Mount-PfaVvolDatastore -vasaArray $vasaArray -cluster $cluster -datastoreName "VVOL" -flasharray $fa* Mount-PfaVvolDatastore: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided. *PS /runner> Mount-PfaVvolDatastore -vasaArray $vasaArray -cluster $cluster -datastoreName "VVOL"* Exception: Please either pass in one or more FlashArray connections or create connections via the new-PfaConnection cmdlet.
  • found an alternative way of doing this, so I am good, thanks Alex $esxhost = get-vmhost _hostname_ $vvolname = "_vvol_ds_name_" $vvol = Get-Datastore $vvolname $id = $esxhost.ID.Split("-")[-1] $hds="HostDatastoreSystem-datastoreSystem-"+$id $spec = New-Object VMware.Vim.HostDatastoreSystemVvolDatastoreSpec $spec.Name = $vvol.Name $spec.ScId = $http://vvol.ExtensionData.Info|vvol.ExtensionData.Info.Url.Split("/")[5] $_this = Get-View -Id $hds $_this.CreateVvolDatastore($spec)