If we want to install a Windows 8 OS into VHD image, there is two method to do it
(1). In Physical machine environment, we need to boot from Windows OS DVD next to create/mount/install VHD image and add Boot Configuration Data (BCD) for Booted VHD image.
(2). In Virtualization environment, we can create VM with VHD format and mount Windows OS DVD or ISO image next to boot it and install OS.
If we want to duplicate the bootable VHD image and let the copy also can run, we need to execute sysprepped on VHD image so that GUID doesn’t conflict each other and these OSs can on-live in the same time. It is not convenient for us because we have to do more and more steps for finishing this target.
Whether exist the alternative choice to easily build the pure OS? Yes, it is WIM2VHD for Windows 8!
(# 1)
At first, we need to download a PowerShell “Convert-WindowsImage.ps1” from Microsoft Script Center
(# 2)

Click
I Agree button after reading License content

Select a path as “F:\My Source\Virtualization\Utility\WIM2VHD for Windows8\” to save it

When we open the Windows PowerShell and run the script as “.
\Convert-WindowsImage.ps1 -ShowUI” for showing the graphic user interface, this script cannot be run due to Execution Policy limitation so that get the error message as “running scripts is disabled on this system” or “this script is not digitally signed” and so on. In the moment, we need to run the command “
Set-ExecutionPolicy Unrestricted” for allowing all Windows PowerShell scripts can be run.

When this PowerShell script run then, the screen show “
Launching UI…” after keying
R word.

and the
Convert-WindowsImage UI will show up as well.

Click
… button

Select
install.wim file from Windows 8 Source

So dose that the field 2 will show SKU value as Professional for your choice if the source include other SKU.

and the PowerShell screen go another message “
Scanning WIM metadata”

Choose VHD Format as “VHDX”, VHD Type as “Fixed”, VHD Size as “40 GB” next to click
… button

Select a path for changing Working Directory

the PowerShell screen show the message “
Selected Working Directory is …”

In
Convert-WindowsImage UI page, please note that confirm whether Working Directory value is as we choose.
If no, please remember to change it so that the export file will put on the right location.
If yes,please assign VHD Name as “DW-WIN8-02.VHDX”, Unattend File next to click
Make my VHD button

In the moment, the script begin to create VHDX image if we see the PowerShell screen.

Do the other activity as attaching VHD, Disk initialized/partitioned, Volume formatted, Assign Drive, Copy data, Applying image to VHDX,

BCD configuration, Make Drive is bootable, Closing VHDX and windows image. until now, the bootable VHDX image has already been created now.

Now this file can be use on boot from VHDX in Physical or Hyper-V environment. So, it is very simple, isn’t it?
Reference(# 1) This PowerShell Script just can run on Windows 8, Windows Server 2012 and only create sysprepped VHD/VHDX image from Windows 7, Windows 2008 R2, Windows 8, Windows Server 2012 setup media.
(# 2) The script can be download from this RUL
Convert-WindowsImage.ps1 - WIM2VHD for Windows 8
<<<
Windows 8 x64 --- Loopback Network Adapter (part 3)
沒有留言:
張貼留言