|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: ConvertTo-NaVmdk
NAME
ConvertTo-NaVmdk
SYNOPSIS
Convert a VHD or VHDX file into a VMDK file.
SYNTAX
ConvertTo-NaVmdk [-SourceVhd] <String> [[-DestinationVmdk] <String>] [[-Vmdk
Type] <VmdkDescriptor+CreateType>] [[-AdapterType] <VmdkDescriptor+AdapterTy
pe>] [-Controller <AbstractController>] [-WhatIf] [-Confirm] [<CommonParamet
ers>]
ConvertTo-NaVmdk [-SourceVhdx] <String> [[-DestinationVmdk] <String>] [[-Vmd
kType] <VmdkDescriptor+CreateType>] [[-AdapterType] <VmdkDescriptor+AdapterT
ype>] [-Controller <AbstractController>] [-WhatIf] [-Confirm] [<CommonParame
ters>]
DESCRIPTION
Convert a VHD or VHDX file into a VMDK file.
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>
Path to the source VHD file. The path can be a path to the file on a Da
ta ONTAP mounted LUN or a path to a Data ONTAP CIFS share (either a mapp
ed network drive or a UNC path starting with \\hostname\<share>).
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-DestinationVmdk <String>
Path to the destination VMDK file. If not supplied, the VMDK file will
be created in the same directory as the source VMDK. The file must not
exist. The path can be a path to the file on the controller (starting w
ith /vol/<volname>), a path to the file on a Data ONTAP mounted LUN, or
a path to a Data ONTAP CIFS share (either a mapped network drive or a UN
C path starting with \\hostname\<share>).
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-VmdkType <VmdkDescriptor+CreateType>
The VMDK type of the VMDK file to be created. The supported types are:
"vmfs", "monolithicFlat", and "twoGbMaxExtentFlat". If not provided, t
he type will be "vmfs".
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-AdapterType <VmdkDescriptor+AdapterType>
The adapter type to assign the created VMDK. Supported values types are
: "lsilogic", "buslogic", and "ide". If not provided, the type will be
"lsilogic".
Required? false
Position? 4
Default value
Accept pipeline input? false
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
-WhatIf
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SourceVhdx <String>
Path to the source VHDX file. The path can be a path to the file on a D
ata ONTAP mounted LUN, a path to a Data ONTAP CIFS share (either a mappe
d network drive or a UNC path starting with \\hostname\<share>), or a pa
th to a file residing on a Data ONTAP controller (starting with /vol/<vo
lname>/).
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, 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-NaVmdk F:\VM1.vhd
Convert the VHD into a VMDK. The VMDK will be given the name "VM1.vmdk".
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 11/22/2011 1:11 PM 680 VM1.vmdk
-a--- 11/22/2011 1:11 PM 21474836480 VM1-flat.vmdk
-------------- Example 2 --------------
C:\PS>ConvertTo-NaVmdk \\benson\vol4\VHDs\testvhd.vhd \\benson\vol4\VMDKs\te
stvmdk.vmdk -VmdkType twoGbMaxExtentFlat
Converts the testvhd VHD into a VMDK of the twoGbMaxExtentFlat type.
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 11/22/2011 1:52 PM 690 testvmdk.vmdk
-a--- 11/22/2011 1:52 PM 2147483648 testvmdk-f001.vmdk
-a--- 11/22/2011 1:52 PM 2147483648 testvmdk-f002.vmdk
-a--- 11/22/2011 1:52 PM 2147483648 testvmdk-f003.vmdk
-a--- 11/22/2011 1:52 PM 2147483648 testvmdk-f004.vmdk
-a--- 11/22/2011 1:52 PM 2147483648 testvmdk-f005.vmdk
-a--- 11/22/2011 1:52 PM 2147483648 testvmdk-f006.vmdk
-a--- 11/22/2011 1:52 PM 2147483648 testvmdk-f007.vmdk
-a--- 11/22/2011 1:52 PM 2147483648 testvmdk-f008.vmdk
-a--- 11/22/2011 1:52 PM 2147483648 testvmdk-f009.vmdk
-a--- 11/22/2011 1:52 PM 2147483648 testvmdk-f010.vmdk
-------------- Example 3 --------------
C:\PS>ConvertTo-NaVmdk -SourceVhdx F:\VHDX\disk1.vhdx -DestinationVmdk F:\VM
DK\TwoGbMaxExtent\disk1.vmdk -AdapterType IDE -VmdkType TwoGbMaxExtentFlat
Convert disk1.vhdx into a VMDK of type TwoGbMaxExtentFlat with an IDE adapte
r type.
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 8/21/2012 10:40 AM 513 disk1.vmdk
-a--- 8/21/2012 10:40 AM 2147483648 disk1-f001.vmdk
-a--- 8/21/2012 10:40 AM 2147483648 disk1-f002.vmdk
-a--- 8/21/2012 10:40 AM 2147483648 disk1-f003.vmdk
-a--- 8/21/2012 10:40 AM 2147483648 disk1-f004.vmdk
-a--- 8/21/2012 10:40 AM 2147483648 disk1-f005.vmdk
-a--- 8/21/2012 10:40 AM 33554432 disk1-f006.vmdk
RELATED LINKS
ConvertTo-NaVhd
| Copyright © 2012 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|