P2V — Convert your OEM Win7 / Win10 system to VM — Boot Issue fix

Ravinayag
7 min readNov 25, 2019

I’m writing this article which I spend a couple of days to have my win7 system back after I moved to my new laptop.

I have my DELL Inspiron Laptop running Native Windows 7 Dell OEM version Operating System with so many applications installed and my documents folders and files. My intention for doing this activity to have my old environment back at any point in time.

Prerequisite :

1, Any P2v tool (disk2vhd, vmconverter)

2, Sufficient time for conversion and patience

Stage 1 :

The OEM DISK Contains Three Partitions. (I had multiple partitions, You consider the first three partitions. (OEM, Recovery, Primary )

Note: My Hard disk is MBR/BIOS Based disk.

Understand your partitions first, because it's going to help you when the system gets the error on first boot or until you fix boot issues.

DISKPART> list diskDisk ### Status Size Free Dyn Gpt
— — — — — — — — — — — — — — — — — — — — — — -
Disk 0 Online 465 GB 4096 KB
DISKPART> select disk 0Disk 0 is now the selected disk.
DISKPART> list partPartition ### Type Size Offset
— — — — — — — — — — — — — — — — — — — — — — -
Partition 1 OEM 39 MB 31 KB
Partition 2 Recovery 15 GB 40 MB
Partition 3 Primary 108 GB 15 GB

Partition 0 Extended 341 GB 123 GB
Partition 4 Logical 97 GB 123 GB
Partition 5 Logical 97 GB 221 GB
Partition 6 Logical 48 GB 319 GB
Partition 7 Logical 97 GB 368 GB
DISKPART>
DISKPART> sel part 1Partition 1 is now the selected partition.DISKPART> detail partitionPartition 1
Type : DE
Hidden: Yes
Active: No
Offset in Bytes: 32256
There is no volume associated with this partition.
DISKPART> sel part 2Partition 2 is now the selected partition.DISKPART> detail partitionPartition 2
Type : 27
Hidden: Yes
Active: Yes
Offset in Bytes: 41943040
Volume ### Ltr Label Fs Type Size Status Info
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
* Volume 6 RECOVERY NTFS Partition 15 GB Healthy Hidden
DISKPART> sel part 3Partition 3 is now the selected partition.DISKPART> detail partitionPartition 3
Type : 07
Hidden: No
Active: No
Offset in Bytes: 16863199232
Volume ### Ltr Label Fs Type Size Status Info
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
* Volume 1 C OS NTFS Partition 108 GB Healthy Boot
DISKPART> list volumeVolume ### Ltr Label Fs Type Size Status Info
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Volume 0 D Digital_LG CDFS DVD-ROM 543 MB Healthy
Volume 1 C OS NTFS Partition 108 GB Healthy Boot
Volume 2 E New Volume NTFS Partition 97 GB Healthy Pagefile
Volume 3 F New Volume NTFS Partition 97 GB Healthy
Volume 4 G New Volume NTFS Partition 48 GB Healthy
Volume 5 H New Volume NTFS Partition 97 GB Healthy
Volume 6 RECOVERY NTFS Partition 15 GB Healthy Hidden
DISKPART> select vol 0Volume 0 is the selected volume.DISKPART> detail volThere are no disks attached to this volume.Read-only : No
Hidden : No
No Default Drive Letter: No
Shadow Copy : No
Offline : No
BitLocker Encrypted : No
Installable : No
Volume Capacity : 543 MB
Volume Free Space : 0 B
DISKPART> select vol 1Volume 1 is the selected volume.DISKPART> detail volDisk ### Status Size Free Dyn Gpt
— — — — — — — — — — — — — — — — — — — — — — -
* Disk 0 Online 465 GB 4096 KB
Read-only : No
Hidden : No
No Default Drive Letter: No
Shadow Copy : No
Offline : No
BitLocker Encrypted : No
Installable : Yes
Volume Capacity : 108 GB
Volume Free Space : 8 GB
DISKPART> select vol 6Volume 6 is the selected volume.DISKPART> detail volDisk ### Status Size Free Dyn Gpt
— — — — — — — — — — — — — — — — — — — — — — -
* Disk 0 Online 465 GB 4096 KB
Offline : No
DISKPART> uniqueid diskDisk ID: A2BC5039
DISKPART>

Note: Partition 2 is important as your boot files and recovery image installed in this partition

Let's Move to the tool, I used VMware Vcenter converter (VMware vCenter Converter Standalone). You can download it from VMware site. Amazing tool (you can also do it with disk2vhd,(I didn't try this))

1, Choose Convert machine, Since its Physical machine.

2, Select the Source type as ‘Powered On’ and Select “This Local Machine” on

3, Select destination as given in pic and select VMware product, I choose the lower version because of portability and avoid unknown issues.

4, Name your VM and location of your VM destination.

5, By Clicking Next, Wizard will display the current configuration of the hardware. you can adjust the configuration if any, I have selected all partitions since I need a full backup for my new system.

Choice: You can also select the first 3 partition OEM, recovery and OS partitions for boot. Adjust the Memory, Network configurations according to your requirement.

6, You moved to Final Summary view of your work, do a review once again and click finish, the Task will be submitted and this will take time to convert the VMDK file.

Once the task is completed, you will get two files of yourshostname.vmx and .vmdk file.

Boot with your VMplayer and the windows boots, Since my OEM version comes with HOME edition, it doesn't boot, I ended up with two issues 1, System reboot in a loop. 2. Ended up with 7B.

Note: If the system boots without issues, you have luck and saved a lot of time. Below described troubleshooting the boot issues and their fixes.

Let's move to stage 2.

Stage 2 :

7, Once the conversion, is done, Your system is ready to boot from vmplayer. but it will panic BSOD with 0x0000007B error, everyone stuck over here. Don’t panic, you still have scope to get your system back as VM. There are different stages here.

Stage 2: Option 1

1, Boot the system with win7 OS installation Media. Don't choose to install, instead select Repair your computer option.

Press Shift +f10 to get the command prompt, then do below steps

diskpart >activate partition

Click the operating system drive shown in the window that you have to repair, and then click Next.
In the System Recovery Options, select and click Command Prompt.

follow the below commands to get fixed:
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
it should result positive results by identifying windows path. then do reboot and check.

If still not booting or do not getting a boot menu or something is still wrong, follow the above steps and the below command

bootrec /rebuildbcd

Note: check the DISK ID, your disk id should match your physical Disk ID. Else you end boot loop or other issues.

DISKPART> uniqueid diskDisk ID: A2BC5039
DISKPART>

To Set the Disk ID, Boot with Bootable CD image, and go to command prompt and use Diskpart command.

1, select the disk 0 and enter the command below

DISKPART> uniqueid disk ID=A2BC5039

The below command is optional. But have to do it after the reboot.

chkdsk c: /f
sfc /scannow

Reboot and check the system.

Stage 2: option 2

I tried with option 1 for some reasons it didn't go well, Maybe i did some rookie mistake. which I couldn't notice. But this procedure is very simple, i should have tried first. My good luck I have learned many during this conversion and able to write this article. You try at your own risk by having a backup copy of vmdk file.

1, You have to select Configure machine this time and select the source type as vmware workstation( i prefer lower compatibility because of portability and support) and choose the Virtual machine file location where you stored.

After you created p2v, open the vmconverter again and select configure the machine, Now choose the migrated VM .vmdk file, You have four options to select. Unchecked the Guest preferences and leave the rest 3 boxed checked.

The conversion takes a few mins to complete.once its done, Now the VM system is completely ready to boot without errors. All the Best.

Give a thumbs up or Clapp if this article helps you. Thanks.

--

--

Ravinayag

Blockchain enthusiast & Research | DevOps Explorer | Hyperledger Explorer