Microsoft Virtualization Discussions

Powershell Toolkit Copy-NAHostFile error: Integer value out of range

GRIMSTONER
4,673 Views

We use a Windows Cluster Shared Volume to host all of our VM's vhdxs. On our FAS2240's, we used to be able to use Copy-NAHostFile in order to make quick copies of a golden master vhdx.

 

After moving the Cluster Mode (8.2), whenever I try to do this, I get this error:

 

PS C:\Windows\system32> Copy-NaHostFile "C:\ClusterStorage\Volume2\w2k12r2gui-sysprep.vhdx" "C:\ClusterStorage\Volume2\devops.vhdx"
Copy-NaHostFile : Integer value 125837312 out of range [1..2^24] for block-count
At line:1 char:1
+ Copy-NaHostFile "C:\ClusterStorage\Volume2\w2k12r2gui-sysprep.vhdx" "C:\ClusterS ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Copy-NaHostFile], EINVALIDINPUTERROR
    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Toolkit.Windows.CopyNaHostFile

Using version 4.1 of the Powershell Toolkit, on Windows Server 2012. 

1 ACCEPTED SOLUTION

GRIMSTONER
4,627 Views

I read somewhere that Copy-NAHostFile is synonymous (as a Powershell alias?) with Copy-NCHostfile, and, since I couldn't find the Copy-NCHostFile command, I used the NA version.

 

I've since noticed that I need to manually Import-Module in order to get access to the Copy-NCHostFile command.

View solution in original post

3 REPLIES 3

asulliva
4,670 Views

You'll want to switch to using the clustered Data ONTAP version of the cmdlet: Copy-NcHostFile.

 

Andrew

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

GRIMSTONER
4,628 Views

I read somewhere that Copy-NAHostFile is synonymous (as a Powershell alias?) with Copy-NCHostfile, and, since I couldn't find the Copy-NCHostFile command, I used the NA version.

 

I've since noticed that I need to manually Import-Module in order to get access to the Copy-NCHostFile command.

ChanceBingen
4,615 Views

That's strange. With Windows Server 2012 R2 you shouldn't have to import the module if the installer put everything in the right place.

 

At any rate, now that you've upgraded to clustered Data ONTAP 8.2 or newer, you can take advantage of Windwos Server 2012's native copy offload feature called ODX. This will usually offer similar performance to the Copy-NcHostFile Cmdlet.

 

Give it a shot, and let us know how it works for you.

 

 

Public