Copy-SCVirtualHardDisk
Copy-SCVirtualHardDisk
Copies a VMware virtual hard disk file to a Windows-based virtual hard disk file and converts the virtual hard disk for use in a VMM environment.
構文
Parameter Set: Default
Copy-SCVirtualHardDisk -Path <String> -VMDKPath <String> -VMHost <Host> [-JobVariable <String> ] [-LibraryServer <LibraryServer> ] [-Owner <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-SourceVMHost <Host> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
詳細説明
The Copy-SCVirtualHardDisk cmdlet copies a VMware virtual hard disk file (a .vmdk file) to a Windows-based virtual hard disk file (a .vhd file) and converts the virtual hard disk for use in a Virtual Machine Manager (VMM) environment. The disk contents are preserved by this copy operation.
VMware virtual hard disks, stored in .vmdk files, contain the virtual machine's guest operating system, applications, and data. VMware virtual hard disk formats supported by Copy-SCVirtualHardDisk include:
-- monolithicSparse
-- monolithicFlat
-- vmfs
-- twoGbMaxExtentSparse
-- twoGbMaxExtentFlat
The Copy-SCVirtualHardDisk cmdlet takes as its input the .vmdk file that the .vmx file points to:
-- The .vmx file points to a .vmdk file that contains metadata, which in turn points to the binary .vmdk file.
-- The .vmdk file that you specify with the Copy-VMDK cmdlet is the .vmdk file that contains the metadata, not the binary .vmdk file.
パラメーター
-JobVariable<String>
Specifies that job progress is tracked and stored in the variable named by this parameter.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-LibraryServer<LibraryServer>
Specifies a VMM library server object.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Owner<String>
Specifies the owner of a VMM object in the form of a valid domain user account.
Example format: -Owner "Contoso\ReneeLo"
Example format: -Owner "ReneeLo@Contoso"
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Path<String>
Specifies the destination path for the operation.
Example formats:
Local: -Path "F:\"
UNC: -Path "\\Library\Templates"
Volume GUID: -Path "\\?\Volume{4703c1ea-8ae7-11db-b473-00123f7603e3}\"
VMware ESX: -Path "[storage1]\MyVMwareFolderForVMs\MyVM.vmx"
Citrix XenServer: -Path "Local storage[99b6212f-b63d-c676-25f9-d6c460992de7]"
Wildcards are supported for Get- cmdlets and when you specify the UNC path.
Example format:
UNC: -Path "\\VMHostServer\MyVMs\*VM*"
エイリアス |
none |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-PROTipID<Guid]>
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-SourceVMHost<Host>
Specifies the source virtual machine host object.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-VMDKPath<String>
Specifies the path to a VMware virtual hard disk file (a .vmdk file) to be converted to a Windows-based virtual hard disk file (a .vhd file). The VMDK stands for the Virtual Machine Disk (VMDK) file format.
Example format: -VMDKPath "\\FileServer01\MSSCVMMLibrary\VMDKS\VM01.vmdk"
Example format: -VMDKPath "[storage1] /VM01/VM01.vmdk"
エイリアス |
none |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-VMHost<Host>
Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts.
For more information about each type of host, type Get-Help Add-SCVMHost -detailed
. See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.
エイリアス |
none |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-VMMServer<ServerConnection>
Specifies a VMM server object.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
- StandaloneVirtualHardDisk[]
例
Example Example 1: Convert a VMware .vmdk file in the VMM library to a Windows-based .vhd file on a host.
The first command gets the library server object named LibServer01, and then stores the object in the $LibServ variable.
The second command gets the host object named VMHost01, and then stores the object in the $VMHost variable. VMHost01 is a Hyper-V host.
The last command copies and converts the .vmdk file located at the path \\LibServer01\MSSCVMMLibrary\VMware\VM01.vmdk on the library server and stores the resulting .vhd file at the path C:\StoredWindowsVMs on VMHost01. Note that the Path parameter, when used with Copy-SCVirtualHardDisk, cannot take a UNC path.
Copy-SCVirtualHardDisk takes as its input the .vmdk file that the .vmx file points to:
-- The .vmx file points to a .vmdk file that contains metadata, which in turn points to the binary .vmdk file.
-- The .vmdk file that you specify with Copy-SCVirtualHardDisk is the .vmdk file that contains the metadata, not the binary .vmdk file.
PS C:\> $LibServ = Get-SCLibraryServer -ComputerName "LibServer01.Contoso.com"
PS C:\> $VMHost = Get-SCVMHost –ComputerName "VMMHost01.Contoso.com"
PS C:\> Copy-SCVirtualHardDisk -LibraryServer $LibServ -VMDKPath "\\LibServer01\MSSCVMMLibrary\VMware\VM01.vmdk" -VMHost $VMHost -Path "C:\StoredWindowsVMs"