The New-SCV2V cmdlet converts a virtual machine created on a VMware ESX Server host.
This cmdlet converts to a virtual machine to one deployed on a Hyper-V host that Virtual Machine Manager (VMM) manages.
You cannot specify a VMware ESX host as the destination host for the new virtual machine.
A virtual-to-virtual machine (V2V) conversion requires that the host for the new virtual machine is a Hyper-V host.
The source for a V2V conversion of a VMware virtual machine is a set of files in the VMM library.
Store the following files in the VMM library:
A .vmx file.
A .vmk file is a VMware virtual machine configuration file.
A .vmx file is similar in function to the virtual machine configuration (.vmc) file that Hyper-V hosted virtual machines use.
A .vmx file is a text file that describes the properties and structure of a virtual machine that include name, memory, disk assignments, and network parameters.
One or more .vmdk files.
A .vmdk file is a VMware virtual hard disk file.
A .vmdk file is similar to the virtual hard disk (.vhd) file that Hyper-V hosted virtual machines use.
A .vmdk file contains the guest operating system, applications, and data.
The current cmdlet identifies these files from the .vmx file.
Supported VMware virtual hard disk formats include the following:
monolithicSparse
monolithicFlat
vmfs
twoGbMaxExtentSparse
twoGbMaxExtentFlat
During the conversion process, this cmdlet converts the .vmdk files to .vhd files.
This cmdlet makes the operating system on the new virtual machine compatible with Hyper-V.
The virtual machine that this cmdlet creates matches VMware virtual machine properties unless these settings are explicitly overridden.
These properties include name, description, memory, and disk-to-bus assignment.
By default, the conversion process does not preserve network adapter settings.
You can explicitly set adapter settings on the target virtual machine.
This cmdlet supports the conversion of VMware virtual machines that are running on the following guest operating systems:
Microsoft operating systems - All in-support operating systems
Linux - All the Linux guest operating systems supported by SCVMM
Some conversions of a VMware-based virtual machine whose guest operating system is Windows might require that you add system files and drivers to the internal cache.
You can use the Add-SCPatch cmdlet to add the required files to the cache.
To determine what updates you must add, run New-SCV2V to attempt to convert the .vmdk file to a .vhd file.
If you need updates, this process puts the V2V conversion into a failed state.
You can review a list of required updates.
Next, use Add-SCPatch to add the updates to the internal cache, and then restart the failed V2V job.
The V2V process continues, so that you do not have to redo the disk conversion.
If you convert a VMware-based virtual machine that runs any other operating system, the virtual machine might not start or might not function correctly.
To guarantee a successful conversion, you must first modify the guest operating system to one of the supported operating systems.
For more information about how VMM converts .vmdk files directly, type Get-Help Copy-SCVirtualHardDisk.
For more information about how to add required files to the internal cache, type Get-Help Add-SCPatch.
Examples
Example 1: Convert a VMware-based virtual machine on an ESX host
The first command gets the host named ESXHost01, and then stores that object in the $ESXHost variable.
The second command gets the host named HyperVHost01 in the Contoso.com domain, and then stores that object in the $VMHost variable.
The third command gets the virtual machine named SourceVM on ESXHost01, and then stores that object in the $VM variable.
In the last command**, New-SCV2V** performs the following operations:
Creates a Windows-based virtual machine named DestinationVM from the source VMware virtual machine named SourceVM.
The command deploys the new virtual machine, now named DestinationVM, onto HyperVHost01.
It stores the virtual machine files in the folder C:\VMs on HyperVHost01.
Assigns 512 MB of memory on HyperVHost01 for use by the new virtual machine.
Specifies the -RunAsynchronously parameter to return control to the command shell immediately, before the command finishes.
The command converts all of the virtual disks on the source virtual machine and attaches them to the new virtual machine.
Example 2: Convert a VMware-based virtual machine stored in the VMM library
The first command gets the library server named LibServer02, and then stores that object in the $LibServ variable.
The second command gets the host named VirtualServerHost02, and then stores that object in the $VMHost variable.
In the last command, New-SCV2V performs the following operations:
Creates a Windows-based virtual machine named VM02 from the source VMware file, VMSource.vmx, stored at the specified path on FileServer02.
The command then deploys the new virtual machine named VM02 onto VirtualServerHost02.
The command stores the virtual machine files in the folder C:\VMs on VirtualServerHost02.
Assigns 512 MB of memory on VirtualServerHost02 for use by the new virtual machine.
Specifies the RunAsynchronously parameter to return control to the command shell immediately, before the command finishes.
Parameters
-CPUCount
Specifies the number of CPUs on a virtual machine, on a hardware profile, or on a template.
Types of hosts support the following number of CPUs:
Hyper-V.
Up to four CPUs per virtual machine, depending on guest operating system
VMware ESX.
Up to four CPUs per virtual machine, but only one CPU on a virtual machine that runs Windows NT 4.0
Citrix XenServer.
Up to eight CPUs per virtual machine, depending on guest operating system
Parameter properties
Type:
Byte
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
ProcessorCount
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-CPURelativeWeight
Specifies the amount of CPU resources on a host that this virtual machine can use relative to other virtual machines on the same host.
A virtual machine with a higher weight value is allocated more CPU resources than a virtual machine with a lower weight value.
The VMware term for these values is shares.
Types of hosts support the following relative values:
Hyper-V.
1 to 10000.
VMware ESX.
High.
VMware ESX.
Above Normal.
VMware ESX.
Normal (default). 1000.
VMware ESX.
Below Normal.
VMware ESX.
Low.
VMware ESX.
Custom 1 to 1000000.
Citrix XenServer.
1 to 65536, normal is 256.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
RelativeWeight
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-CPUType
Specifies the type of CPU for a virtual machine.
To retrieve a list of all CPU types that are available for use in virtual machines in a VMM environment, type Get-SCCPUType.
Parameter properties
Type:
ProcessorType
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DelayStartSeconds
Specifies the number of seconds to wait after the virtualization service starts before automatically starting a virtual machine.
You can use this delay to stagger the startup time of multiple virtual machines.
This technique helps reduce the demand on physical computer resources.
A typical setting might be 30 to 60 seconds.
Types of hosts have the following maximum configurable delays:
Hyper-V.
1000000000 seconds or 277777 hours.
VMware ESX.
65535 seconds or 18 hours.
Citrix XenServer.
Not applicable.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
DelayStart
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Description
Specifies a description for the converted virtual machine.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-EnableMACAddressSpoofing
Indicates whether to enable Media Access Control (MAC) address spoofing.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
MACAddressesSpoofingEnabled
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-EnableVMNetworkOptimization
Indicates whether to enable virtual machine network optimization.
Optimization improves network performance for virtual machines with network adapters that support virtual machine queue (VMQ) or TCP Chimney Offload.
VMQ enables you to create a unique network queue for each virtual network adapter.
TCP Chimney Offload enables network traffic processing to be offloaded from the networking stack.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
VMNetworkOptimizationEnabled
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-JobGroup
Specifies an identifier for a series of commands that runs as a set just before the final command that includes the same job group identifier runs.
Parameter properties
Type:
Guid
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-JobVariable
Specifies a variable in which job progress is tracked and stored.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-LibraryServer
Specifies a VMM library server.
This cmdlet converts a virtual machine stored in the server that this parameter specifies.
Parameter properties
Type:
LibraryServer
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Parse
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
NoParse
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-LogicalNetwork
Specifies a logical network for the converted virtual machine.
A logical network is a named grouping of IP subnets and VLANs that is used to organize and simplify network assignments.
Parameter properties
Type:
LogicalNetwork
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MACAddress
Specifies the MAC address, or a set of MAC addresses, for a physical or virtual network adapter on a computer.
Valid values are: one or more MAC addresses.
Enter more than one MAC address as a comma separated list of strings.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
EthernetAddress, PhysicalAddress
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MACAddressType
Specifies the type of MAC address to use for a virtual network adapter.
Valid values are: Static and Dynamic.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
EthernetAddressType, PhysicalAddressType
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MemoryMB
Specifies the amount of random access memory (RAM), in megabytes (MB), on the host that this cmdlet allocates to the converted virtual machine.
The default value is 512 MB.
For a virtual machine on which dynamic memory is enabled on a host that runs Windows Server 2008 R2 SP1 or later versions, specify the startup memory value.
Types of hosts have the following maximum memory assignable to virtual machines:
Hyper-V.
Up to 65536 MB RAM per virtual machine.
VMware ESX Server 3.0.x.
Up to 16384 MB RAM per virtual machine.
VMware ESX Server 3.5.x.
Up to 65532 MB RAM per virtual machine.
Citrix XenServer.
Up to 32265 MB RAM per virtual machine.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Name
Specifies the name of the converted virtual machine.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-NetworkLocation
Specifies the network location for a physical network adapter or for a virtual network adapter, or a new default network location of a host physical network adapter.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-NetworkTag
Specifies a word or phrase to associate with a virtual network adapter that is configured to connect to a specific internal or external network on the host.
The network tag identifies all virtual machines with the same network tag as members of the same network.
VMM uses a network tag, if one exists, when it evaluates hosts as possible candidates on which to deploy a virtual machine.
If the host does not include virtual machines on the network that has the same network tag as the virtual machine to be placed, the host receives zero stars in the placement process.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
Tag
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-NoConnection
Indicates that this cmdlet disconnects a virtual network adapter from a virtual network for the converted virtual machine.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-OverridePatchPath
Do not specify this parameter.
For internal use only.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Owner
Specifies the owner of a VMM object in the form of a valid domain user account.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Path
Specifies the destination path for the virtual machine conversion.
This parameter accepts the wildcard (*) when you specify a UNC path.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PROTipID
Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action.
This parameter lets you audit PRO tips.
Parameter properties
Type:
Guid
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SkipInstallVirtualizationGuestServices
Indicates that this cmdlet skips the installation of virtualization guest services on a virtual machine.
By default, VMM installs the appropriate virtualization guest service automatically.
For a virtual machine on a Hyper-V host, the virtualization guest service is called Integration Components (VMGuest.iso).
For a virtual machine on a XenServer host, the virtualization guest service is called Citrix Tools for Virtual Machines (xs-tools.iso).
Virtual machines on a VMware ESX host do not use a virtualization guest service.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SourceNetworkConnectionID
Specifies the MAC address or network name of the physical network adapter that this cmdlet converts into a virtual network adapter in the virtual machine.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-StartAction
Specifies the behavior of a virtual machine when the virtualization service starts.
The acceptable values for this parameter are:
Indicates that the virtual machine starts when it arrives at the destination host.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-StopAction
Specifies the behavior of the virtual machine when the virtualization service stops.
The acceptable values for this parameter are:
SaveVM
TurnOffVM
ShutdownGuestOS
Parameter properties
Type:
VMStopAction
Default value:
None
Accepted values:
SaveVM, TurnOffVM, ShutdownGuestOS
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Trigger
Indicates that this cmdlets runs the commands in a job group for a physical-to-virtual (P2V) conversion, a virtual-to-virtual (V2V) conversion, or the conversion of a physical hard disk to a virtual hard disk.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-UserRole
Specifies a user role for the converted virtual machine.
Parameter properties
Type:
UserRole
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VirtualNetwork
Specifies a virtual network for the converted virtual machine.
Parameter properties
Type:
VirtualNetwork
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VirtualNetworkAdapter
Specifies a virtual network adapter object for a virtual machine.
Types of hosts support the following number of virtual network adapters:
Hyper-V.
Up to four emulated adapters per virtual machine.
There is no driver available for an emulated network adapter on a Windows Server 2003 x64 guest operating system.
Hyper-V.
Up to eight synthetic adapters per virtual machine.
VMware ESX.
Up to four emulated adapters per virtual machine.
Citrix XenServer.
Up to seven emulated adapters per virtual machine.
Parameter properties
Type:
VirtualNetworkAdapter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VLanEnabled
Indicates whether to enable a virtual LAN (VLAN) for use by virtual machines on a Hyper-V or Citrix XenServer host.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VLanID
Specifies a numeric identifier for a virtual network adapter on a virtual machine or for a physical network adapter on a virtual machine host.
Valid values are integers from 1 to 4094.
Configure a VLan ID for a Hyper-V, VMware ESX, or Citrix XenServer host on an externally bound physical network adapter when the VLan mode is Access.
Configure a VLan ID on a virtual network adapter of a virtual machine that is bound to a physical network adapter on the host, or that is bound to an internal virtual network on the host.
Parameter properties
Type:
UInt16
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VM
Specifies a virtual machine object that this cmdlet converts.
Parameter properties
Type:
VM
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
FromVM
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMHost
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, see the Add-SCVMHost cmdlet.
Parameter properties
Type:
Host
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMMServer
Specifies a VMM server that manages the converted virtual machine.
Parameter properties
Type:
ServerConnection
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMNetwork
Specifies a virtual machine network object.
To obtain a virtual machine network object, use the Get-SCVMNetwork cmdlet.
Parameter properties
Type:
VMNetwork
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMXComputerConfiguration
Specifies a VMX computer configuration.
Parameter properties
Type:
VmxMachineConfiguration
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
MachineConfig, VMXMachineConfig
Parameter sets
NoParse
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMXPath
Specifies the full UNC path of the .vmx file of a VMware virtual machine.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Parse
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
Outputs
VirtualMachine
This cmdlet returns a VirtualMachine object.
Notes
This cmdlet requires a VMM VMX computer configuration object. To obtain a VMX object, use the Get-SCVMXComputerConfiguration cmdlet.