Why I Love My Virtual PCs

Posted by on 2004年2月7日

Information, tips, links, and a brief overview of Microsoft Virtual PC 2004

When Virtual PC appeared on the download list for MSDN Universal Subscribers I knew this was going to be a hit with developers. It had been about 2 years since I had used VMWare, and it suddenly hit me how useful this product would for everyday work in development, testing, and exploring.

A Virtual PC creates a computer (a virtual pc) inside of your computer (known as the host). The Virtual PC has a network adaptor, a sound card, a video adaptor, and even it’s own BIOS settings – all implemented in software. The changes you make to a virtual PC do not change anything on the host computer. You can install operating systems on the virtual computer without partitioning any of your hard drives. You can run multiple virtual PCs, turn them on, reboot them, and suspend them, all while continuing to read email and play audio files on your host. You can install software on a Virtual PC and keep an “Undo” disk to roll back changes afterwards. This creates a great environment for software testing and tinkering.

Practical Advice

Robert Moir maintains a Virtual PC 2004 FAQ. This FAQ includes tips, tricks, and hints, as well as a list of known issues and security best practices.

Johnathan Maltz keeps a list of OS’s which work and don’t work in VPC 2004 (as Johnathan points out, the list of operating systems which work with VPC is vastly greater than the list of operating systems which Microsoft officially supports on VPC). Systems which do not work are the exception, not the rule. I have VPCs running Windows 2000 Server, Windows Server 2003 Web Server Edition, Longhorn (PDC Build), and Mandrake Linux.

Pretty much anything that can run on an x86 system should run on VPC. I’ve booted Damn Small Linux, which comes as a 50MB bootable CD image (so it can fit on a jump drive). Damn Small Linux includes a web browser, FTP client, windows manager, spellcheck, rdesktop, and a whole host of other stuff.

img1.jpg

Performance & Requirements

Robert’s FAQ has a number of tips about better performance in VPC 2004. If you are looking specifically to improve Longhorn performance, see the Longhorn teak guide.

If you are curious as to the hard disk requirements, here is a listing of some virtual pc images.

img2.jpg

Roughly 34 GB of space used across 9 virtual PCs, with the largest being a Longhorn install with the Longhorn SDK and Whidbey preview. The smallest footprint comes from Windows Server 2003 Web Edition.

A Quick Walkthrough Install

Every operating system setup is different, but we will walk through setting up a new and assume you have a bootable CD or bootable CD image to install from.

Once you have VPC installed you can launch the Virtual PC console from the start menu.

img3.jpg

Click on the New button to launch the wizard. On the Options dialog click “Create a virtual machine”. Give the machine a name, and a location to store the VMC file. (VMC files are small XML files with the configuration information, take a look at one in Notepad).

On the Operating System Dialog, select the operating system that most closely matches the OS you plan to install. On the memory dialog, you’ll need to decide how much RAM to give the VPC. Hopefully you can fulfill the minimum requirements of the guest OS.

On the next screen, “Virtual Hard Disk Options”, you can create a new .vhd file for the VPC, or select an existing file. This is where VPC gets interesting, as this file will represent a hard disk drive in the Virtual PC. Select the new file option for your first Virtual PC, then click finish.

You new virtual PC is ready to start from the VPC console. When started you should see a boot screen like the following.

img4.jpg

If you have a bootable CD, go to the “CD” menu in the host window and select “Use Physical Drive X:”, where X is the drive letter of the host CD-ROM. The virtual PC CDROM will now attach to the CD in the drive. For an ISO image, select “Capture ISO image…” and browse to the file.

At this point you are now on your way to installing an operating system on your PC. You can partition and format the virtual hard drive as much as you want – don’t worry it will not harm the host drive.

Once you have an operating system installed, with patches installed and updated applied, you may want to make a copy of the vhd file VPC created. This allows you to create additional Virtual PCs without the effort you expended getting to this point.

When I want to try some new software on a fresh machine, I copy a file I named Win2000SP4.NET.VHD. This contains a copy of Windows 2000 with SP4 applied. I upgraded IE to 6.0 SP1 and installed the .NET framework. Instead of doing this all over again from scratch, I make a copy of Win2000SP4.NET.VHD to another file, then create a new virtual PC in the wizard and attach it to this new file.

Undo

Another slick feature in Virtual PC is the undo drive. This feature is indispensable for testing software installations, because you can roll a virtual machine back to a pristine state to test installation options on a fresh computer. To start the Undo feature, shut down your virtual PC, go to the virtual PC console, highlight the PC and select settings. In the following dialog, click the “Enable Undo Disks” checkbox.

img5.jpg

With Undo in place, changes to the guest virtual hard drive are stored in .vud files. When you shut down the virtual PC window, you are given the option of discarding or saving the changes. If you choose to discard the changes the next time the virtual PC boots it will be just as if you had never made any changes to the system. You can also save the changes, shut down the computer, but still not commit the changes. This will allow you to keep working with the virtual PC with an opportunity to roll back to the previous state. Finally, you can shut down and apply all the changes you have made to this point.

Support

Microsoft has added the Virtual PC 2004 support center. Take a look to see the latest knowledge base articles and step by step how-tos.

Conclusion

This article takes a very brief look at Microsoft Virtual PC 2004. If you don’t use a virtualization product today, chances are you will soon. Gartner declared 2004 as the year of virtualization, and additional technologies and products are rolling out in this space (Microsoft is planning a release of Virtual Server later this year).

More resources:

An Introduction to Virtualization http://www.kernelthread.com/publications/virtualization/

Blue Alliance's blog http://www.bluealliance.it/weblog/200312archive001.asp

转载于:https://www.cnblogs.com/Stephen/archive/2004/05/02/8259.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值