Getting Virtual Server '05 R2 Working on IIS7 in Longhorn Server
Introduction
With some nifty work and helpful insight, you can get Virtual Server 2005 working on Windows Server Code-named "Longhorn" just as I did this past weekend. I took some time to also validate (i.e doc) what I was doing as to maybe help someone else out there who is trying the same darn thing. The nice thing - I know a lot about IIS7 making it much, much easier than if someone doesn't.
I recently came up with this policy - "WENK" - which in the technology world fits right in as an acronym. WENK (Weekends Equal No Work) is designed to let me spend time with family as well as do things I love like play with technology. This weekend, while the wife was off at a horse show, I had time to start a migration from my existing dual core server to a more powerful dual core server for my home system (websites, email, sql, ad, etc.).
Off we go...
Are the IIS7 bits needed for Virtual Server installed?
Unlike any previous versions of IIS, IIS7 doesn't just come with every feature installed. In IIS 6.0, we would install all the binaries on the box but used something called "Web Service Extensions" to turn on\off any feature that the user desired. The default state (unlike IIS 5.0) was everything "off" equaling a simple static server out-of-box.
IIS7 introduces a all-new modular Web server where binaries aren't installed that aren't explicitly asked for. This is the first challenge that will be faced to get your existing Web applications working in IIS7. The hope is that many software Web application providers will take the necessary hit to ensure that their setup installs the binaries needed for their application.
I am not currently privy to the plans for the Virtual Server team so I didn't take time worrying about it. The first thing that is helpful is knowing that Virtual Server 2005 is a CGI-based (VSWebApp.exe) application and as such we need to ensure we have the CGI binary installed.
To install the CGI binary, do the following:
- On your Longhorn Server Beta 3, open the Server Manager (Start - Administrative Tools - Server Manager)
- In the roles section, the Server Manager should display the following -
In the Role Sections, you should see a list of the features that are installed and not installed like the following:
The basic process from this point forward is to installed the CGI feature which is really easy. To add this functionality, simply check CGI under Application Development and click Install Now and away you go. After completion, you should see the following in your Role Services with CGI showing installed -
Getting Virtual Server Application Setup and Configured
The goal here is to simply get your Virtual Server up and running - which this is where the rubber meets the road. We will do the following in this section:
- Install the VSWebApp.exe CGI Handler
- Ensure that the appropriate authentication is setup for the Web application
- Add VSWebApp as Default Document
- Validate that Virtual Server works
Install the CGI for Virtual Server
In this step, we will simply use the all-new IIS Manager to install the CGI application. This is done using the 'Add Script Map' under the Handlers section. The IIS Manager should look like the following -
Let's add the CGI...
- In the Add Script Map form, add the following information -
Request Path: VSWebApp.exe
Executable: %programfiles%\Microsoft Virtual Server\WebSite\VirtualServer\VSWebApp.exe
Name: Virtual Server 2005
You will receive a pop-up asking if you would like to add this Handler to the ISAPI & CGI restriction list and you should select Yes
Enable Windows Authentication
The next step was to enable Windows authentication to ensure that you can access the Web application using the Administrator credentials. This is a crucial step otherwise you will get errors such as 'An error occurred accessing the website application data folder' and the event viewer area of the application will show 'You do not have permission to access the event viewer' because by default the Web application is accessed as the anonymous user.
To save in brevity here, I will tell you that you need to ensure that you have Windows Authentication installed using the same steps above for CGI (Windows authentication is not enabled by default.)
After confirming this, we need to disable anonymous authentication and ensure that Windows is the only authentication type enabled for the Virtual Server website.
Enable by double-clicking Authentication while Virtual Server website is selected as shown in this screenshot -
The final step is to ensure that only Windows is enabled which simply done by selecting Anonymous
Add VSWebApp as the Default Document
At this stage, you should have a working Virtual Server Web application. You can validate this by doing entering the following into your IE address bar -
The thing is that some of you might not realize that one nice thing done by the Virtual Server install on IIS 6.0 was to change the default document property to remove un-needed items and add the one important one. In this case, VSWebApp.exe would be at minimum at the top of your list while you can also delete the entire list (e.g. <clear /> for <defaultDocument> section) if you so desire. To do this, you can open Virtual Server website and use the Default Document feature and add to the textbox VSWebApp.exe. The following shows an example of this configuration -
Summary
This was my small, enjoyable task for this weekend as I have happily upgraded my home server to the latest greatest in hardware (Dual Core, DDR2, etc., etc.) and I wanted to move my current Windows Server 2003 R2 server serving as my Virtual Server hosting email, etc. to LHS Pre-Beta3. It was a lot of fun figuring out how to get Virtual Server 2005 R2 working on LHS & IIS 7.0 and it wasn't easy but I managed. I found some bugs along the way and I am going to re-validate this tomorrow again on another image I have so updates might be coming! Either way, fun stuff...
Next: Upgrade Exchange 2007 to LHS and see if I can get Edge services (OWA, etc.) to work with IIS7
Resources
The following will be helpful in getting up to speed with IIS7. As part of the IIS team, I know where most of the resources are for learning IIS7 but I can't say the same for the Virtual Server team. Thus, if you have good resources (like more detailed instructions than I provide in this blog) then send them on via comments. I will certainly add them...
Learning IIS7
Web: