VMware Solutions Discussions

Highlighted

NetApp VSC Powershell Toolkit

All,

Some of you are familiar with our previous "kamino" powershell cmdlets/module.  The problem with that is that is was focused on one particular functional area of VSC:   Provisioning & Cloning.

That simply does not scale well.

So we went back to the drawing board, and did some renaming of the code.

Caveats:

  • Functionally, these are identical actions to the previous kamino cmdlets.
  • We have renamed things to be more generic, or all-encompassing, as we begin down the path of adding APIs for many tasks in the VSC.
  • We understand that many of you already have scripts in place using the older stuff, but please understand, all you need to change is the module that gets loaded, and the cmdlet names used.

Going forward:

  • As we add new APIs to VSC, we will also be adding equivalent cmdlets for that functionality.

If you have any questions, or run into any issues with the toolkit/module, please post them here!

Usage:

PS> Import-Module C:\Path-to-DLL\NetAppVSC.dll

PS> Get-Command -Module NetAppVSC

CommandType     Name

-----------     ----

Cmdlet          Connect-vsc

Cmdlet          Get-vscManagedObjectRef

Cmdlet          Get-vscVirtualMachine

Cmdlet          Get-vscVmFileSpec

Cmdlet          New-vscControllerSpec

Cmdlet          New-vscDatastore

Cmdlet          Remove-vscDatastore

Cmdlet          Set-vscDatastoreSize

Cmdlet          Start-vscClone

Cmdlet          Start-vscRedeploy

Thanks!

UPDATE:  Due to some inconsistencies we have found with the .dll (we think compiling corruption on the final build) we've pulled this down temporarily so that it doesn't proliferate further, and will get a new version up ASAP.  Please remember that this isn't something officially sanctioned by NetApp, but something that 1 or 2 of us are doing in our spare time.  Thank you for your patience, and we'll get it back very soon, I promise!

UPDATE: I am posting the original rebranded toolkit!  Please let know how this works!


-Nick

35 REPLIES 35
Highlighted

Re: NetApp VSC Powershell Toolkit 1.0

I have VSC 4.1 installed on our vCenter Server 4.1 U3 box. Will this toolkit allow me to create scripts for cloning out a development environment of several VMs? Do you know of any documentation or example scripts to get me started? I noticed there is no documentation in the zip file.

Thanks,

Daniel

Highlighted

Re: NetApp VSC Powershell Toolkit 1.0

Hey,

I'm unable to import this module to use it with powershell, I think that is because it is missing some files like the module manifest, and file that define the types..

Can you upload the full powershell module or explaine how can I use the files I have downloaded here?

Thank you,

Chen.

Highlighted

Re: NetApp VSC Powershell Toolkit 1.0

What Chen said!

Highlighted

Re: NetApp VSC Powershell Toolkit 1.0

Hi there,

Is there any doco on these cmdlets outside of the Get-Help options in PowerShell?

We're having issues with vCenter and VSC 4.1, the main one being an issue with the bootsPerMinute option breaking when we try to create clones.

Thanks

Pete

Highlighted

Re: NetApp VSC Powershell Toolkit 1.0

+1 What Chen said!

I think there's some stuff missing...

You're zip file is just the NetAppVSC.dll file...

The Connect-VSC cmdlet doesn't work... The Kamino version does:

The type initializer for 'com.netapp.vsc.cmdlets.Connectvsc' threw an exception.

Highlighted

Re: NetApp VSC Powershell Toolkit 1.0

Hey guys,

Thanks for the feedback!  Just wanted to let you know that we're checking into this and will get a new version up soon!

-Nick

Highlighted

Re: NetApp VSC Powershell Toolkit 1.0

Hi Nick,

Thanks for the reply. Do you have a rough eta? Also, can you make sure that it has the bootsperminute thing included in it?

Thanks

Pete

Highlighted

Re: NetApp VSC Powershell Toolkit 1.0

UPDATE:  Due to some inconsistencies we have found with the .dll (we think compiling corruption on the final build) we've pulled this down temporarily so that it doesn't proliferate further, and will get a new version up ASAP.  Please remember that this isn't something officially sanctioned by NetApp, but something that 1 or 2 of us are doing in our spare time.  Thank you for your patience, and we'll get it back very soon, I promise!

Highlighted

Re: NetApp VSC Powershell Toolkit 1.0

Good Day!


First off, thank you for doing this in your spare time.  Scripting these kinds of tasks saves everyone time once the scripts are written.


My question: I am looking for a way to "Set Recommended Values" (Open NetApp tab in vCenter -> Right Click Host -> Set Recommended Values) via a script.  Would this PowerShell toolkit allow for that setting?


Alternatively, I can set the advanced settings with the VMware PowerCLI, but my concern is there is something being set with the "Set Recommended Values" that I would be missing by setting the advanced settings manually.


Thank you again for your efforts in creating this Powershell toolkit.  It is very much appreciated and I look forward to seeing the updated link.

Highlighted

Re: NetApp VSC Powershell Toolkit 1.0

DL,

Not yet.  This is a baseline Toolkit that we basically rebuilt from the legacy 'kamino' kit some of you may remember, which only contained the few pieces with APIs already from Provisioning & Cloning.  We also added some new .cs files for the vCloud APIs, which I think is where we ran into problems.

The M&HC section is going to have some APIs that we'll be able to code against (either C# or PS directly) so once those are there, we'll be able to do what you're after.

My hold up currently is trying to mess around with Windows 8, and lost a hard drive in my laptop that had my Windows 7 VM (with my Visual Studio) so trying to get all that rebuilt so we can continue.

-Nick

Highlighted

Re: NetApp VSC Powershell Toolkit 1.0

Since our corporate standard will be to migrate from agent-based backups to VSC-based snapshots, are there plans to be able to script any pieces of the Backup and Recovery component?

Are there any plans to formalize and support the PowerShell toolkit or will this continue to be an unsupported add-on?

Thanks!

Highlighted

Re: NetApp VSC Powershell Toolkit 1.0

ewilts,

There IS a hidden cli that we like to call 'smvicli' where you can execute some things against the VSC service to trigger backup workflows.  You can find any and all documentation on this in in Install and Admin Guide.

As far as the powershell toolkit is concerned, there are no APIs for it yet, so nothing for us to extend unfortunately.  It is something that will come in the future, but we are currently in a bit of a transition period where we're moving from the thick C# vSphere client to the Web GUI.   I think once we see how things come together with the webGUI, adding an underlying WSDL to write powershell against will be pretty straight-forward.   Seemingly all about time and patience right now.

As far as I know, none of NetApp's powershell addon's/Toolkits fall into the "supported" bracket, even though they're all used very heavily. 

Highlighted

Re: NetApp VSC Powershell Toolkit 1.0

All, please note that the original package has been re-added to the first post.  This is simply the re-branding effort of the original kamino toolkit, as stated, and look for further updates as we add more functionality/APIs into the VSC!

Sorry for taking so long to get this back out here!  Some extreme circumstances took place.

-Nick

Highlighted

Re: NetApp VSC Powershell Toolkit

Hey Nick,

Quick question, I have an unknown controller that is marked as Skipped that we cant removed I have tried, unsetting the Skipped value, tried right click Delete Controller and get an alert saying you cannot delete this controller.

I was wondering, is there a way to remove an unknown, skipped controller? I found a perlscript to remove hosts from vCenter when they are on zombie state and was hoping the Toolkit may have a command to remove controller or something that will allow me to remove it for good!!!

PS: This is not a NetApp controller, it was a CentOS server running NFS that we mounted a while ago so we could copy some virtual machines while rebuilding the host hosting these VMS.

Thanks!!!

Carol

Highlighted

Re: NetApp VSC Powershell Toolkit

Hi All,

*Note that you would need to update "10.61.167.168" with your VSC IP Address in the NetAppVSC.dll.config file.

        <com.netapp.vsc.Properties.Settings>

            <setting name="NetApp_vsc_ApiImplService" serializeAs="String">

                <value>https://10.61.167.168:8143/kamino/public/api</value>

            </setting>

            <setting name="NetApp_vsc_ApiImplService" serializeAs="String">

                <value>https://10.61.167.168:8143/kamino/public/api</value>

            </setting>

        </com.netapp.vsc.Properties.Settings>

        <com.netapp.vsc.Properties.Settings>

            <setting name="NetApp_vsc_ApiImplService" serializeAs="String">

                <value>https://10.61.167.168:8143/kamino/public/api</value>

            </setting>

        </com.netapp.vsc.Properties.Settings>

Regardless of updating the IP it still got a 404 using this .dll (even though the object exists, can be browsed in the vcenter MOB and connected to via kamino).

Get-vscManagedObjectRef : The request failed with HTTP status 404: Not Found.

At line:1 char:24

+ Get-vscManagedObjectRef <<<<  "Sydney" Datacenter

    + CategoryInfo          : InvalidOperation: (com.netapp.vsc.vscServer:vscServer) [Get-vscManagedObjectRef], WebExc

   eption

    + FullyQualifiedErrorId : ApiError,com.netapp.vsc.cmdlets.GetvscManagedObjectRef

The Kamino module works EG:

PS C:\> import-module kamino
PS C:\> Connect-Kamino -VCenterHost $ipAddress -Credential $credentials


VCenterHostname    : XX.XX.XX.XX
VCenterAddress     : XX.XX.XX.XX
VCenterCredentials : System.Net.NetworkCredential
ServiceHostname    :
ServiceAddress     : XX.XX.XX.XX
VCenterVersion     : 5.1.0

PS C:\> Get-KaminoManagedObjectRef "Sydney" Datacenter
Datacenter:datacenter-2

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Check out the KB!
NetApp Insights To Action
All Community Forums