Operation is not valid due to the current state of the object

  • 7018689
  • 07-Mar-2017
  • 20-Mar-2017

Environment

PlateSpin Migrate 11.x

Situation



This issue occurs when preforming a X2P when the source is UEFI, the job fails at partitioning target disk:

Exception caught in Controller.Execution.Action.run()
System.InvalidOperationException: Operation is not valid due to the current state of the object at System.Linq.Enumerable.Single[<>f__AnonymousType2`3] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.Single[<>f__AnonymousType2`3] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0 at 

Resolution

Make sure boot mode and partition type is match on the target:

UEFI - GPT
BIOS - MBR

You can check and change partition type using tools included in PlateSpin ISO:

1. to check partition type: parted >> print
2. to change partition type: parted >> mkpart

Note: parted is a partitioning tools to manipulate both MBR and GPT disks

Cause

Target disk  type was deployed wrong. Target was booted up with UEFI mode, but disk partition table showing MBR. Here is example from a diagnostic report - original target machine:

<q2:components>
<q2:component xsi:type="q2:DiskDrive">
<q2:manufacturer>HP</q2:manufacturer>
<q2:model>LOGICAL VOLUME</q2:model>
<q2:size>299966445568</q2:size>
<q2:type>SCSI</q2:type>
<q2:partitionTableType>MBR</q2:partitionTableType>
<q2:partitions/>
.
.
.
<q2:bootMode>UEFI</q2:bootMode>