VMware Cloud Community
MRoushdy
Hot Shot
Hot Shot

mount an existing NFS datastores to a new host

Hello, I want to perform this without using the "new-datastore" command, I want to perform it as we do from the vSphere webclint, just by rightclicking the datastore and select "Mount ao another host", so I want to do it like this in PowerCLi. is it doable?

vEXPERT - VCAP-DCV - Blog: arabitnetwork.com | YouTube: youtube.com/c/MohamedRoushdy
Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership

I'm afraid that is functionality that the Web Client offers.

Under the covers it fetches the NFS settings from the ESXi node, and then creates a new NFS datastore on the target ESXi node(s).

It's ultimately just a number of New-Datastore cmdlets executed on the selected ESXi node(s)


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
MRoushdy
Hot Shot
Hot Shot

Okay. I tried to export NFS info to csv, but the value for "remotehost" is "system.string[]" instead of IP, how could I fix this please?

vEXPERT - VCAP-DCV - Blog: arabitnetwork.com | YouTube: youtube.com/c/MohamedRoushdy
Reply
0 Kudos
LucD
Leadership
Leadership

That means you have an array instead of a scalar in RemoteHost.

How did you do the export?
Can you share the script?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos