網頁

2012年11月10日 星期六

Windows 8 x64 --- WIM2VHD (part 4)

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)
ScreenHunter_01Click I Agree button after reading License content
ScreenHunter_02Select a path as “F:\My Source\Virtualization\Utility\WIM2VHD for Windows8\” to save it
ScreenHunter_03When 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.
ScreenHunter_07When this PowerShell script run then, the screen show “Launching UI…” after keying R word.
ScreenHunter_18and the Convert-WindowsImage UI will show up as well.
ScreenHunter_19Click button
ScreenHunter_20Select install.wim file from Windows 8 Source
ScreenHunter_21So dose that the field 2 will show SKU value as Professional for your choice if the source include other SKU.
ScreenHunter_22and the PowerShell screen go another message “Scanning WIM metadata
ScreenHunter_23Choose VHD Format as “VHDX”, VHD Type as “Fixed”, VHD Size as “40 GB” next to click button
ScreenHunter_24Select a path for changing Working Directory
ScreenHunter_25the PowerShell screen show the message “Selected Working Directory is …
ScreenHunter_26In 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
ScreenHunter_01In the moment, the script begin to create VHDX image if we see the PowerShell screen.
ScreenHunter_32Do the other activity as attaching VHD, Disk initialized/partitioned, Volume formatted, Assign Drive, Copy data, Applying image to VHDX,
ScreenHunter_33BCD configuration, Make Drive is bootable, Closing VHDX and windows image. until now, the bootable VHDX image has already been created now.
ScreenHunter_34Now 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)

沒有留言:

張貼留言

Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.