Wednesday, August 26, 2009

Windows XP Mode for Windows 7 (Part 2)

Introduction

In the first part of this article series, I explained why I believe that the Windows XP feature that will be available for some editions of Windows 7 is going to change the future of the entire Windows franchise. In this article, I want to take a step back and show you what Windows XP Mode really looks like. I am also excited to show you some long overdue improvements in virtual machine technology.

Windows XP Mode

In my first article, I explained that in its simplest form, Windows XP Mode was nothing more than a fully licensed copy of Windows XP running within the latest version of Microsoft’s Virtual PC. I never really showed you what it was like to use Windows XP Mode though, so I wanted to give you a little tour. If you look at Figure A, you can see the Windows XP virtual machine running on top of the Windows 7 desktop. In case you are wondering, what you see in the figure is a default configuration. I placed two icons onto the Windows 7 desktop for my screen capture program, but everything else that you see is what Windows XP Mode will look like after a fresh installation.


Figure A: This is what the Windows XP virtual machine looks like

Application Compatibility

As I explained in the first part of this article series, the most significant aspect of Windows XP mode is that it allows you to run applications that were designed for Windows XP, either through the Windows XP GUI, or through the Windows 7 GUI. To show you how this works, take a look at Figure B. As you can see in the figure, I have installed a legacy application called PentaZip into the Windows XP virtual machine. An icon for this application appears on the Windows XP desktop.


Figure B: I have installed an older application into the Windows XP virtual machine

So far this is no different than what we can already do by using Windows Vista and Virtual PC 2007. If you look at Figure C though, you will notice that PentaZip is available on the Windows 7 Start menu at Start | Windows Virtual PC | Virtual Windows XP Applications. The operating system created the Start menu link to the application all by itself. I did not have to do anything other than to install the application within the Windows XP virtual machine.


Figure C: My Windows XP applications are accessible through the Windows 7 Start menu

One thing that you need to know about running the Windows XP applications through the Windows 7 GUI is that you can only do so if you have logged out of the Windows XP GUI, and closed the virtual machine. If you fail to log off, you will receive a message similar to the one that’s shown in Figure D. As you can see in the figure, you have a choice of either opening the virtual machine or running the virtualized application.


Figure D: The Windows XP virtual machine must be closed before you can run virtualized applications through the Windows 7 GUI

If you look at Figure E, you can see that I have closed my Windows XP virtual machine, and that I am running my virtualized application through Windows 7. Virtualized applications take a bit longer to load than applications that are installed natively through Windows 7 do, but aside from that, there is not much of a difference between running a native application and running a virtual application. In fact, you would be hard pressed to tell that the application shown in Figure E was a virtual application.


Figure E: This is what it looks like when you run a virtual application in Windows 7

Note:
I know that some of you are probably wondering about system resource consumption. By default, the Windows XP virtual machine consumes 256 MB of RAM, but the RAM and other system resources that are used by the virtual machine are adjustable.

Improvements in Virtual PC

As I stated earlier, Windows XP Mode consists of a copy of Windows XP running inside of Microsoft’s latest version of Virtual PC. As with previous versions of Virtual PC, you are not just limited to running Windows XP. That being the case, I think that it makes sense to wrap things up by showing you some of the improvements that Microsoft has made in this latest version of Virtual PC.

If you took more than a casual glance at Figure A, you probably noticed two of the improvements right off the bat. First, the latest version of Virtual PC features a Control Alt Delete icon that you can use to issue a Ctrl + Alt + Delete request to the guest operating system without having to go through any menus. Obviously, this is not an earth shattering change, but it is handy nonetheless, so I wanted to at least mention it.

A much more significant improvement is that Virtual PC now supports USB device access for guest operating systems! I for one, have always found it extremely frustrating that I have not been able to access USB devices from within my virtual machines. This limitation does not just apply to Virtual PC, but it exists in Microsoft’s Virtual Server and Hyper-V as well.

If you look at Figure F, you can see that you can gain access to a USB device simply by selecting the device from Virtual PC’s USB menu. Of course the virtual machine does require a driver for the USB device.


Figure F: Virtual PC now supports USB devices

I should mention that Windows 7 requires that an operating system have exclusive control over a USB device. If you choose to use a USB device within a guest operating system, the host operating system will not have access to the device until you release it. Figure G shows an example of a warning message to this effect.


Figure G: USB devices are used exclusively by a single operating system

One last improvement that I want to show you is shown in Figure H. As you can see in the Figure, the My Computer window lists my USB hard drive within the virtual machine (Drive E:). However, you will also notice several drive mappings in the Other section. These drive mappings map to the host machine’s physical drives and to any network drives that are mapped to the host operating system. Again, Windows performs these mappings automatically. This means that you finally have the ability to access your local hard drives from within a virtual machine!


Figure H: The guest OS automatically maps to the host operating system’s drives

Conclusion

As you can see, Windows XP mode and the new version of Virtual PC offer tremendous potential. I honestly do believe that the technology being used in Windows XP Mode will reshape the future of the entire Windows franchise for many versions to come.

Windows XP Mode for Windows 7 (Part 1)

Introduction

Most people think of Windows 7’s Windows XP Mode solely as a backward compatibility mechanism. In this article I will explain why this feature has the potential to change the way that Microsoft designs all future Windows operating systems.

By now I have no doubt that you are all aware of the hype surrounding Windows XP Mode for Windows 7. What you might not realize though is that Windows XP Mode is much, much more than just a backward compatibility solution. This technology has major implications that dramatically alter all future versions of the Windows franchise. In this article, I will tell you why I believe this to be the case.

Why Windows XP Mode Got a Bad Name

When it was first announced (or leaked) that Windows 7 was going to contain Windows XP mode for backward compatibility, most of the posts on the Internet made it sound as though Windows 7 was going to ship with a fully licensed copy of Windows XP running inside of a virtual machine.

I have to tell you that I was less than impressed with such posts. After all, you can use Virtual PC 2007 to run Windows XP inside a virtual machine with Vista. Even if Microsoft threw in a Windows XP license, most of the people who this sort of feature would appeal to already have Windows XP licenses. As such, I wrongfully assumed that the Windows XP Mode feature was a marketing gimmick designed to convince the public that Windows 7 was not going to be plagued by the same types of compatibility problems that Vista has come to be known for.

Setting the Myths Straight

The myths that I cited in the section above are full of half truths. I want to start out by setting the record straight, and then I will go on to explain why Windows XP Mode is so important.

You have probably heard that Windows XP Mode is going to be based on Virtual PC technology. That part is true. Unfortunately, Virtual PC has gotten a bad rap for being slow and inefficient because early versions of virtual PC had to pass all of the guest machine’s hardware calls through the host operating system. However, Virtual PC 2007 has always supported hardware assisted virtualization, as shown in Figure A.


Figure A: Virtual PC 2007 supports hardware assisted virtualization

Virtual PC 2007’s hardware assisted virtualization is not a Hyper-V based hypervisor, but guest machines do run a whole lot faster when you enable hardware based virtualization. Keep in mind though, that Windows 7 is going to use Virtual PC code that has been updated. This code is not based on Hyper-V either, but I would not be a bit surprised to see Hyper-V become the standard in Windows 8.

The next myth that I want to set straight is that Windows 7 will offer Windows XP mode right out of the box. If you want to enable Windows XP mode, then you are going to have to download an add-on. This add-on, which is going to be considered an out of band update, will be freely available to anyone who has Windows 7 Professional, Enterprise, or Ultimate edition. If you would like to try Windows XP Mode today, you can download the current beta version here.

OK, now for the really important part… When you need to run an application in Windows XP mode, those applications are not going to be limited to running inside a virtual machine. Well, actually they will be running in a virtual machine, but you would not have to be confined to using the virtual machine’s GUI to run your applications. You can install an application in a Windows environment, but run that application through the Windows 7 interface alongside your other applications.

Why is This Such a Big Deal?

Obviously it is convenient to be able to run your legacy applications alongside your newer applications, but in the end you may be wondering why I said that I think that Windows XP mode will have major implications that could alter the future of the entire Windows franchise.

In order to understand why I say this, you need to have a bit of historical prospective. Windows 95 was Microsoft’s first major 32-bit version of Windows (actually Windows for workgroups 3.11 was the first, but I don’t consider that to be a major release). At any rate, Windows 95 was designed to natively run 32-bit applications, but at the time there were still a lot of people running 16-bit applications that were designed to run on Windows 3.1. In order to facilitate the use of these legacy applications, Microsoft developed a 16-bit mutex for Windows 95. The way that the architecture was implemented kept 16-bit code separate from 32-bit code, and there was even a separate multitasking engine for 16-bit applications. When it came to multitasking, all of the 16-bit applications were collectively treated with the same priority as a single, 32-bit application.

Today we have the same kind of thing going on with modern versions of Windows. 64-bit versions of Windows XP and Vista can run some types of 32-bit code, but this code must be kept separate from the 64-bit code.

So what does all of this have to do with Windows XP Mode? Well, Windows XP Mode is a first generation feature, so all it really allows us to do is to run a Windows XP based virtual machine. However, it also allows the Windows operating system to be greatly simplified.

Can you imagine how bloated and how prone to errors Windows 7 would be if Microsoft tried to make it natively fully backward compatible with Windows XP, but without using virtualization technology? I think that it is safe to say that Windows 7 would end up being a lot slower and less reliable than Vista.

By implementing Windows XP mode in the way that they have, Microsoft was able to design Windows 7 without having to build in special backward compatibility mechanisms.

To be fair, you are not going to see anything ground breaking in Windows 7. As we all know, Windows 7 was built on top of the Vista kernel. Having said that though, I believe Windows 7 is an extremely important architectural stepping stone for Microsoft. I think that Windows 8 will be a much lighter weight and efficient operating system. I also think that Microsoft will offer virtualization based plug-ins for backward compatibility.

In other words, I would expect Windows 8 to run only 64-bit code with absolutely no native support for 32-bit code. Those who need to run 32-bit code may be able to download a plug in that would allow them to do so, while the rest of us don’t have to worry about it. The same might be said for operating system compatibility. If someone needs to run applications that were designed for Windows XP, they might be able to download a Windows XP plug in.

Of course this is all speculation on my part, but Microsoft has laid the groundwork, and what I have described seems like the next logical step. Microsoft offers a product called Application Virtualization, which was previously known as SoftGrid. This product is designed to allow otherwise incompatible applications to be able to run side by side. Although Application Virtualization is an enterprise product, there is nothing stopping Microsoft from implementing similar functionality at the operating system level. Rather than using self contained virtualization for each individual application, Microsoft could offer virtualization modules that allow applications to run in the operating system for which they were originally designed.

Conclusion

So far I have told you what Windows XP Mode is going to be, and I have explained why I think that this is such an important development. There is a lot more that I want to tell you though. In Part 2 I will show you some of the cool new features that are going to be available to you as a part of the virtualization engine that Windows XP Mode is going to use.