However, prior to VHDX feature of PVS, my favorite method was to create a Xen SR pointed to the PVS server and boot directly to the VHD file. This worked flawlessly. But then VHDX feature came along and that was way cooler from an IOPS perspective than my effortless approach to reimaging devices. So I searched around to find a different method which supported VHDX files. And of course, the easiest route came from using BCDEdit to create an additional boot option. This boot option would point to the VHDX file. You could modify the image and then put it right back on the PVS server and done. So if I've peeked your curiosity then keep reading.
First, you need a VM with at least Windows 8/2012. You need a drive that's at least twice the size of VHDX disk (ex: in PVS, vDisk is allocated to 80GB, you need a 160GB data drive).
- Boot the VM
- On the Data Drive, copy the VHDX file to the drive
- Open up command prompt
- bcdedit /export c:\bcdbackup
- bcdedit /copy {default} /d "PVS Image"
- bcdedit /set {guid} device vhd=[drive letter:]\SomeFile.vhdx
- bcdedit /set {guid} osdevice vhd=[drive letter:]\SomeFile.vhdx
- Restart the Machine
- Select PVS Image
- Perform your updates
- Update Xen/VM Tools
- Perform Driver Installs
- Update an old version of PVS Target Device (pre 7.6 Update 1)
- Upgrade to 2012R2, 2016, 2019
- Restart the Machine
- Select Regular VM
- Copy VHDX file back to PVS
Yep, you are done!!!
No comments:
Post a Comment