In the previous episode of the series, I finished up tweaking the drivers in Windows 7 by using bootcamp 2.1. It worked for most issues, and what was left was pretty minor (intel chipset installer didn’t like Windows 7, nor did the inf file for iSight drivers, and bluetooth is flaky). I also remapped the keyboard in preparation, not that it helped.
So, armed with a working installation of Windows 7 on a Macbook Pro (sans Bootcamp), it’s time to see if I can get virtualization to work.
So in this entry we are going to explore installing and using Windows XP mode.
This “mode” has been much lauded by Microsoft as the way to get around the fact that a lot of software that runs fine on XP or earlier Microsoft OS’s, just absolutely, positively, cannot run on Vista or Windows 7. Important, custom business apps perhaps, accounting packages, or just much loved media programs that simply worked, and worked for years. Products that won’t ever be upgraded to work with Windows 7.
Good reasons all for not moving to Windows 7.
And Microsoft doesn’t like that, but has no choice but respect their customers’ need for these applications, despite the fact that they’re not made or sold by Microsoft. Shocking…
So Microsoft has decided to allow one free copy of XP SP3 to be available as “XP mode,” run in a virtual machine for people who purchase and are running Windows 7 (professional and higher of course, home users, for some reason, don’t get to use it).
All of this is basically old news at this point, except for installing it on a Mac.
XP Mode Requirements
You see, the requirements of XP Mode, in addition to those required to even install or run Windows 7 as the host, are:
– Windows 7 RC
-Additional 1GB of RAM (although the VM itself is set to use 256 MB by default…)
– Additional 15GB of available disk space (although the VM’s hard drive only takes about 1.6GB from the start)
-Processor capable of hardware virtualization with AMD-V or Intel VR turned on
**To check if your processor supports virtualization, use the Processor ID Utility. The Intel version is available at http://www.intel.com/support/processors/tools/piu/, and the AMD one here, http://support.amd.com/us/Search/results.aspx?k=AMD%20processor%20check (it’s the first link). I have an intel processor, so I used the intel one, of course. It was a short download and install, and it ran easily while all kinds of stuff ran in the background.**

** As you can see, it tells me that my processor supports virtualization, but apparently you may also need to configure the BIOS to enable it on some computer models. This is why I am just trying it out, because I can’t get into EFI on this machine to configure anything. For more detailed info, go to the Virtual PC website: http://www.microsoft.com/windows/virtual-pc/support/configure-bios.aspx.** |
Please note that last item—a processor capable of virtualization.
Hmmm, I wonder why? Frankly, to skip ahead, all XP mode is: Virtual PC (currently version 6.1.7084.0 and seriously gimped), with XP SP3 installed in a VM, and with “integration features” (which are something called RAIL QFE, and offers device support, like printers and drives, USB pass through, and auto-publish) in that VM.
Now honestly, I can’t really see how Virtual PC (even using the fancy new integration features) requires a processor that supports hardware level virtualization. But whether or not it’s used, it’s listed as a requirement…
**RAIL QFE (no I can’t seem to find info anywhere as to what the letters actually stand for), is a package that can be installed into any VM running in Virtual PC to allow it to integrate like the XP Mode VM. Currently there are QFE packages only for XP SP3 and Vista SP1.** |
Installation Adventures
Anyway, here is a summary of my adventures with installing and using XP Mode on Windows 7.
To start, I didn’t have to download the XPM (as they abbreviate XP Mode at this point), I got a copy on DVD at TechEd.
XP Mode actually requires two installs: one of Virtual PC itself, and one to install XP SP3 into the VM.
The Virtual PC installer is actually treated like a software update (don’t ask me, maybe they don’t want users easily uninstalling it). It comes in two flavors; 32bit and 64.
If you run the installer of your choice (I’m on a 32bit version of Windows 7, as you may remember), it will trigger a popup warning you that you are installing an update. When you click Yes on that, it, of course, prompts you concerning licensing, then installs the “Update.”
And of course, like most Windows updates, after install it requires a reboot (so be ready for it).
After reboot (and during this part I did get distracted by the loss of one of my sidebar gadgets, and the gadgets gallery, but that’s a known problem and neither here nor there…), I checked the Start menu, and lo and behold, there was a Virtual PC folder, with a XP VM already available.
And, being me, knowing full well that there was a second half to the install that I hadn’t completed yet, I had to try to run the Virtual Windows XP virtual machine. And, if you do that, you’ll get a dialog box that says:
Notice that it doesn’t let you OK out of the dialog box. The OK has been replaced with “Download,” so you can download the XP installer if you don’t have it already. Kinda convenient, no? So what did happen during the Virtual PC install? Virtual PC and the menu items for more. Yeah, that’s it. The virtual machines (a parent disk will be created by the way, and the VM you’ll actually be using will be a child disk) will be created with the XP mode install. Why a parent and child? Dunno, just cuz.
Knowing now, for certain, what the second installer is for, let’s use it.
It comes in two flavors as well, depending on your architecture. So use the one that’s right for you (I’m using the x86 one).
When you double click the installer of your choice, it strangely informs you that it is installing Virtual Windows XP. I think that MS isn’t entirely clear on how they’re going to surface this feature— but Virtual PC has been installed as an update, and the copying the parent XP SP3 VM, then creating a child VM of it is being treated like a normal install. I guess they thought the intended audience didn’t need that kind of detail.
Next, it will ask you where you want to put the virtual hard disk file. What it doesn’t tell you is you are going to only be specifying where the parent hard disk file will be going. It does not mention the fact that the real virtual disk you will be using for you XP mode files will be located under your user account on the C: drive. That’s the file that gets really big. As I am just testing this as a proof of concept before moving on to install server 2008 R2, I am just keeping the default location.

Next, after specifying a (or accepting the default) location for the files, it’ll start unpacking and creating the parent virtual hard disk for XP.
After the parent disk for your XP mode VM is created,
you can launch Virtual PC, which will then move on to setting up the real VM for XP mode. As far as I can tell, it basically creates a Virtual Machines folder in your user profile, under my documents, then it creates a child disk there off the parent disk. The parent disk seems to be sysprepped to run a mini setup, because it prompts you to accept the EULA, set up Automatic Update, and set a password (we’ll get to that in a moment).
Then it moves to setting up the machine for the first time, and starts the OS.
Then it does something interesting. Rather than waiting until I get to the desktop of the virtual machine, and then leaving me to install the virtual pc integration features, it just does it right there (because auto-enable integration features is pre-set in the settings of the VM during creation).
Now, these features are pretty extensive for this version, so it will take a while. During this part you will be prompted for the password you set up for the VM earlier (unless you enabled cached credentials).
But once the integration features finish installing and “enabling”, you’ll get to the Virtual Machine’s desktop.
Tada!
XP mode works in Windows 7 on a Macbook Pro. Now, I could take that as a sign that virtualization is supported by the Macbook pro’s processor, and set up in EFI, but I don’t really trust that Virtual PC really uses it. We’ll see. At any rate, so far this worked.
As an administrator, I always check to see what has changed in the OS as a result of any installation. And, as you can see, the child disk, the one running, is now located on the C: drive in my user profile under C:\Users\callahan\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines. So that’s where the XP Mode disk file gets put, regardless where the, ultimately, smaller parent disk file is located.
And, now that I’ve got the machine up, I wanted to see what it’s settings really were, since I didn’t get any choice in the matter during installation.
For one thing, this virtual machine window has far, far fewer settings in the menu bar than ever before. Most notably, there is no hot keys for ctrl-alt-del. It’s a menu item, that’s it. There is no option, in the menu, for creating a new virtual machine (nor does a little console open for you do to so). There is an intentional feel to how little administrative control this interface offers—as if the user is not really supposed to know that there is a separate application available to manage and create virtual machines that is powering their “XP mode” virtual desktop.
** although, if you did want to create different virtual machines, other than the one that comes with XP mode, making use of the virtual pc software, you can run the create a new virtual machine wizard under C:\Windows\System32, using VPCWizard.exe.**
 ** Keep in mind that the settings for the VMs can’t be edited in the GUI (I mention it again in a moment). Things like Login credentials can’t be enabled after the VM has been created, Undo disks (if you enable it during the creation of a VM) can’t be merged in the GUI, because there’s no mechanism to let you select it if the VM is closed. Not ideal in my opinion.**
|
To see what settings have been configured for the VM, click on Tools, Settings…
This will bring up the standard Virtual PC settings dialog box (there doesn’t seem to be anything there about saving state, it simply does). Of note were the location of the VM’s hard disk (in C:\Users\callahan\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines\Virtual Windows XP 1.vhd). And the parent disk, located at the place specified during installation (the default is C:\Program Files\Virtual Windows XP\Virtual Windows XP.vhd).
Also to consider is the teeny, tiny little bitty amount of RAM alotted to this VM. The point of XP mode, if you remember, was to let users install and run applications that could not run on Windows 7. And all this VM gets by default is 256 MB of RAM. That’s it.
So if you hear complaints about how honking much RAM someone’s computer has, but their XP mode applications run crazy dog slow—well, that 256 MBs of RAM might be the culprit.
And keep in mind that, at this point, there is no mechanism for changing that setting. The only way to get to the settings is to have the VM running. But to change the VM settings, you have to have the VM shut off. (and yeah, in System32 there is a VPCSettings.exe file, but I’ve tried running it, and it does not work when the VM is off, only when a VM is open, and only for that VM).
So the only way, I’ve found so far, is to actually edit the VMC file for the child disk itself (NEVER edit the VMC of the parent disk, or open that disk- which is read only for a reason).
** Note, at this point, the XP mode VM is very, very fragile. Do not edit the VMC unless you need to. If you do, it may reinstall integration features when you restart the VM. If they fail, the VM is pretty much hosed. Also, while I’m on the subject, XP has never been crazy about hibernation, which is what the VM here is set to do whenever it closes. After about three closing and openings, the VM corrupted on me and I had to reinstall the XPmode portion of the process. It takes a while for the VM to start up, but if you can afford the delay consider changing the Close setting from Hibernate to Shut Down (or turn off even, if you want). It seems to help me avoid VM corruption. You have been warned.** |
There are a few new settings available to this version of Virtual PC VMs that were not available in earlier version, such as being able to disable or enable (even auto-enable) individual integrated features,
Login Credentials (if they’re saved for the VM, they’re always used at startup, rather than delaying the display of the desktop—it is also useful to make the running of virtual applications seem seamless, but I am getting ahead of myself), and something called “Auto Publish".” Like Unity in VMware, it allows applications used in the VM to be run on the host. It does this by using a gimped form of terminal services to RDP into the VM and pull up the application as if it were native. There are some pros and cons to this, which I’ll cover later.
Using the VM
The whole point of having XP mode is so that users can use applications that are incompatible with Windows 7 on a Windows 7 workstation. This goes a little way towards explaining the default setup of the VM’s settings, and the lack of real administrative control. Their focus audience seems to be users who actually aren’t going to really be using the VM, but instead, need to be able to use said applications right on the Windows desktop like they were really installed there.
The way to do that is invoke Terminal Services— and that’s what XP Mode does. That’s what the “Virtual Windows XP Applications” option in the start menu meant, it’s going to list “virtual” applications that will actually be running in the VM.
It’s also, interestingly, related to how the VM “shares” drives with the host.
On the Macbook, I have the main C: drive with one big partition for files, a DVD drive, and an external hard disk. This is represented in the VM as mapped drives.
Now if I open, say, the mapped C: drive,
you can see in the address bar that it’s simply the mapped C: drive address. But if you actually open any of the folders (there will be a lag), the path changes to “\\tsclient\C\Windows”
The tsclient being the person you are actually logged in as on the host, which I proved by being unable to open a different user’s User folder, but being able to open mine.

So terminal services is being used. This being so, then it stands to reason that I’m logged into a console session of the VM. If anyone wanted to use RDP to access it, I’d have to be logged off of the VM, and they’d need to be logged on. Because that’s how remote desktop/terminal services, works.
Keep this in mind.
Now as I mentioned before you can use “Auto Publish” to access applications from the Start Menu of the Windows 7 host desktop. This means that most applications that you install into the VM can be published to the start menu for “all users” in Windows 7.
** I’ve been messing with the VM, and was trying to get the built in iSight camera to work in the VM (which I’ll get to later), so Scanners and Cameras will already be available, interestingly, when I check out the Start Menu. Also, as I mentioned above, I’d crashed the first XP Mode VM due to hibernation issues, so I actually have two sets of Virtual Application menus. I am going to, obviously, use Virtual XP 1 (the second one I made) because it’s the one that works. Note that, after uninstalling XP Mode so I could recreate the child VM again, it didn’t delete the listing for the now defunct original VM (nor delete the VM itself of the drive, mores the pity) in the Start Menu. I can see this causing issues with users—let’s hope they fix this issue before release.**
**Speaking of the iSight camera, I will be writing an entry about how to use USB devices in the XP Mode VM that won’t otherwise work on the Windows 7 machine. It’s kind of cool actually.**
|
Using Virtual Applications
To keep it simple, I’m going to install Word Viewer in the VM and see if it shows up in the Windows 7 start menu.
When it finished installing, I opened Word Viewer just to be sure it worked (another administrator habit). Then I went to the Windows 7 desktop on the host, and under the Windows Virtual XP folder>Virtual Windows XP Applications (well, in my case Virtual Windows XP 1 Applications, since I crashed the original), is the Word Viewer I installed in the VM.
(I included the popout in the screenshot because it clearly shows that the app is actually in the virtual machine.
When you run the word viewer, it will display outside the VM window, but it still runs in the VM. This means that, if I have the VM open (and therefore be working on the console, so to speak), I will have to log off of there, and then log in to the VM while opening word viewer in order to access it.
Now you can see why saving your login credentials for the VM in the settings of the VM itself becomes useful. The user, namely myself in this example, won’t have to log in when opening the virtual app when it’s opened, making it seem seamless. However, this is a serious lag to opening any virtual app, especially if the VM is actually shutdown and not running.
To run the virtual app, click on it in the start menu. If you have the VM running, it will trigger a dialog box (in the VM itself), asking if you want to close the virtual machine. This is misleading. The virtual machine will not close, it’s still running. However, the window, or more precisely, that console, will close, you’ll be logged off of it, and then, the tsclient using the virtual application will be logged on using the saved credentials in the settings.
So if you choose to close the virtual machine (which you have to to run the virtual application), it logs you off the console.
And rapidly (because the VMs still running, and credentials are stored) opens Word Viewer on the desktop of Windows 7 host as if it was locally installed.
It looks like it’s running in Windows 7 (except for the format of the Open dialog box, and the title bar is not formatted in aero glass) and not in a VM. It’s accessing the My Documents folder of the Windows 7 laptop, not the one in the VM (slick that). There is a slight lag whenever I open folders, save files, or even close the application—because it’s actually have to pass information back and forth into and out of the VM.
Notice, in particular, that the icon on the taskbar for the Word Viewer is the Virtual PC icon, with a circle with two opposing arrows.
Also, if I do try to open a file in the Word Viewer, it doesn’t show the real file system, but the one from the VM, with the host’s C: drive mapped.
Interestingly, now that Windows 7 knows there’s a Word Viewer somewhere, if I open any file with a .doc extension, it automatically opens Word Viewer virtual app. Now I wonder if that will cause users any confusion in the future…
Extra stuff- getting XP accessories and built in apps onto the Windows 7 start menu, and how to get blocked apps to show up on the Windows 7 start menu
There are two more things I want to mention about Virtual Apps. One is that if you want to run something that is already installed on the VM as a virtual application, say IE 6 (yes, despite being XP SP3, the VM is running IE6), you can do it. You see, anything in the “All Users” start menu in the XP mode VM is added to the Start Menu in Windows 7.
So to add IE6 (or anything else on the VM) to the virtual apps start menu, open the All Users’ Start Menu folder and add a shortcut for it.
**This means opening up the console again, which may trigger a warning that you need to close some running virtual applications. Interestingly, the TSR warnings in the VM’s system tray, like updates or security warnings, also get ported to the Windows 7 desktop along with the opening virtual application. So if you close the virtual application (in our case, the Word Viewer window), those TSR’s still remain open, keeping the remote connection between the desktop and the VM open. Could this be wasting valuable resources all the while? You be the judge.**
|
That will immediately put the shortcut on the start menu on the Windows 7 host.
And, if you click on it, it will (after closing the VM of course) open IE6 right on the Windows 7 desktop. A little blast from the past.
The second thing I wanted to mention is that, no matter how hard you try, there can be applications that XP mode refuses to add to the virtual applications list on the Windows 7 start menu. Things like the media player on the VM. Maybe you want to use that version instead of the one that comes with Windows 7.
But if you try to stick the shortcut to it into the All Users start menu folder on the VM, they don’t show up in the Windows 7 start menu, no matter what.
(yes, I did add OE to the start menu, just to see if it worked, but that’s not the point of this particular exercise… but it does prove you can have email locally if you absolutely have to)
So what do you do to if you want media player or one of the other apps that just don’t seem to want to show up in the Windows 7 start menu? And why does this happen anyway?
Well, it’s because, on the VM (not in Windows 7), there is a block list in the registry. This list has on it the programs that XP mode will not allow to be virtual applications. This was, supposedly, to keep redundant copies of things like notepad, workpad, or calculator, from ending up on the Windows 7 start menu.
So if you have something you want to add to your virtual applications list in Windows 7, and it’s being blocked go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtual Machine\VPCVAppExcludeList in the VM itself and remove the blocked application from the list (you can also add ones if you want).
Then the application will appear in the virtual applications list in the Windows 7 Start Menu (the VM will have to restart of course).
And there go. XP mode will install on Windows 7 running on a Macbook Pro. It will configure and run the VM, and even the virtual applications run as expected. XP mode is a little buggy, in my opinion, but it is a beta product running on a beta (albeit release candidate) operating system.
Still, all in all, not bad.
Next up, an entry to finish my adventures with Windows 7 on a Mac—Getting iSight to work in XP mode, because the drivers will not work in Windows 7. In otherwords, how to get your old USB devices to work on Windows 7, despite Windows 7, if you know what I mean.
Stay tuned.