Letzte Aktualisierung: Januar 2010

Betrifft: Virtual Machine Manager 2008, Virtual Machine Manager 2008 R2, Virtual Machine Manager 2008 R2 SP1

The following script uses V2V conversion to convert a VMware Server–based virtual machine in the library to a Hyper-V virtual machine. For an explanation of this script, see How to Convert Virtual Machines Using a Script.


Before you convert a VMware virtual machine to a Hyper-V virtual machine in VMM, you must uninstall VMware Tools on the guest operating system of the virtual machine.


# Filename:      ConvertESXVMUsingV2VfromLibrary.ps1
# Description:   Converts a VMware Server-based virtual machine stored in the 
#                library to a Hyper-V virtual machine on a host managed by VMM.

# Connect to the VMM server.
Get-VMMServer -ComputerName ""

# Define the variables.
$VMHost = Get-VMHost -computername ""
$VM = Get-VM -VMMServer "" -Name "ESX Virtual Machine" | where {$_.LibraryServer.Name -eq ""} | where {$_.Location -eq  "\\\MSSCVMMLibrary\ESX Virtual Machine"}

# Convert the virtual machine.
New-V2V -VM $VM -VMHost $VMHost -Path "D:\VirtualMachinePath" -Name "HyperV Virtual Machine" -Description "" -Owner  "CONTOSO\phyllis" -RunAsynchronously -JobGroup 4d3514f5-1bcf-4d78-8bd1-21e6a7d0a5e4 -Trigger -CPUCount 1 -MemoryMB 256 -RunAsSystem -StartAction  NeverAutoTurnOnVM -UseHardwareAssistedVirtualization $true -StopAction TurnOffVM 

Siehe auch