|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: ConvertTo-NaVhdx
NAME
ConvertTo-NaVhdx
SYNOPSIS
Convert a VMDK file, a fixed VHD file, or a Data ONTAP LUN into a VHDX file.
SYNTAX
ConvertTo-NaVhdx [-SourceVhd] <String> [[-DestinationVhdx] <String>] [-Block
Size <String>] [-Controller <AbstractController>] [<CommonParameters>]
ConvertTo-NaVhdx -SourceVmdk <String> [[-DestinationVhdx] <String>] [-BlockS
ize <String>] [-Win2k3ScsiToIde] [-FollowParent] [-Controller <AbstractContr
oller>] [<CommonParameters>]
ConvertTo-NaVhdx -SourceLun <String> [[-DestinationVhdx] <String>] [-BlockSi
ze <String>] [-Controller <AbstractController>] [<CommonParameters>]
ConvertTo-NaVhdx -SourceDiskIndex <UInt32> [[-DestinationVhdx] <String>] [-B
lockSize <String>] [-Controller <AbstractController>] [<CommonParameters>]
DESCRIPTION
Convert a VMDK file, a fixed VHD file, or a Data ONTAP LUN into a VHDX file.
A VMDK file must be of type "vmfs", "monolithicFlat", or "twoGbMaxExtentFlat
".
When converting from a Data ONTAP LUN, the destination VHD file must reside
on a different LUN in the same volume.
The source and destination files must reside inside of a Data ONTAP volume (
accessed using a path starting with /vol/<volname>), a Data ONTAP attached L
UN, or a Data ONTAP CIFS share (accessed using a mapped network drive or a U
NC path starting with \\hostname\<share>). The source and destination files
must reside on the same controller and volume.
If the controller supplied in the Controller parameter is not the controller
containing the files, the cmdlet consults the credentials cache and attempt
s to connect via HTTPS. If credentials are not present in the credentials c
ache, an attempt to connect via RPC is made. If a connection cannot be made
, the cmdlet will fail.
PARAMETERS
-SourceVhd <String>
Absolute path to a fixed VHD file to convert to a VHDX file.
The path can be a path to a file on a Data ONTAP LUN, a path to a file o
n a Data ONTAP CIFS share (either a mapped network drive, or a UNC path
starting with \\hostname\share), or a path to a file on a Data ONTAP con
troller (starting with /vol/<volname/).
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-DestinationVhdx <String>
Absolute path to the destination VHDX file. The file must not yet exist
. If not specified and the source is either a VHD or VMDK, the destinat
ion VHDX will be created in the same directory alongside the source.
The path can be a path to a file on a Data ONTAP LUN, a path to a file o
n a Data ONTAP CIFS share (either a mapped network drive, or a UNC path
starting with \\hostname\share), or a path to a file on a Data ONTAP con
troller (starting with /vol/<volname/).
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
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? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Controller <AbstractController>
The Data ONTAP controller object, embodied by an NaController object. T
his parameter is returned by the Connect-NaController cmdlet. If not sp
ecified, the value in the global variable CurrentNaController is used.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SourceVmdk <String>
Path to the source VMDK file. The VMDK file must be of type "vmfs", "mo
nolithicFlat", or "twoGbMaxExtentFlat".
The path can be a path to a file on a Data ONTAP LUN, a path to a file o
n a Data ONTAP CIFS share (either a mapped network drive, or a UNC path
starting with \\hostname\share), or a path to a file on a Data ONTAP con
troller (starting with /vol/<volname/).
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Win2k3ScsiToIde
Use this switch when converting a Windows Server 2003 SCSI VMDK to VHDX.
When specified, the cmdlet will perform the necessary steps to ensure
the required IDE drivers are present on the virtual disk.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-FollowParent
If specified, the parser will follow the VMDK parent descriptor and use
the base VMDK for the clone operation.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SourceLun <String>
Path of a LUN to convert to a VHDX file. Must start with /vol/<volname>
/. The following LUN types are supported: windows_2008, hyper_v, linux,
aix, hpux, netware, vmware, xen
Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-SourceDiskIndex <UInt32>
A Windows disk index of the disk to convert to a VHD. The disk index mu
st reference a Data ONTAP LUN or the cmdlet will fail.
Required? true
Position? named
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>ConvertTo-NaVhdx -SourceVhd F:\VHD\win2k8r2.vhd -DestinationVhdx F:\VH
DX\win2k8r2.vhdx
Convert a VHD file to a VHDX file.
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 8/16/2012 3:05 PM 26847739904 win2k8r2.vhdx
-------------- Example 2 --------------
C:\PS>ConvertTo-NaVhdx -SourceVMDK X:\VMDK\Monolithic\win2k8r2.vmdk -Destina
tionVhdx X:\VHDX\win2k8r2.vhdx
Convert a VMDK file in a CIFS share into a VHDX file.
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 8/16/2012 3:00 PM 26847739904 win2k8r2.vhdx
-------------- Example 3 --------------
C:\PS>ConvertTo-NaVhdx -SourceVMDK /vol/vol2/cifs/VMDK/Monolithic/win2k8r2.v
mdk -DestinationVhdx /vol/vol2/cifs/VHDX/win2k8r2.vhdx
Performs the same operation as Example 2, except it uses the direct path on
the controller to the file. This is useful if there is no CIFS share provid
ing access to the VMDK file.
Name Type Size Created M
odified Owner Group Perm Empty
---- ---- ---- ------- -
------- ----- ----- ---- -----
/vol/vol2/cifs/VHDX/win2k8r2.vhdx file 25 GB 8/16/2012 8/
16/2012 0 0 1077
-------------- Example 4 --------------
C:\PS>ConvertTo-NaVhdx -SourceLun /vol/vol2/luns/lun0 -DestinationVhdx F:\VH
DX\fromLUN.vhdx
Convert the Data ONTAP LUN into a VHDX.
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 8/16/2012 3:38 PM 10775166976 fromLUN.vhdx
RELATED LINKS
ConvertTo-NaVmdk
| Copyright © 2013 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|