کد:
http://lynnlunik.net/2010/03/creating-and-maintaining-a-windows-7-image-using-virtual-pc-on-windows-7-part-1-of-3-step-by-step/
Part 1 of 3
One method of making available a Windows 7 Workstation Image is using Virtualization Software to provide such an Image.
Once generated, this Windows 7 Image can be used for Application Testing, addition to a Domain for Group Policy Testing
and many other uses. I have created many Windows Operating Systems Images over the years and wanted to share with
you one method to create, modify, maintain and re-use a Windows 7 Image using Virtual PC from Microsoft. The key to this
endeavor is understanding that generating the initial Windows 7 Image in Virtual PC is a straightforward process. The Virtual
PC method of mounting an .ISO Image of the Windows 7 Source Media files from the Host Workstation CD/DVD Drive within
the image, and then using the mounted .ISO File (of Windows 7 Source Media) for the Virtualized Guest Operating System
Installation provides an effecting method to creating the initial Image. Once the Virtualized Guest Partition running Windows 7
Entprise is installed, my hope is to offer a manual method to ‘maintain’ the Windows 7 Image for future updates, while, at the
same time creating a copy of the Image and then sealing the Image using the defined Sysprep Process from Microsoft. The usefulness of having a Windows 7 Image readily available for use in Virtual PC is endless. The fact that you will always have a ‘current’ Windows 7 Image in your Virtual PC Library is invaluable. Over and above this usefulness I will review
a method to duplicate the VHD File prior to using Sysprep for ’sealing’ and then maintaining the ‘unsealed’ VHD File for use in subsequent months when Security Updates or additional Application are required within the Image.
Of course, the method I review is
very manual. There are plenty of points along the way where scripting or use of specific utilities or tools would be appropriate. My goal is to offer a framework for the process whereby you can apply any nuances, scripting or any other activities you feel appropriate. Again, this is a multi-part Blog entry. Here’s how each part lays out.
- In this Blog entry Part 1 of 3 I will generate a Windows 7 Enterprise Image on a Windows 7 Workstation running Virtual PC. Typically this is termed ‘provisioning an image’ as we are starting in Virtual PC with nothing and finishing with Windows 7 Enterprise running as a Virtual Guest Partition within Virtual PC on a Windows 7 Host.
- In Part 2 of 3 I will use a process to ’seal’ a copy of the Virtual Hard Disk (VHD File Format) using Sysprep that can then be used as a ‘current’ Windows 7 Image.
- Finally, in Part 3 of 3 I will review a method to maintain an ‘unsealed’ copy of the Virtual Hard Disk, update the Image with Security Updates, duplicate the VHD then ’seal’ the ‘new current’ Windows 7 Image to be made the ‘most up to date’ and ‘fresh’ Windows 7 Enterprise Image when the need arises for its use.
Figure 1 – Launch Virtual PC on the Windows 7 Enterprise Host to begin creation of the Windows 7 Enterprise Guest Partition.
On the Windows 7 Enterprise Host Workstation I begin by opening Virtual PC using the ‘Manage Virtual Machines’ Task. I have several Virtual Guest Partitions already on this Host as you can see by the blurred Guest Partition Names under ‘Recent Virtual Machines. Use of the ‘Manage Virtual Machine’ Task is required to create a new Guest Partition (our Windows 7 Enterprise Image).
Figure 2 – Select ‘Create Virtual Machine’ to begin the creation process for the Guet Partition.
The ‘Create Virtual Machine’ Task initiates the Wizard that generates the Windows 7 Enterprise Image.
Figure 3 – Selection of a Folder named ‘Win7×86-Sealed’ to store the Virtual PC Guest Partition files.
I have created a Folder on the Volume titled ‘Win7×86-Sealed’ as the location for the files generated by Virtual PC when creating a Guest Partition. I select this precise name as it is a reminder that when completed this Image of Windows 7 Enterprise will need to be ’sealed’ using the Sysprep process prior to use.
Figure 4 – The ‘Create a Virtual Machine’ Wizard begins where both a ‘Name’ and a ‘Location’ are specified.
Figure 5 – Next the amount of ‘Memory’ and ‘Networking’ parameters are defined. I select to ‘Use Computer Network Connections’ which ‘bridges’ the Guest Partition across the Host Network Interface (NIC).
Figure 6 – The next selection in the ‘Create a Virtual Machine’ Wizard is specific to the ‘type’ and ’size’ of the Virtual Hard Disk.
Figure 7 – Note that (a quick aside ) to view the contents of the ‘Win7×86_Sealed’ Folder where the Virtual PC Guest Partition Files for this Windows 7 Enterprise Image are held includes 2 files at this point. File 1 is the ‘Virtual Machine Hard Drive Image’ file while File 2 is the ‘Virtual Machine Settings File’.
Figure 8 – Now that the ‘Create a Virtual Machine’ Wizard is completed status of the Guest Partition (the Windows 7 Enterprise Image) is visible located on the ‘E:’ Drive. Next, I will focus on the ‘CD/DVD’ Setting for the Guest Partition in order to ‘Boot’ this Bare Metal Guest Partition to an Operating System it is necessary to place the Windows 7 Source Media (DVD) in the form of an .ISO Image. This .ISO Image Virtual PC can read and used as Boot Media for the Virtualized Guest Partition Operating System installation.
Figure 9 – Upon selecting the Windows 7 Enterprise Image it is possible to modify the ‘Settings’ for this Guest Partition.
Figure 10 – Upon selecting the ‘Settings’ Option for this Guest Partition the ‘Windows Virtual PC Settings’ Dialogue Window is visible. The focus is on the ‘DVD Drive’ named ‘D:\’.
Figure 11 – Here is the key to creating this Windows 7 Enterprise Image (also called a ‘Guest Partition’) – selecting an .ISO File with the Windows 7 Enterprise Source Media (MSDN, Select or Volume Licensing) for the initial ‘Boot Process’ to create the Operating System Install. Since the ‘DVD Drive’ is pointed to the .ISO File of Windows 7 Enterprise Source Media I now move to ‘Boot’ the Guest Partition for the first time.
Figure 12 – Using the ‘Open’ Menu Option ’starts’ the Windows 7 Enterprise Guest Partition for the first time. Remember here, this Guest Partition should use the .ISO File of Windows 7 Enterprise Source Media and initiate the ‘Installation Process’ for Windows 7 Enterprise.
Figure 13 – Here the WinPE Environment from the Windows 7 Enterprise Source Media is Booting correctly. Now the initial Installation is underway a normal sequence of selecting IP Settings, Workgroup Mode, etc. occurs.
Figure 14 – The standard Mini-Boot Sequence for Windows 7 Enterprise is underway. Again, this is a Virtualized Guest Partition running on a Windows 7 Enterprise Host. Once this Guest Partition is complete with selected Security Updates and Applications I will duplicate the Virtual Hard Disk storing one ‘unsealed’ version for future Updates and using the second by ’sealing’ using the Sysprep Process as the ‘master’ for duplicating as many times as required based on the need for a Windows 7 Enterprise Image.
Figure 15 – One of the Features of a Virtual PC Configuration running on a Windows 7 Enterprise Host is the requirement to Install the ‘Virtual PC Integration Components’ to achieve real usability. Upon initially attempting to select the ‘Next’ Button from Figure 14 above, a Popup like this appears. Do note the ‘Ctrl+Alt+Left Arrow’ requirement to ‘release’ the mouse point prior to installing the Virtual PC Integration Components. Once the VPC Integration Components are installed (Requires a Reboot) this Key Sequence is no longer necessary.
Figure 16 – The Guest Partition is ready to installation of Windows 7.
Figure 17 – The Windows 7 Install Process requires Acceptance of the License Terms to advance.
Figure 18 – The Default allocation for a Dynamically Expanding Virtual Hard Disk Size is ‘127 GB’. This information correlates to Figure 6 above.
Figure 19 – Succesful selection of a Partition advances the Installation Process to begin the exchange of files from the Windows 7 Source Media to the Guest Partition.
Figure 20 – The cycles of the Windows 7 Installation near a close. Again, once we build this Windows 7 Image once I will review using it successfully over and over.
Figure 21 – After a successful Reboot the ‘Set Up Windows’ Dialogue Windows offers the ability to configure the ‘first Administrator’ and the ‘Computer Name’.
Figure 22 – Since the ‘first Administrator’ controls the Workstation the Wizard advances the requirement for Password Confirmation and a ‘Password Hint’ field.
Figure 23 – The ‘Automatic Update Settings’ near the final step to a successful Login to this Windows 7 Enterprise Virtualized Guest Partition.
Figure 24 – After a selection of the ‘Time Zone’ and a validation of the correct Time I proceed.
Figure 25 – Finally, the Windows Firewall Settings correlate to selection of the ‘Computers Current Location’. I select ‘Public Network’ as the most restrictive Windows Firewall Settings are included.
Figure 26 – Success! Upon viewing the Windows 7 Enterprise Desktop I begin the process of installing the ‘Virtual PC Integration Components’. Again, these components allow interaction between the Virtual Environment and the Host Workstation in a fluent way.
Figure 27 – The Virtual PC Integration Components display as being ‘inserted’ into the Guest Partition CD/DVD. I select ‘Run Setup.exe’ from the ‘Autoplay’ dialogue windows.
Figure 28 – The ‘Virtual PC Integration Components’ use a typical .MSI Installation paradigm.
Figure 29 – The ‘VPC Integration Components’ install a variety of Drivers to ’shim’ between the Hardware Assisted Virtualization and Hardware Components on the Host Workstation.
Figure 30 – In this capture the ‘VPC Integration Components’ installation is complete pending a Reboot. Observe the Error Balloons offered carefully. Further investigation of this Error Balloon will occur following the Reboot.
Figure 31 – The pending Reboot moves this Installation closer to visiting Microsoft Update for Security, Critical and Important Updates.
Figure 32 – After a successful Reboot I login as the ‘first Administrator’ configured previously. I will begin the ‘patching process’ next. Additionally, I will add any Applications appropriate for this Image.
Figure 33 – The ‘Virtual PC Integration Components’ installed successfully as demonstrated by the availability of the ‘USB’ Drop Down Menu that includes integrating the ability to ‘Attach’ to the Host Workstation ‘ Desktop’.
Figure 34 – After a quick switch of the ‘Default Picture’ I am ready to begin next steps. These steps include 1) applying Security Updates and 2) installing Applications. Applications for consideration are any used in the Image that would require time and effort in the future when provisioning this Virtualized Image for usage. Time spent once is gained back triple if carefully installed.
Figure 35 – A clean, working Desktop is available in this Virtualized Guest Partition running Windows 7 Enterprise. Control of this Image is available through the Host Workstation. I will begin adding appropriate Security, Critical and Important Updates from Microsoft Update.
Figure 36 – Upon selecting ‘Control Panel’, then ‘Check for Updates’ from the ‘Windows Update System and Security Center’ I begin to mature this Image to full health. Remember, I selected ‘Public’ as the ‘Network Connection’ which provides well defined Windows Firewall settings.
Figure 37 – After selecting and installing a varity of Security Updates a Reboot is in order. I will ‘complete’ this Image by adding additional Applications for productivity.
Figure 38 – Success! Again, this is the first sequence of steps to mature this Image for additional use.
Summary: In this Blog entry focused on creating and maintaining a Windows 7 Image using Virtual PC on Windows 7 I initiated the creation of a Virtual Guest Partition running Windows 7 Enterprise Edition. this Virtual Guest Partition running Windows 7 Enterprise Edition will be used in subsequent Blog entries where both ’sealed’ and ‘non-sealed’ Images will be preserved.
Lynn Lunik