網頁

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)

2012年11月4日 星期日

Windows 8 x64 --- Loopback Network Adapter (part 3)

Since Hyper-V is installed and select the loopback adapter as Hyper-V Internet Interface, someone ask me how to install loopback adapter and let VM can connect to Internet. Based on the before experience to install Microsoft Loopback Adapter, we cannot find it on Windows 8 because it is renamed as "Microsoft KM-TEST Loopback Adapter".
So How to do it for someone question?

Add Loopback Adapter
To add the loopback adapter to Windows 8, the arrow cursor move to the left-bottom next to right-click the mouse to click Device Manager in menu.
ScreenHunter_16In Device Manager, click Actions –> Add legacy hardware to launch Add/Remove Hardware wizard.
ScreenHunter_17In Add Hardware page, click Next > button
ScreenHunter_18Select Install the hardware that I manually select from a list (Advanced) option next to click Next > button
ScreenHunter_19Select Network adapters hardware types next to click Next > button
ScreenHunter_20Select Microsoft Manufacturer and Microsoft KM-TEST Loopback Adapter next to click Next > button
ScreenHunter_01Click Next > button to start installing the new hardware
ScreenHunter_02Windows has finished installing the Microsoft Loopback Adapter driver and we can see it in Device Manager.
ScreenHunter_04
Enable traffic on LoopbackWhen we right-click this “Loopback Adapter” in Network Connection and select Status in menu,
ScreenHunter_05the Received traffic always be “0”.
ScreenHunter_06In the moment, we need to correct some value to change the loopback network behavior. At first, we need to understand which Ethernet adapter name as “Hyper-V LAN01” will be set by running the command “ipconfig /all | more”.
ScreenHunter_08In the command prompt with Administrator privilege, execute the command “netsh interface ipv4 set interface “Hyper-V LAN01” weakhostreceive=enabled” & "netsh interface ipv4 set interface “Hyper-V LAN01” weakhostsend=enabled"
ScreenHunter_09So does that the loopback adapter will have package in receive traffic now.
ScreenHunter_10
Enable ICSFinally, we will enable ICS on the WAN Interface so that let Hyper-V VM can go through WAN to Internet. For enabling ICS, right-click this WAN adapter next to click Properties
ScreenHunter_02In WAN Properties, click the Sharing tab next to enable Allow other network users to connect through this computer’s internet connection check box and select a private network adapter as “vEthernet(Group01 Virtual Switch)” in Home networking connection field.
ScreenHunter_04So does that Internet connection will be shared for VM computers now.

<<<   Windows 8 x64 ---- Install CentOS 6.3 x64 on Hyper-V (part 2)

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