Category Archives: VirtualPC

Arcane Combinations: Virtual PC and Remote Desktop

Sometimes a useful tool becomes even more useful when combined with another. I call these “Arcane Combinations”. The first combo I’ll talk about is Virtual PC and Remote Desktop.

If you are not familiar with these, you should read my previous posts. Virtual PC can be found here https://arcanecode.wordpress.com/2006/09/20/virtual-computer-software/ and here: https://arcanecode.wordpress.com/2006/09/20/virtual-pc-step-by-step/. Remote Desktop can be found here: https://arcanecode.wordpress.com/2006/10/09/remote-desktop-connection/.

So how does this work? Well, to the network a virtual PC appears as a real computer. It has it’s own IP address, which is the key. Launch your virtual computer, and determine it’s IP address. This is pretty simple, but if you don’t know how just open a command window (Start, All Programs, Accessories, Command Prompt). Then type in IPCONFIG and press enter. You’ll see something like:

Ethernet adapter Wireless Network Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

Note if you have multiple network cards installed you’ll see multiple IP addresses, pick the one for the adapter you want to use.

Now on a remote computer, launch Remote Desktop, and key in the IP address given by your virtual PC. And boom, you will be remote controlling the virtual computer.

Now that you know how, I’m guessing you want to know why? Why remote the virtual computer instead of the real one?

Performance to begin with. In my testing I’ve found slightly better performance by controlling the virtual machine as opposed to controlling the host machine then trying to use the virtual computer in it. This is especially true in times where I was stuck using a dial up connection to VPN to work, and needed to remote control my computer at the office. Performance was much better by remoting directly to the virtual computer.

Next, it would allow multiple users to share the same computer. Launch two different Virtual PC sessions and allow each user to remote to it. At my company we have a standard XP build with some company components preloaded on it. We had two vendors come in for a week to do a little work, and they brought their nonstandard laptops with them. We only had one spare development PC, so we set it up with two virtual sessions and let each vendor remote to the virtual computers from their laptops so they could do their testing in our customized environment.

Some last words of wisdom, you will want your host computer (the one running Virtual PC) to be a hefty box, and good band width is helpful, although I have gotten it to work over a dial up connection.

Give it a try, and leave a comment if you find other scenarios where this arcane combination would be useful.

Virtual PC and Laptops

It’s been a crazy week here in the land of Arcane Code. Lots of traveling during a business trip, then the mad rush to take care of all the issues that arose while I was gone. I wanted to share a quick tip with you, now that you’ve had a chance to install and use Virtual PC.

If you run VPC on a laptop, as I do, you may have noticed some weird quirks especially when your laptop goes into Hibernate mode. Mostly the VPC becomes unresponsive, or in my case the main screen quits updating. Oddly enough the tiny icon window inside the VPC Console updates fine, but the big window doesn’t. Go figure.

Microsoft released a HotFix for this, but it didn’t get a lot of publicity. I found it buried in Virtual PC Guy’s weblog (http://blogs.msdn.com/virtual_pc_guy/archive/2006/07/13/662538.aspx). Since it’s brief I’ll regurgitate it here, in case you are a cautious type about link clicking.

I think the reason the hot fix is hard to find is because you already have it. Go back to the directory where you exploded the Virtual PC 2004 file. In addition to the Setup.exe, the MSI and INFs you’ll also find a directory called “Laptop Hotfix”.

In this directory is a text file that looks mostly like a license. However, at the top of the file is a link to the knowledge base article (http://support.microsoft.com/?kbid=889677) that describes a few of the nasties that this patch repairs.

What’s really important though is the MSP file. Just double click on it to install, and it should patch your system. If you are running a laptop, or regularly use the Hibernate or Standby features of your computer then you need to apply this patch.

I haven’t seen mention of this if you are running Virtual Server 2005, so perhaps they already included the fix there. If someone knows otherwise feel free to leave a comment.

Using and Tweaking Virtual PC

Once your Virtual PC is up and running, you may want to tweak a few of it’s settings. Let’s go over the menu options available to you.

Action Menu

This menu is fairly straight forward, and lets you initiate certain actions.

Full Screen Mode: Just what it says, shifts your OS into full screen mode.

Ctrl+Alt+Del: Sends the Ctrl+Alt+Delete sequence to the virtual OS instead of the host OS.

Pause: This places your OS into a stasis mode. This can be useful if your host system gets overloaded and you need to free up some resources. Note that it doesn’t close the window, merely suspends it.

Reset: This is the equivalent of yanking the power plug, then plugging it back in. You should only use this in extreme cases where your virtual OS is locked up.

Close: This brings up a small dialog window that asks if you wish to Save State or Turn Off. Turn Off is similar to Reset, in that it just stops whatever was going on and dumps the VPC from memory. Like Reset, you should only use this in extreme cases. Save State is very similar to the Hibernate mode in Windows, it puts the virtual OS into a suspended state.

Install or Update Virtual Machine Additions: This will install some very useful tools into your Virtual OS. These additions will make it easier to use the mouse (no more having to hit Right Alt to get your mouse out of the window). It will also allow you to share your host computers hard disks with the virtual computer. To the virtual computer they will appear as a network drive. If you use windows as a virtual OS, you’ll definitely want these additions. Be aware though that virtual additions also exist for many Linux distros.

Properties: Displays a four tabbed dialog that will give you info about your running virtual computer.

Edit Menu

Most of the items on the edit menu are pretty obvious. Copy, Paste, and Select All do just what they say. The real gem is Settings, which lets you tweak your VPC settings. I will focus on it shortly.

CD Menu

Your CD menu will vary depending on how many CD/DVD drives you have in your machine. All will start with Use Physical Drive and let you access your computers CD/DVD drive to do common tasks like load software or listen to your favorite tunes.

Also on the menu will be a Release Physical Drive for each drive you are using. When you no longer need the drive, you can click Release to free it up. There’s also an Eject CD option to pop the CD out without releasing use of the drive.

Capture ISO Image will let you take an ISO file, and treat it as if it were a real CD or DVD. This is quite useful for all those ISO images you wind up downloading from your MSDN subscription. (For those unfamiliar, an ISO is a CD or DVD disk image. You can use software such as Nero, Sonic, etc. to take the ISO and turn it into a CD full of files. )

BUG ALERT!!!! VPC has an issue with this Capture ISO Image command. There is a size limit of approximately 2 gig. If the ISO is bigger than that, VPC will fail but give you some really odd errors.

To get around this, in the host OS you can first mount the ISO like I describe in my September 13th blog post (https://arcanecode.wordpress.com/2006/09/13/virtualization/) then, using the machine additions, share the drive.

Floppy Menu

The commands under Floppy are almost identical to those in CD. I can’t recall the last time I used a Floppy, heck my last two computers don’t even have floppies, so I suspect this isn’t a command you’ll use much. But just in case, it’s there.

Help Menu

The Help menu has three commands, Virtual PC Help brings up the help file. Virtual PC Online takes you to the Microsoft site for VPC. Finally, About Virtual PC brings up a dialog displaying the version number and other info about the virtual environment.

That wraps up the menus, now let’s talk about Settings.

Settings

Accessible from either Edit, Settings or the Settings button on the Virtual PC Console, this dialog is where the real power resides to tweak your VPC. Let’s take a look at some of the more useful options.

File Name: Lets you rename the virtual machine. Sort of useless since you can do it from the OS, but what the heck.

Memory: This can be useful, in various ways. First, you can test your application to see how it performs under various memory conditions. Second, you may discover you’ve set your VPC too low. Finally, you may shift your VPC from one host computer to another, and the new host may not have as much ram (or more!).

Hard Disk 1..3: These will let you assign a virtual hard drive to a virtual computer. When you copy an existing VPC to create a new one, you’ll want to open up the settings and point to the new VHD, otherwise you’ll wind up still accessing the old one, which more than likely isn’t what you want.

Undo Disks: When enabled, this will write all changes you make to a VPC to an undo disk. When the session is over (i.e. you turn it off or reboot) you are asked if you want to commit your changes or discard. If you commit, your changes are placed into the VHD as you normally would without undo disks.

However, if you elect to discard, then the changes are thrown away. Your VPC is reset to the same condition it was when you first started. This is quite useful if you want to test install programs, to make sure everything installed correctly but don’t care about it after that. It’s also useful for training environments.

Networking: Under networking you can select which network card in your real, host computer to give the virtual machine access to. For example, my laptop has both wireless and wired networking, and through this option I can select which one to use (or I can select both). This mode is known as Virtual Networking.

In addition to Virtual Networking VPC also supports three other modes. Not Connected is pretty obvious, you are not allowing any network access. Local Only is used when you want to communicate with other virtual machines on the same host machine. This can be useful when you need a virtual pc to act as a client talking to a virtual server.

Finally, VPC has a mode called Shared networking (NAT). This is useful when you are using a dial up connection. Each VPC gets it’s address from a temporary, internal DHCP server. It then communicates to the internet via the host computer, which handles the network address translation. This is very similar to the way your home router talks to all of the computers on your home network.

Mouse: Once you install the machine additions, by default the mouse has pointer integration turned on. This is pretty simple, when you drag the mouse into the area of the window occupied by the VPC the mouse automatically is captured and used in the VPC. When you drag it out, it releases it.

There are a few cases where you may want to turn it off, such as when you are using a software KVM such as MaxiVista with it.

Shared Folders: Through shared folders you can access physical drives on your host computers environment. While this may seem quite convenient, you need to be careful. Opening up your host system to the virtual environment can present a security risk. If your virtual environment should get infected, that infection can spread to your host OS via the shared folders.

If you do choose to share folders (and sometimes you do need to), it will appear to your virtual OS to be a network drive. Normally this is no biggie, but be aware it can cause some trust issues with Visual Studio when attempting to open projects. I’ll post a fix for this later…

Tweak away

Hopefully now you have a good understanding of not only how to setup a Virtual Computer, but how to tweak the settings in VPC to make it do what you need. Don’t be afraid to experiment, change some settings and see what effect it has! (Just be sure to back up first!)

Virtual PC Step by Step

Update: April 10, 2008 – While the instructions below are still valid, I’ve created a new version of this post for Virtual PC 2007. And it’s in Video! Take a look at my post for
April 10, 2008 – Virtual PC 2007 Step by Step – The Video!

Update: April 22, 2008 – There’s a second video now showing the advanced settings. Some good info that adds to the scope of what’s here. Check out my post for
April 21, 2008 – Virtual PC 2007 Step by Step – The Advanced Settings Video!

OK, you’ve downloaded Microsoft Virtual PC (here after referred to as VPC) and installed it. The first time you run it, you see the display below. Now what? Let’s walk through it step by step.

Step 1: Create a new virtual computer

Start by clicking on the New button, and you’ll see this dialog:

Creating a virtual machine seems like the way to go, but let me mention the other two options briefly. Use default settings to create a virtual machine isn’t that useful, it creates a VPC but with minimal memory. I wouldn’t ever use this if I were you. Add an existing virtual machine on the other hand can be quite useful.

Virtual PC stores it’s data in two files, a VMC file that saves the various settings for your virtual computer, and a VHD which is your virtual hard drive. Copying these two files to another computer, launch VPC and pick this Add option, and you will open the VMC file. Away you go, you’re working in your VPC.

But let’s get back to the task at hand and create a brand new machine. Click Next to see this dialog:

It’s asking you what you wish to name your computer. You should make sure to read this carefully, if you don’t give a path then by default the vmc file will be placed in your My Documents\My Virtual Machines directory. The problem is this is your C drive, and if you are following directions you really want to run your VPCs off a different drive other than C.

I created a VPC directory on my D drive, I’d suggest you do something similar. That way you can store your VMC and VHD files in the same location. For a new machine name then, type in D:\VPC\My New Machine and click next. (By the way, in time you’ll want to use a better name, such as MyXP or MyUbuntu, but for now this will do.)

Step 2: Select your Operating System

On this screen it will ask you what operating system you’d like to install. As you can see, there’s lots of built in support for past Microsoft OS’s (and oddly OS/2). If you are installing anything else, such as a Linux distro (short for distribution), select Other, otherwise select the OS you will be installing and click Next.

On the next display you will be asked about the amount of RAM to use.

Step 3: Adjust your RAM

By default, VPC selects Using the recommended RAM, which is a measly 128 meg. Unless you are running DOS or some older OS, I would suggest bumping this up to at least 256 meg. You may want more, depending on what you’ll be doing. For doing Visual Studio development, I’d go 512 to 1024.

Click the Adjusting the Ram option and the slider bar will appear. Use it to move the RAM up or simply type a new value in the text box and click Next.

Step 4: Select or create your hard disk

On the screen above you are asked about the Virtual Hard Disk, or your VHD file. This is another of the screens that baffles me. I wonder what bizarre logic was being used that assumed you usually had an existing VHD when you were creating a brand new virtual computer? Unless for some reason you have to rebuild the VMC file, select the A new virtual hard disk option and click next.

On this screen you are asked what you want to name the VHD file. Be default, it uses the name you gave the VMC file and adds “ Hard Disk” to it. I usually just take this default and click next.

Step 5: Confirm your choices

We’re finally at the last screen in the Wizard. Here all you have to do is confirm your choices, and click finish. So what happens next?

Well, nothing spectacular. Your Virtual PC Console will now look like this:

Now it’s time to install an operating system.

Step 6: Install an operating sytem

First, make sure your OS boot / install disk is in your CD/DVD drive. Now make sure your machine is highlighted and click Start.

A window pops up, and looks just like a computer booting up. All of a sudden you’ll see the words “Reboot and Select proper Boot device or Insert Boot Media in selected Boot device”. Now what?

Well, all it’s telling you is that it can’t find anything to boot from. By default, Virtual PC will protect you by not automatically giving access to any of the devices (hard disks or CD/DVDs) on your host system. To fix this, simply click on the CD menu, then pick Use Physical Drive E: (or what ever drive letter your CD is). Now click in the window and hit ENTER.

If all is well, your CD should start up and you will begin the process of installing whatever operating system you’ve placed in your drive. Walk through all of the steps like you normally would, formatting your hard disk, setting up partitions, etc. Don’t be worried, you won’t be hosing your real drive, but installing to your virtual drive (your VHD file).

Step 7: Configure and protect your VPC

OK, your new machine is up, now what? Well, if you are running a Windows OS I would highly suggest the very first thing you do is install AntiVirus software and a decent firewall. I know, you’re thinking “Why? My host system has these installed, won’t they protect it?” To which my answer is, NO.

You see, to the network the VPC is a real computer, with it’s own IP address and everything. It’s just as vulnerable to attacks as any other computer. If not, you couldn’t use it for a Honeypot (see my previous posting). So protect your VPC!

You’ll then want to install any system updates, to patch any security holes. It doesn’t matter if you run Linux or Windows, there’s bound to be some patches for your system out there.

Some tips for running a virtual PC

Now that you are safe and secure, you can use your OS as you would any other OS. A few tips:

  • If you want to move your mouse out of the VPC window, hit the Right ALT key. (Note the left one won’t work, has to be the right one). This will let your mouse exit the VPC window.
  • Use Right ALT + ENTER to toggle between window and full screen mode.
  • Use Right ALT + Delete in place of CTRL+ALT+DELETE for your VPC.

Finally, when you are done you have several options to exit your VPC. First, you can shut down normally from within the OS. This is the least troublesome method, but as you are doing a shut down (then later a start up) it’s more time consuming.

You can also click the Red X (cancel button) on the window, or select Action, Close on the menu. A dialog appears asking if you want to Turn Off or Save State. Save State is similar to putting your system in to hibernate mode. It writes the system state to a file with a VSV extension (and the same file name as your VMC file). Later when you restart it restores your PC just like it was.

Well, usually. I’ve found that sometimes the network doesn’t always reconnect correctly after going into Save State mode, and sometimes I’ve had issues with Linux recovering. You’ll just have to experiment to see how it works for you.

Turn off dumps the PC, sort of like yanking the plug out of the wall. For this reason I suggest you only use this when the virtual environment is totally locked up and you have no other choice.

Wrap up

Well there you go, you’ve now got a spiffy new Virtual PC you can use and abuse. In the next post we’ll talk about tweaking your Virtual PC, and the various menu options for VPC.

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…