I captured an image and I'm trying to restore it to a different VM without using Sysprep since I'm actively using the vm server I want to clone and I don't want to have to set it back up again, I could but it would be a waste of time:
Started the original VM from a WinPE ISO, and brought up the cmd prompt:
Capture Shared read/write : \DESKTOP-O8ESL65\wsus_img
start /w wpeinit
Connected up to the share with
net use i: \\DESKTOP-O8ESL65\wsus_img /user:someuser /password
Captured the image with the following command:
dism /capture-image /ImageFile:i:\install.wim /CaptureDir:C:\ /Name:"winserver_wsus2016"
Restore without Sysprep
Created a new vm and booted it with WinPE, then created GPT partitions on it:
start /w wpeinit
net use f: \\DESKTOP-O8ESL65\wsus_img
diskpart
Microsoft DiskPart version 10.0.14393.0Copyright (C) 1999-2013 Microsoft Corporation.On computer: MININT-TJ84J7UDISKPART> select disk 0
Disk 0 is now the selected disk.
DISKPART> list vol
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 D DVD_ROM UDF DVD-ROM 6649 MB Healthy
Volume 1 RAW Partition 126 GB Healthy
Volume 2 C Recovery NTFS Partition 450 MB Healthy Hidden
Volume 3 E FAT32 Partition 100 MB Healthy HiddenDISKPART> select volume 1
DISKPART> format fs="ntfs" quick label="data"
DISKPART> assign letter=g
DISKPART> list vol
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 D DVD_ROM UDF DVD-ROM 6649 MB Healthy
Volume 1 G data NTFS Partition 126 GB Healthy
Volume 2 C Recovery NTFS Partition 450 MB Healthy Hidden
Volume 3 E FAT32 Partition 100 MB Healthy Hidden
DISKPART> exit
Then I ran this to apply the image, but then the new VM wouldn't boot afterwards:
dism /apply-image /Imagefile:f:\install.wim /index:1 /applydir:g:\
And after that I couldn't boot the machine from the drive, so I repeated the steps above and then added this after I read that the following commands could be used as a replacement for sysprep:
bcdedit /set {default} device partition=c:
The boot configuration data store could not be opened.
The system cannot find the file specified.
bcdedit /set {default} osdevice partition=c:
The boot configuration data store could not be opened.
The system cannot find the file specified.
bcdedit /set {bootmgr} device partition=c:
The boot configuration data store could not be opened.
The system cannot find the file specified.
But the commands do not work in WinPE. I even tried it from G:\Windows\System32\bcdedit.exe, and I still get the same message.
I'd like to setup the windows bootloader so the vm will boot and I can create a second WSUS Server. I was thinking maybe I needed to do a runas, but since I'm in WinPE, what user would I run the command as? Also I found some documentation on bcdedit.exe but I'm new to GPT partitions and UEFI so I'm at a bit of a loss in how to proceed.