|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: New-NaVirtualDisk
NAME
New-NaVirtualDisk
SYNOPSIS
Rapidly create a VHD file on a LUN or CIFS share mounted on a Windows host.
SYNTAX
New-NaVirtualDisk [-FullName] <String> [-Size] <String> [-Controller <Abstra
ctController>] [<CommonParameters>]
New-NaVirtualDisk [-FullName] <String> [-Size] <String> -Vhdx [-Dynamic] [[-
BlockSize] <String>] [-Controller <AbstractController>] [<CommonParameters>]
DESCRIPTION
Rapidly create a VHD file on a LUN or CIFS share mounted on a Windows host.
This cmdlet creates a VHD file between 12 MB and 2040 GB in size. Smaller f
iles are created nearly instantly, while the largest ones typically finish i
n seconds or minutes. The file blocks are zeroed on the Data ONTAP storage
controller using block deallocation, so the VHD file consumes no space until
data is written to it.
This cmdlet can also create a VHDX file between 12MB and 64TB in size. By d
efault the cmdlet will deallocate blocks on the Data ONTAP storage controlle
r, but the -Dynamic switch allows the creation of dynamic VHDX files which w
ill remain block-aligned as they grow.
The file to be created must be specified with a fully-qualified path that re
sides on a Data ONTAP LUN. Cluster-shared volumes (CSVs) are supported. Ad
ministrator privileges are required to use this cmdlet.
In order to create a file on a CIFS share, a connection to the Data ONTAP co
ntroller must be made. If the Controller parameter is not specified and the
global CurrentNaController variable is not present, the cmdlet consults the
credentials cache to attempt to make a connection. If a connection cannot
be made, the cmdlet will fail.
PARAMETERS
-FullName <String>
The fully-qualified name of the VHD file to be created.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Size <String>
Size in bytes of the VHD file to be created.
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Controller <AbstractController>
In order to create a file on a CIFS share, a connection to the Data ONTA
P controller hosting the CIFS share must be made. This parameter is ret
urned by the Connect-NaController or Connect-NcController cmdlet. If no
t present, the value in the global variable CurrentNaController or Curre
ntNcController will be used. If no global variables are present, the cm
dlet consults the credentials cache and attempts to make a connection.
If no connection can be made, the cmdlet will fail.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Vhdx
If specified, the cmdlet will create a VHDX file.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Dynamic
If specified, create a dynamic VHDX file.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-BlockSize <String>
The block size to assign the created VHDX file. The block size defines
the size of each payload chunk inside the VHDX. The block size must be
a power of 2 and at least 1 MB and at most 256 MB.
Required? false
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".
INPUTS
OUTPUTS
System.IO.FileInfo
NOTES
Category: host
-------------- Example 1 --------------
C:\PS>New-NaVirtualDisk j:\vm1.vhd (1tb)
Create a 1TB VHD file on the J: drive.
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 7/22/2011 1:27 PM 1099511624192 vm1.vhd
RELATED LINKS
Get-NaHostDisk
Set-NaVirtualDiskSize
| Copyright © 2013 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|