Microsoft Virtualization Discussions

Wwpn parameter is not available for Data ONTAP 9.0 and up

StorageNob
4,968 Views

Hello,

 

Pardon if I'm rehashing an old thread.  Got a customer who has adopted the position that WWPNs can never be randomly generated and must be deterministic. 

 

I am automating several tasks for them in powershell and have come accross a problem trying to change the WWPN of a LIF. I get a warning message about the parameter being unavaliable for ONTAP 9.0 and newer.

 

Does any know of another automated method to change WWPN? I'd like to tell them it will have to be random, but can't unless it's basically impossible.

 

Thanks

 

 

1 ACCEPTED SOLUTION

donny_lang
4,797 Views

Yeah, I get the same error in my lab. Not sure why they decided to remove that particular functionality from the PSTK. In any case, you could use the Invoke-NcSsh cmdlet to run the native ONTAP CLI commands needed to change the WWPN. Something like this:

New-NcNetInterface -Vserver svm_test -Name lif_test -Role data -Dataprotocols fcp -Node labnode1 -Port 1a -AdministrativeStatus down
Invoke-NcSsh -Command "set -priv advanced;y;vserver fcp portname set -vserver svm_test -lif lif_test -wwpn 20:01:00:a0:98:00:af:01"
Set-NcNetInterface -Vserver svm_test -Name lif_test -AdministrativeStatus up

Of course, I'd probably want to flesh this out with some variables and and error-checking to make this easier to duplicate for different SVMs/ports/LIFs/etc. but the basics are there. 🙂

 

ZAPI also has the "net-interface-modify-iter" API call which includes the "WWPN" attribute, so you could likely make a native API call to handle this as well (using the Invoke-NcSystemApi command) if you'd rather not use SSH. 

 

Donny

 

View solution in original post

6 REPLIES 6

donny_lang
4,941 Views

Hi, can you provide the following information:

 

1. ONTAP version
2. PS Toolkit version

3. Command you're running to change the LIF's WWPN

4. Error output generated by the command

 

That'll allow us to help out a lot more easily - thanks! 

StorageNob
4,856 Views

1. ONTAP version 9.5P6

2. PS toolkit 9.6

3. New-NcNetInterface -Vserver svm_test -Name lif_test -Role data -Dataprotocol fcp -Node labnode1 -Port 1a -Wwpn 20:01:00:a0:98:00:af:01 -AdministrativeStatus up

 

4. Warning Wwpn parameter is not available for Data ONTAP 9.0 and up.

 

 

donny_lang
4,798 Views

Yeah, I get the same error in my lab. Not sure why they decided to remove that particular functionality from the PSTK. In any case, you could use the Invoke-NcSsh cmdlet to run the native ONTAP CLI commands needed to change the WWPN. Something like this:

New-NcNetInterface -Vserver svm_test -Name lif_test -Role data -Dataprotocols fcp -Node labnode1 -Port 1a -AdministrativeStatus down
Invoke-NcSsh -Command "set -priv advanced;y;vserver fcp portname set -vserver svm_test -lif lif_test -wwpn 20:01:00:a0:98:00:af:01"
Set-NcNetInterface -Vserver svm_test -Name lif_test -AdministrativeStatus up

Of course, I'd probably want to flesh this out with some variables and and error-checking to make this easier to duplicate for different SVMs/ports/LIFs/etc. but the basics are there. 🙂

 

ZAPI also has the "net-interface-modify-iter" API call which includes the "WWPN" attribute, so you could likely make a native API call to handle this as well (using the Invoke-NcSystemApi command) if you'd rather not use SSH. 

 

Donny

 

StorageNob
4,784 Views

Thanks for the reply, that's very helpful.

 

Just started testing. Putty is installed on the machine.

 

I'm getting an error:

Invoke-NcSsh : The system cannot find the file specified

 

Import-Module DataONTAP

Connect-NcController (ip addr)

Then your command with proper svm and wwpn entered.

 

Can I run that commandlet while authenticated to the Cluster Management SVM? It's having a problem with the command itself. 

StorageNob
4,774 Views

Ok, 

 

This solution worked, I just needed to ensure plink.exe (which is typically in C:\Program files(x86)\Putty) was copied over to the C:\Windows.

 

Thank You

donny_lang
4,772 Views

Glad you got it sorted, thanks for following back up with the solution! 

Public