Virtual Computer Software

So my last post got your appetite going. You’re ready to go setup some virtual computers, now all you need is the software to do it. Say no more! There are a lot of different packages on the market, but I’ll contrast a few of the most popular here.

Microsoft Virtual PC 2004

VPC (Virtual PC) is Microsoft’s offering to the virtual computer arena. Using it you can run not only other Windows systems but other operating systems such as Linux. For maximum usability, you’ll want to install the virtual machine additions. These additions will add some usability features, such as the ability to access the host OS’s hard drives.

Pros: Easy to configure and use. Small download, light on system resources. And it’s free!

Cons: No support for USB devices, can be a little slow especially if you have a borderline system. Only runs on Windows, no support for Linux as a host (although many Linux distros will work inside it). No support for SCSI drives.

Note that while USB support is not built in, your USB mouse and keyboard will work just fine as VPC will translate into something the virtual OS (Operating System) will understand. Also, if you have an external USB drive, if you share it through the virtual machine additions it will look like a network drive and work OK.

In addition to the resources below, there’s also a technical whitepaper available at http://www.microsoft.com/windows/virtualpc/evaluation/techoverview.mspx

Main page: http://www.microsoft.com/windows/virtualpc/default.mspx

Download site: http://www.microsoft.com/downloads/details.aspx?FamilyId=6D58729D-DFA8-40BF-AFAF-20BCB7F01CD1&displaylang=en

VMware Workstation

The VMware product is the granddaddy of virtualization. It is robust, and easily runs anything you throw at it. Similar to VPC it will run many types of desktop systems.

Pros: USB Support, easy to use. Has versions that will run under both Windows and Linux hosts.

Cons: Expensive, $189 US for the download version (a trial version is available). Must choose which host version (Linux vs Windows) you want when you buy.

Main page: http://www.VMware.com/

Download site: http://www.VMware.com/products/ws/

VMware Player

The VMware player is just what it says. It will run a virtual computer, but it cannot create one. So how would this be useful? Well, you could be in an environment where you local administrator has a copy of the VMware Workstation product, and creates your VM’s (Virtual Machines) for you. Then each developer just needs the player in order to be able to use it.

On the web, people have created images called “appliances”. These appliances are ready to run images for the VMware Player. Note that because of licensing issues, these appliances will all be based on open source OS’s such as Linux.

Finally, VMware Player will run images created by the Microsoft Virtual PC product. Thus you could create your image with VPC and run with the VM Player. Note though I’ve had mixed results with this. The Windows based appliances have worked OK, but the Linux Ubuntu appliance I created with VPC didn’t work correctly under VM Player.

Pros: Free, easy to use, get the robustness of VMware without the cost. Both Windows and Linux versions available.

Cons: Cannot create appliances (a.k.a. virtual computers), only run them

Main page: http://www.VMware.com/

Download site: http://www.VMware.com/products/player/

Virtual Appliances available at: http://www.vmware.com/vmtn/appliances/

Microsoft Virtual Server

While it’s sister product, VPC is optimized for running desktop environments, Microsoft Virtual Server is a product that is designed for running servers. While it can be used as a development environment, it can also be used in a production environment.

Enterprises are using Virtual Server to consolidate several physical servers onto a single large box. They are also using it to setup test environments when those test environments will be used for a limited amount of time.

While both VPC and Virtual Server will allow networking between virtual computers (and real ones), Virtual Servers will let you create an entire virtual network.

For more information on the differences between VPC and VServer, see the white paper on the Microsoft site at http://www.microsoft.com/windowsserversystem/virtualserver/techinfo/vsvsvpc.mspx

Pros: Free! Will run under XP or any Windows Server product. (Note that running on XP is only suggested for development, not production.)

Cons: No USB, No sound card support, limited graphics support. Can only run Windows Server products and Windows XP as virtual OS’s. Cannot run on Linux, only Windows.

Main page: http://www.microsoft.com/windowsserversystem/virtualserver/default.mspx

Download site: http://www.microsoft.com/windowsserversystem/virtualserver/software/default.mspx

VMware Server

VMware Server will let you create and run a variety of OS’s in a server environment. Has full support for USB, SCSI, and more. A very robust solution for the enterprise or for development.

Pros: Free, easy to use, all the robustness of VMware Workstation without the cost. Great support for Linux, both as host and guest.

Cons: Only runs on Windows Server or Linux hosts. Will not run with Windows XP as the host (although XP can run inside VMware Server as a guest).

Update: I have since learned the server version will run just fine on XP. Additionally, it will support USB and Audio, although not by default. You will need to click on the Add Hardware Drivers to add them to the Virtual OS. I’ve had issues though with Vista RC2 and USB crashing when you try to exit Vista, so I don’t suggest using USB with Vista RC2 at this time.

Main page: http://www.VMware.com/

Download site: http://www.vmware.com/products/server/

Licensing Issues

You should note that for each Virtual Machine you create, you will need a license for the operating system you install. For Linux it’s easy, since most distros are free. For Microsoft Windows however, you will need to purchase a license in some fashion.

Many of us work in enterprises that provide us with MSDN licenses. If so, your MDSN will give you licenses to each of the OS’s Microsoft has created. If not, you may wish to look into a Microsoft Action Pack subscription. The action pack gives you 10 XP licenses, 1 copy of most of their servers, plus 10 copies of Office. Check out https://partner.microsoft.com/global/40009735 for more info.

Danger Will Robinson…

I should warn you that running virtual computers can be very hardware intensive. 2 gig of ram is recommended, 1.5 gig is passable, 1 gig is a bare minimum.

In addition, you’ll need a lot of disk space. Remember each time you create a virtual computer you are duplicating an entire OS. The ideal situation is to have two physical hard disks. Place your host OS and software on one drive, all your virtual computers on the other drive.

Choices Choices Choices!

So you’ve read all of this, and all you really want to know is, which product should you use? Well, after experimenting with the various products above, here’s my humble take.

If you have some available funds, and are looking for a good environment to develop in, then the VMware Workstation is a good choice. It handles a lot of things like USB that it’s main competitor does not.

If you are looking to develop on a budget, or this is your first time in the virtual world, then I suggest Virtual PC. VPC is very easy to install, setup and use. Since it’s free, you have nothing to lose.

For the upcoming blog posts, I’ll be using Microsoft Virtual PC for my examples. Since it’s free, it will be easy for the vast majority of folks to follow along. So what are you waiting for? Go download it and let’s get going…

Advertisements

Why Virtualize

Someone asked me the other day, why run virtual computers? Good question. First though, I ought to take a moment to explain what a virtual computer is.

A virtual computer is much like it sounds, it’s a fake computer. It runs inside a host, which resides on your real computer. For example, I could be running Windows XP on my real computer. Inside, I could run some software that would let me create a virtual computer running Windows 98.

The software that runs virtual computers works by abstracting the hardware then essentially lying to the virtual computer. The virtual operating system has no clue it’s virtual, it thinks and acts like it’s real. If it needs to make a hardware call, it does so and the software intercepts it and sends it to the real hardware on the host computer.

There are several options for running virtual computers, each with it’s own pros and cons. I’ll discuss the choices in my next post, for now let’s discuss some of the reasons for making use of virtual computers.

Emulating Operating Systems

When developing server components, it’s handy to have a spare server lying around. Unfortunately not all of us have the extra hardware handy to run a server. Using virtual computers, I can run Windows Server 2003 on my workstation, which is actually running Windows XP.

I’ve been interested in learning more about Linux, but don’t have a spare computer lying around, nor do I want to fool around trying to get dual booting to work. Using virtual computers lets me play with multiple versions of Linux without risk to my Windows system.

Multiple Configurations / Environments / Legacy apps

If you work in a large company, you often have to support multiple environments. For example, we are in the process of starting a new SQL Server 2005 project, but at the same time need to support our current SQL Server 2000 servers until they make the transition. Using multiple virtual computers lets me have one environment for 2000, another for 2005 without worry I’ll break one or the other.

Testing

“But it worked on the developers machine.” Ah how often have we heard that little gem! Virtual computers allow us to setup a base environment we can test our installs on, before we ever turn our apps loose on the users.

At work we have a base image all of our computers get when we first receive them. Using the base XP image I create virtual computers, and can ensure my new app runs OK.

You can extend this to not only your apps, but other apps. We’ve all seen some hot new app on the internet we wanted to try, but just weren’t sure about. By installing on a virtual computer we can test in our environment, see the reactions. If we don’t like it, just toss the virtual computer, no harm done.

Security

If you browse the web you are well aware of all the creepy critters waiting to assail you. Worms, viruses, Trojan horses, and that worst, most despicable of all creatures, the spammer wait for us around every corner.

Using a virtual computer protects you. Sort of like Las Vegas. Whatever happens there, stays there.

By their nature, a virtual computer is isolated. It has no idea it’s a virtual computer, no idea about it’s host (unless you specifically share a host’s drives, but that’s something you must do explicitly). Thus if you virtual computer comes down with a virus or other nasty, you can simply delete and rebuild and away you go.

Training

Using a virtual computer you can setup custom environments for each class or subject you need to teach. Users can use the OS to their hearts content, customizing it for their needs. At the end of each training session machines are easily reset by copying the base image to over the used one.

Honeypots

Here’s a sneaky trick some system admins do. (Thanks to Wallace Allison for telling me about this). They will first secure their real servers behind layers of security. They’ll then create a virtual server, or perhaps some virtual computers and deliberately expose them to the web. They become magnets to hackers who will attack the system.

Using diagnostic tools system admins can analyze the attack, and fortify their real servers against them. They can block the IP of the attacker, and maybe even help bring the offender to justice.

System Independence

Each night I make regular backups of my virtual computers onto my external USB hard disk. If my computer ever crashes, all I have to do is install my virtual computer software and I’m up and running with little downtime.

So that’s why!

There’s a few reasons why virtualization is a great thing. In my next post I’ll show you some places where you can get your own copies of virtualization software and begin setting up your own machines!

Virtualization

One of the tools I have been using a lot of lately is Virtual PC. It’s come in very handy, so over the next few entries I’ll be discussing this and other handy virtualization tools.

Before we get into virtualizing an entire computer, let’s start with just the CD/DVD. There’s a great tool you can get from Microsoft that will allow you to take an ISO image and fool your computer into thinking it’s a CD or DVD mounted in a drive.

The name of the tool is Virtual CD-ROM Control Panel for Windows XP, you can get it by clicking the link, or if you are the distrustful type (and you should be) instead follow these short steps:

First, go to:

http://msdn.microsoft.com/subscriptions/faq/

Scroll down to MSDN Subscriber Downloads, and click on “What are ISO image files and how do I use them?”

When it expands, toward the bottom you’ll see a section “Mounting ISO files virtually”. Click on the link to download “Virtual CD-ROM Control Panel for Windows XP”

Once you download, the file will expand to 3 files, readme.txt, VCdControlTool.exe, and VCdRom.sys. The readme.txt file has the directions, but the short version is:

1) Copy VCdRom.sys to your %systemroot%\system32\drivers folder

2) Put the exe somewhere and launch it.

OK, your install is done. When you launch it you’ll see this screen that’s not overly intuitive.

OK, this is the tricky part that’s not quite clear in the directions: The very first time you run the program you should click on Driver Control. In the dialog that appears, click on Install Driver, then navigate to the location you put the VCdRom.sys file. Once you click on the sys file click Start to start the driver, then OK to close the dialog. OK, that’s done, you never have to do this again.

From here it’s pretty simple. Click on Add Drive to grab an unused drive letter. The app gets the highest available unused drive letter, typically Z.

Now you have an available drive, click on Mount. When the dialog opens, find an ISO image you’ve downloaded or created (most likely from MSDN, but any ISO works). Once you click Open, a dialog will appear to confirm, normally I just take the defaults and click OK.

Ta da! Your ISO now appears to the operating system as if it was a CD (or DVD) mounted in a drive. When you are done, just click Eject back on the VCDRom panel. That will leave the drive letter available but the ISO will no longer be accessible.

Need more ISO’s mounted at once? No problem, just click Add Drive again, to get another drive and mount it. Done with the drive letter? Just click on it, then click Remove Drive. Finally, if you eject an ISO then decide you want to remount, just click on the drive letter and click Remount.

There you go, a free way to use those ISO images without having to burn them to a CD or DVD first!

Multiple Monitors Made Even Easier

So, you have multiple monitors. Whether you have several real monitors, or they are through the MaxiVista tool mentioned in the previous post, you’d like to get the most out of them. One thing that drove me nuts was having my apps on a second window but having a toolbar on the main window. Also, what’s with the desktop? Why do I have to have the same image on every monitor?

Well I have another cool tool that fixes these problems and more: UltraMon. UltraMon (http://www.realtimesoft.com/ultramon/) puts a taskbar on every monitor you have. It then puts the apps you have running on that monitor in it’s toolbar, and removes them from the main monitor’s bar which really helps with clutter.

You can also customize the desktops, having a different picture for each monitor. This means I can put my adorable kids in one monitor and my long suffering wife in my second display. Or, if you have a really wide photo you can have it stretch over all of your monitors.

It also adds some cool icons up beside your min / max / cancel buttons on a window, one button will stretch the current window over both monitors. The second button is much more useful, it will move the current window to another window and automatically rescale it for that window.

It works really well with MaxiVista, or with multiple real monitors. And (as of the date I post this) it’s only 39.95 (US). Plus they have a trial version, but be careful, once you try it you’ll get hooked (I did!).

Standard disclaimer, I don’t work for them, make no money off sales, or receive any compensation, I just think it’s a cool developer tool!

Multiple Monitors Made Easy

A lot of us have a spare computer lying around. Maybe an old laptop, that still works but isn’t really suitable for most modern apps. Or, maybe you have both a desktop and laptop that you use at the same time. It’d be sweet to remote control your laptop from the desktop, but still use the laptops internal monitor. MaxiVista (http://www.maxivista.com/) makes this trivial. When you buy the software, you first install the server piece on what is referred to as the “Primary” computer. It then creates a small exe that you run on the slave computer, known as the “Secondary” computer.

When running, it takes over the secondary computer, letting you drag your applications onto it, just as if you had a true second monitor hooked up. I find this very useful when I work out on my back porch. I take my main laptop, along with an older laptop. I can then use the older laptop, which normally just sits gathering dust, as extra workspace to drag my e-mail onto. Also handy with Visual Studio, you can drag help or some of the tool windows onto it.

If you spend a few extra dollars for the Professional version (right now on sale for $27.96 US) you also get remote control. I find this VERY useful. I use it in my home office, and run the secondary program on an older desktop. I then remote control the desktop from my powerful laptop, and can offload tasks to the desktop like downloading updates or files from MSDN. All controlled from my laptop’s keyboard and mouse.

Again, if you step up to a ‘whopping’ 35 bucks (US) you can get the Mirror Pro version. This allows you mirror your machine to another computer. Think eXtreme Programming here, or maybe just code reviews. I’ve used this to mirror my desktop to a coworkers machine so we could do some code reviews. Much nicer than both of us hunched over trying to view the same monitor!

Some miscellaneous things: The Pro and Mirror Pro versions will let you control up to three secondary computers, which I have done. MaxiVista runs over a network, it is not a replacement for remote desktop control software. It’s intended for situations where all of the computers are together in the same room.

Some standard disclaimers, I do not work for MaxiVista or have any financial affiliation, I just think it’s a cool tool and endorse it with no compensation of any kind. All prices I quoted were on their website as of August 23, 2006. Prices will vary over time.

And finally, if I haven’t convinced you yet, you can download a free trial from their website. So what are you waiting for?

We interrupt this blog…

Just a quick interruption in the chain on developer tools. I purchase a lot of books every year. A significant amount come from Apress. I tend to like these because they are advanced books, for the most part target to the professional developer. You don’t waste money getting six chapters on how to write “hello world” in every book.

I like buying the print version of books, but doesn’t it always seem like when you need it you’ve left it at home? Recently Apress started doing something really nice. If you owned the print book, you could buy the PDF for 10 dollars (US). This seems like a reasonable price, so I have the convienience of always having the book with me on my laptop.

Unfortunately Apress is only doing the 10 dollar deal for a select few books. The rest they expect you to pay full price for, despite the fact you’ve already bought the print version. So I’m going to do something I’ve never done before: start a crusade.

I recently found out Apress’s head of marketing is a fellow named Paul Carlstroem. What I’d like to get everyone to do is e-mail Paul, and let him know you’d like the 10 dollar deal extended to ALL of their books. If we can get enough people requesting this, I think we could sway him to make a decision that would benefit both Apress and us, the consumers.

Please be polite, I’m sure Paul is a very nice guy, and we want to sway him with logic and reason. More flies with honey and all that.

So please, take a quick moment and e-mail him, paul.carlstroem <at> apress.com (note I’ve tried to mask the e-mail a little, I don’t want the poor guy to get spammed to death). He will return to the office September 1 2006, so if you can get your e-mail done before then we can really make an impact when he returns.

We now return you to your regularly scheduled blog…

More Free Education

In my last post I mentioned getting a free education, with no extra time. If you are willing to invest just a little time, there are even more educational opportunities out there in the form of user groups and code camps.

A user group is a gathering of geeks, typically focused on a particular aspect of development. These are clubs that meet on a regular basis, usually one evening a month. Each meeting someone presents a technical subject of some sort that is of interest to the group. These are great places to network, find out what other developers in your area are doing, and get feedback or help on things you are working on. Most user groups are free, or at most charge a very small fee to join the club.

Code Camps are a little different. They are larger gatherings that are held on a weekend, usually all day Saturday. Local experts deliver sessions on a variety of topics. Most are free, a few may charge a small fee to help defray costs but it’s still a bargain for the education you get.

So how do you find user groups or code camps in your area? Google! Or whatever your favorite search engine is. Just enter the name of your town followed by user group and if you live in even a moderately sized community you’ll find a wide array of groups to join.

If you are lucky enough to be in the Birmingham, Alabama area here is a list of code camps / user groups in my area that I am personally affiliated with.

BarCamp – http://barcamp.org/BarCampBirmingham – Coming up August 25th and 26th, this is a code camp where the attendees have a lot of say over the presentations. (If you’re not in Birmingham be sure to check the main barcamp.org site as there are BarCamps across the country).

Birmingham Software Developers Association – http://www.bsda.info/ – A group of developers that meet to focus on primarily Microsoft .Net but do cover other topics. I’ll be presenting at the November meeting on Developer Tools.

Birmingham .Net User Group (BUG.NET) – http://www.bugdotnet.com/ – This is a large group that focuses exclusively on .Net related topics.

Internet Professional Society of Alabama (IPSA) – http://ipsaonline.org/ – User group that discusses all aspects of internet development. Does cover .Net, but not exclusively.

Magic City Technology Council – http://www.bhm-tc.org/ – This group is a nice departure from most in that it focuses on methodologies more than nitty gritty code techniques. Recent sessions have covered Extreme Programming and Project Management, to name a few topics.

Note the list above is far from comprehensive. Birmingham had over 30 user groups in the area last I checked, the groups I listed above are the ones I am a member of. A quick Google will find many more.

Getting involved in a user group is the quickest, most inexpensive way to get a good technical education, and at the same time keep the magic of coding alive!