Techrepublic.com.com
2/7/2004
URL: http://www.zdnet.com.cn/techupdate/implement/system/tools/story/0,3800072528,39265844,00.htm
When the IT budget is very tight, you still need various hardware to test different operating systems. This section describes how to configure and customize VMware to relieve pressure on your IT budget.
If you often test hardware, operating systems, and applications, especially when detecting problematic applications, drivers, services, and patches, you will have a deep understanding of how it takes several hours to restart your computer. In this case, creating a test lab using virtual computer software will save you a lot of waiting time. Two popular applications are virtual PC (produced by connectix, which has recently been acquired by Microsoft) and VMWare. The following describes how to use VMware Workstation 4.0 to create a test lab on a computer.
Benefits of using a virtual computer
The Virtual PC software allows you to install and run guest operating systems on your computer's operating system. In this case, your computer plays the role of host. The virtual system shares the wks and saves them as files. Therefore, each virtual computer is independent of each other and between the virtual computer and the host. If a problem occurs on a virtual computer, the host and other virtual computers will not be affected. That is, you can continue other work when you restart the problematic customer operating system.
In addition to helping test hardware and software, VMWare and Virtual PC allow you to run different software platforms and their specialized software that are not compatible with your operating system. For example, on Windows 2003, you can run a Linux Web server and test office on Windows XP. In short, installing a virtual client operating system on a Workstation allows you to use fewer workstations for better training and IT technology support.
VMware and Virtual PC have similar features and principles. The main difference between the two is that VMware supports Linux as the customer's operating system or host operating system, while virtual PC cannot. In addition, a virtual PC version allows Windows to run on Mac operating systems.
Installation and software and hardware configuration requirements
First register a VMware license at www.vmware.com, and then download a program file of about 21 MB. If you want to test the software first, you can register a free 30-day demo version.
VMware Workstation 4.0 in windows can be installed on Windows NT, 2000 (workstation or server version), Windows XP Professional or home edition, and Windows Server 2003. You can obtain detailed information about host configuration requirements through the specifications of VMware Workstation.
VMware 4.0 supports the following Customer operating systems:
MS-DOS 6.x
Windows 3.1 to Windows XP Workstations
Windows Server 2003 web, standard, and Enterprise
Red Hat Linux 7.0-9.0
Red Hat Linux Advanced Server 2.1
Mandrake Linux 8.2 and 9.0
From SuSE Linux 7.3 to sles 8
Turbolinux Server 7.0, 8.0, and workstation 8.0
FreeBSD 4.0-4.62 and 4.8.
Netware 5.1 and 6.0The minimum hardware configuration required to run VMware Workstation 4.0 is as follows:
500-mhz CPU (multi-processor supported)
128 mb ram (256 MB recommended, but a maximum of 1 gb ram can be allocated between virtual devices)
100 MB free disk spaceIf you want VMware to run more than one operating system at a time, you need a much higher CPU speed and ram capacity than the minimum hardware requirement. If you use a processor of at least 1 GHz, 1 GB or more RAM, and assign a separate hard drive to each virtual computer that intends to run synchronously (in this way, there will be no competition for read/write operations between the customer's operating systems), which will greatly benefit the work of the test platform.
There are also the following reasons for the virtual computer to retain sufficient disk space. Each time you save your operating system configuration (called Snapshot/snapshot), you need enough storage space. Further, the virtual disk can be set to dynamic growth (you can choose to automatically allocate files that can be saved up to 2 GB when the storage space of the Virtual Disk increases ). Sometimes you also need to fragment the disk and compress your virtual system. In addition to the space occupied by the virtual disk files, you need more extra space.
For example, if you want to allow the total installation capacity of virtual Windows XP to grow to 10 Gb, you should leave around 22 GB space on the hard disk. If you plan to regularly take snapshots of disk configurations, you should leave 30 GB or more disk space.
After installing VMWare, follow these steps to create a test lab:
Configure a new Virtual Computer
Install the Operating System
Add VMware Tools to each customer's Operating System
Install and upgrade applications
Use snapshots to save test configuration data
Copy, back up, move, and rename a Virtual DiskConfigure a new Virtual Computer
Select File | new virtual machine from the VMware menu to create a new virtual computer. Select custom installation, select the target customer operating system from the drop-down list, name the new virtual computer, and set the storage location.
You will configure the ram size, network programs, and other devices as shown in the following screen. If you need to change these settings later, you can choose edit | edit virtual machine settings from the VMware menu.
Select the memory size of the virtual machine based on the recommended guest range recommended by VMware. The recommended range is determined by VMware based on the total number of available memory ()
Figure A: within the range of the total memory allowed by Vmware, you can adjust the virtual computer's RAM by increasing by 4 MB each time
Next, configure the network. Select bridged, Nat, host-only, or none (B ). Nat requires minimal or even no additional setup steps, which is the simplest. For bridged networking, you need to set a separate IP address for the virtual client on the network.
Figure B: Selecting Nat is the fastest way to connect a new virtual computer to the network.
On the screen below, select create a new virtual disk ). Another option is to reuse an existing virtual disk and enable VMware to access the physical disk. In the next case, the customer's operating system will directly read and write the disk or partition. This is especially useful when you want to create a multi-boot system when you want to run another or another operating system as your operating system. However, as this will directly access the physical disk, thus invalidating the protection for using a separate virtual disk, this is not the best choice for creating a test computer.
Next, determine the capacity of the Virtual Disk (c ). Remember to leave sufficient disk space for the test. The space should be the same as the disk space used for compressing the virtual disk or fragment. Splitting a disk into 2 GB of files will help VMware complete these operations. If necessary, you can also allocate the entire virtual disk capacity later instead of dynamically increasing it.
Figure C: the virtual disk will be dynamically increased unless you have other settings. Dividing a disk into 2 GB files will facilitate the fragment and compression operations to be discussed later.
Maximum disk capacity in the Workspace
The specify disk capacity dialog box indicates that the Virtual Disk cannot exceed the maximum capacity you have allocated. In fact, this is not absolute. VMware has later released tool software that increases disk capacity by using Norton Ghost. However, this process is lengthy and boring, so it is best to set a disk quota at the beginning to meet the test needs. An easier way to bypass the disk capacity limit is to add additional Virtual Disks to the customer's operating system.
After the disk capacity dialog box is completed, VMWare allocates these spaces. It takes some time to complete this operation.
Figure D is the VMware tab page. You can switch between customers' operating systems through this interface. The new Virtual Operating System is highlighted. In "Windows 2000 pro on X :/.". After the customer's operating system is configured, although the system has not been started, it still has a tab. The summary column also lists all the device configurations of the virtual computer.
Figure D: The new virtual computer is displayed on its tab.
When your operating system is disabled, you can click Edit virtual machine settings to add or modify the device configuration of the virtual computer. For example, to allow the virtual computer to print through the host, click Add in the Settings dialog box, and then select parallel port. VMware supports most of the standard devices you need.
In the edit dialog box, double-click a device to modify the device. For example, if you have more than one CD drive, when the operating system is running, Auto Detect may automatically find the drive and do not need to install the disk. Double-click the CD-ROM to change Auto detect to an unspecified drive letter. In each virtual computer, only one CD-ROM can be used.
Install Virtual Operating System
Once the device is configured on the new virtual computer, you can start to install the operating system. Place the operating system installation CD into the drive and start the new client by clicking start this virtual machine. You can also create an ISO image file and set the new customer operating system to start from the ISO image file: select Edit | virtual machine settings, click the CD-ROM to set the CD-ROM to your ISO image file location.
Input in new Virtual Computer
Initially, you must click the mouse in the VMware window before entering any mouse or keyboard on the client's computer. To remove the focus from the customer's computer, press Ctrl and ALT at the same time. After a new operating system and VMware Tools are installed, the host and customer system automatically capture the focus from the keyboard or mouse input.
If VMware is not started from the installation disc, press F2 at startup to enter the BIOS of the Virtual Computer (you should first click the mouse on the client computer screen to put the focus in this window ). Then select the boot menu and add the CD-ROM drive (e ). Press F10 to exit the BIOS.
Figure E: to boot the virtual system from the installation CD, add the CD-ROM to the virtual Phoenix BIOS boot menu
Your operating system setup program will strictly load and run the virtual computer as the actual physical computer. Note the following:
Disk formatting: When the setup program reports that it has found a new hard disk and warns that data on the drive C may be lost, please do not be nervous-no data on your host will be damaged.
Windows XP, Office XP, and Office 2003: These product registration licenses are valid each time the product is installed on a physical computer. These licenses must be activated over the Internet. If the activation service treats the new virtual computer as a separate hardware device, the product on the customer's computer will be set to a time-limited demo version. In this case, call the Microsoft product activation center number provided in the product manual. The staff will be very enthusiastic about providing you with an additional activation password, which will be used to activate multiple products installed on the same hardware device. However, you may need to pay an additional fee for registration.
About Service pace 3: Windows 2000 client operating systems that install the service pace 3 patch may not be booted. Upgrade to servicce pace 4 before disabling Windows 2000. If this cannot be done, there are other solutions for VMware.
Install Linux: the Linux X system graphics driver cannot work properly before VMware Tools is installed. Therefore, please use the text interface to install and do not start xfree 86 on the Linux console before installing VMware Tools. For more information about installing VMware Tools, see later. In addition, VMWare recommends that you disable the screen saver in the Linux operating system. Otherwise, the VM may stop running.For more information, tips, and tips, see the VMware Operating System Installation Guide or the Help page of VMware.
Install VMware Tools
The svga driver of VMware Tools is necessary to set higher screen resolutions and improve display performance on customers' computers. Other useful features of the software include switching the mouse or keyboard focus between the host and the client computer screen, and compressing the virtual computer to save disk space.
To install VMWare on a Windows client computer, first start the client operating system. When the customer's operating system is running, select file | install VMware Tools from the VMware menu.
Other VMware adjustment tools for a variety of Windows operating systems are available in the VMware Workstation guide released with the program.
To install VMware Tools on a Linux operating system, you must first start Linux and Log On As administrator or Superuser (Su. Do not start X server. Select File | install VMware Tools from the VMware menu, and then complete the following steps on the Linux console:
Mount the VMware Tools virtual CD-ROM image and go to the workspace directory, such as/tmp (this image file will appear in CD-ROM for Linux client computers ). Enter:
Mount/dev/CDROM/mnt
CD/tmp
Tar zxf/mnt/vmware-linux-tools.tar.gz
Then unload the CD-ROM image:
Umount/mnt
Run the following command to start the VMware Tools installer and exit from the root account:
CD vmware-tools-distrib
/Vmware-install.pl
Exit
Finally, type startx to enter the graphic environment interface. Once started, type vmware-toolbox in the terminal window to run the VMware Tools application in the background.
Install and upgrade applications and patches
Once the customer's operating system and VMware Tools are installed, you can install and upgrade applications and patches for the customer's operating system. This is exactly the same as making these settings on other systems. Download and install the Upgrade Program on the virtual computer.
Using snapshots)
The snapshot function allows you to save all the status information of your operating system, including disk data, memory, and settings, as needed. Using snapshots, you can restore any virtual computer to the previously saved state, which is useful for testing software and hardware. However, only one snapshot can be taken at a time.
To create a snapshot, you must first run the customer's operating system, and then select snapshot | save snapshot from the VMware menu. A message indicating "Saving virtual machine state" is displayed on the progress bar. It takes some time to complete this operation. Snapshot information is stored in a file with the. vmsn extension, and there are some additional files with the redo extension. After each snapshot is created, the previous snapshot is updated based on the current configuration of the virtual machine.
To return the customer's operating system to the previously saved configuration status, select snapshot | revert to snapshot in the VMware menu. You can select Edit | virtual machine settings, click the options tab, and then click snapshot. Check the lock this snapshot box to prevent the current snapshot from being updated (f ).
Figure F: locking a snapshot can avoid accidental changes to the setting information. Note that the date and time of the Current snapshot are displayed on the screen.
During software and hardware testing, you may find that it is useful to restore the customer's operating system to the snapshot state after each shutdown. This can be achieved by selecting revert to the snapshot under the when powering off setting on the snapshot options panel. Alternatively, you can choose to update your snapshot after the virtual computer is disabled.
To remove a snapshot, first disable the customer's operating system, and then select snapshot | remove snapshot. If the operating system is not disabled, this option is unavailable in gray.
Copy, backup, move, rename a Virtual Disk
Copy, move, and backup operations are simple. Select File | open from the VMware menu to notify VMware of a new or mobile virtual computer, just like operating on the file of the virtual computer. However, you must note that when you move a virtual computer to a different computer, you need to update the hardware environment to set up the customer's computer devices. Further, if the new computer uses different processors, the Linux client operating system may not work on the new computer. This is because during Linux installation, the installer will optimize the kernel based on the intel or AMD processor. (Responsible editor: Liu yanzhi)