Environment
Situation
When attempting an X2P migration the job fails at the Creating and Partitioning Volumes step with the following error (only visible in the diagnostics):
System.Exception: Failed to control the device. ---> System.ComponentModel.Win32Exception: Incorrect function
Resolution
In order to resolve this issue, ensure that the target is booting from BIOS, instead of UEFI. Then, verify if the disks are flagged as GPT disks:
1. Run the following commands:
diskpart
list disk
2. If any disks have an asterix under the GPT column, run the following:
select disk x (where x is the number of the disk flagged for GPT)
clean
Note: cleaning a disk will eliminate all partitions.
It is not necessary to register the target again prior to retrying the migration, unless the target has been rebooted.