Sunday, August 09, 2009

Windows 7 and Virtual Server

With Windows 7 now at RTM and in my hands, the time has come to start to migrate over. I got the ISO images I needed last week, and immediately started to get things running. One specific thing I needed is to get Virtual Server running on Win 7. I am teaching a class on Aug 13/14 and need to prepare – the class is a Windows 7 upgrade class for Microsoft Partners.

I thought, given we’d achieved RTM, that it would be cool to have the Labs running under Windows 7 RTM. To do that, I just needed to get Virtual Server running and install the course files on my laptop. Now I know it’s not officially supported, but I wanted to see if I could make it work. If so, I can then run and demo the labs with Win7 as the host.

There were only two problems with that. The first is that the labs that come from Microsoft Learning require Virtual Server. But Virtual Server is not supported under Win 7, and is actively blocked. And even if I did get VS running, MSL assume that you will be using earlier OSs to run the labs – and installing these on Windows 7 is specifically blocked by the MSI installer.

After a bit of Googling using my favourite search engine and perusing the MCT private newsgroups, it appears that there are two solutions. However, both involve some hacking (and are probably NOT supported).  The solutions were either to get the labs working under Virtual PC 7, or install VS into Win7 and get it running. While both are possible, I chose to do the latter since this seemed to provide an easier to use solution (if it worked of course!!!).

Naturally, a third (and preferable!) option would be to wait for Microsoft Learning to come up with a supported solution. But that is not likely to happen any time soon and I have a course to teach now. So down the road I went with two main tasks: first, installing Virtual Server on Windows 7 and then installing the Microsoft Learning labs on Windows 7.

Installing Virtual Server under Windows 7

To install Virtual Server under Windows 7 is straightforward, although it involved registry editing (and is NOT supported). The steps are as follows:

  1. Disable the application compatibility fixes. You first need to disable all the application compatibility fixes that would stop you from installing Virtual Server. In Windows 7, bring up the local Group Policy editor and Computer Configuration\Administrative Templates\Windows Components\Application Compatibility\ and enable all of the “Turn off” entries. As here;image
  2. Then go to the Computer Configuration\Administrative Templates\System\Troubleshooting and Diagnostics\Application Compatibility Diagnostics\ folder and disable all of the entries there. Like here:
    image
  3. Reboot to ensure the settings take effect. You could, I suppose, just do a gpupdate /force, but I prefer to reboot.
  4. Install Virtual Server. Download the binaries from Microsoft .com and install it.
  5. Install VS SP1 – depending on what download you get, you may may need to install SP1. NB: Installing SP1 is more difficult once you have completed this process, so why not do it now?
  6. Change Application File Name. To enable the next step to work properly, you need to rename the Virtual Server application file name, by going to the Virtual Server directory (typically C:\Program Files\Microsoft Virtual Server\ ) and rename Vssrvc.Exe – I used Vssrvc_Win7.exe.
  7. Change the registry settings for this new file name.  Run regedit, then find and replace all occurrences of "vssrvc.exe" to vssrvc_Win7.exe. There are around 5 or 6 entries to fix.
  8. Undo the group policy changes you made at step 1 above. This turns all those application compatibility fixes back on (which is probably what you want!).
  9. Reboot.

Once the reboot is completed, you should have (the renamed) Virtual Server running on your Windows 7 box. If you want to just run VMs, off you go. you can create and use VS just as you did on XP or Server 2003. Hoevere, if you want to install a MSL Lab onto the system, you have just a bit more work (hacking) to do.

Install course files for Lab Launcher into Win7

Once you have Virtual Server running, you need to fix the installation file for the lab you want to install, e.g. 6291.MSI. Normally, you just run this MSI file on your master system (and use Ghost et al to then blast it to the rest of the systems in the classroom). The only problem with this approach is that Microsoft Learning have put in an installation block on Win7. That means when you try to run the installation MSI, it fails with an error message (”the operating system version does not meet the minimum version required”). Turns out this is really easy to fix – but you do need an MSI editor.

There are two MSI editors you can use (and both are free):

  • ORCA – this is a free MSI editor from Microsoft and comes as part of the Windows Installer SDK. It’s a bit of a pain to get as you first have to download and install the SDK, and then install Orca.Msi. You can find copies of orca.msi out on the internet, but downloading it from Microsoft is probably safest even if it is a bit tedious.
  • InstEd - you can also use InstEd, a free tool you can get at http://www.instedit.com/. I like Instead and blogged about it a while ago. It’s still cool!

Once you your MSI editor loaded, you need to remove one line from the Launch Condition table. If you are using Orca, you’ll see something like this:

image

Just delete the first line of this table, then save the MSI (File/Save As) to a separate MSI (just in case). Then exit out of Orca and you can run your newly saved MSI. You should be good to go.

Minor issues

I found that, after playing around a bit, Virtual Server was complaining about access permissions of VHDs on the host. I just gave all users full access to the C: on the host and the problem went away.

An important issue to consider is that this is not supported. Yes, it works and works reasonably well. It also involved editing registry entries, and using a MSI editor. From personal esperience, both can be dangerous. So use this information at your own risk.

Kudos

Thanks to a couple of posters for helping me to do all this. First, the details of how to get VS running were obtained from a TechNet  forum post. Hacking the MSI to get around version limitiations is an old trick, but thanks to MCT Super-Star Michael Buchardt who pointed me to InstEd! And finally a thanks to Chris Randall for the motivation to write this up.

35 comments:

Jakob Svendsen said...

Hello Thomas !

Great Tutorial!

to make it easier for myself and others, i have created a small tools based on thwe tutorial

version 0.1 can be downloaded from my blog:

http://blog.coretech.dk/scripting/windows-installer-msi/moc-lab-launcher-fixer-for-windows-7/

Have a nice day!

- Jakob Svendsen

Pooja said...

Thanks for the useful information. Windows 7 is a focused and performance centered software. Windows 7 has exciting features. The new taskbar is very good, very unique. Windows 7 also features an XP mode. The setup process is very simple. Overall, Windows 7 has done more than what Windows vista should have done. There are no loopholes left in Windows 7. For more details refer windows 7 release

Craig said...

Hi Thomas,
Thanks for the guide.
I've had a look on the MS Virtual Server site for a hint on the future of VS but the site does not seem to be up to date and links to the community forums are dead.

Are you aware of any plans for VS to work with Win 7 or are VS days numbered?

Regards,
Craig

Thomas said...

Craig,
My guess is that VS is dead. Replaced for server duty with Hyper-V, and VPC7 on the client.

The fact that VS is blocked in Win7 is kind of a hint that we're at end of life for this product.

That is a huge shame as it means MS classes can not be run using Win7 as the host - at least without some hacking!

nishant said...

Thanks for the workaround.
I imported my virtual machines created under 2008 in Win7 and they are working all fine except that they had two vnc one of 'em mapped to physical nic and virtual server is not giving the option to create a virtual network based off the physical NIC.

Regards
-Anshul

John Paul Cook said...

Microsoft Learning posted my guide to using the Lab Launcher and installing Virtual Server on Windows 7 in June. It's in the Courseware Download Center. In my February blog post http://sqlblog.com/blogs/john_paul_cook/archive/2009/02/13/using-orca-to-fix-installation-problems-on-windows-7.aspx, I point out how to use Orca to solve Windows 7 installation programs and that Orca can be downloaded from Softpedia (s safe source) at this location: http://www.softpedia.com/get/Authoring-tools/Setup-creators/Orca.shtml

Craig said...

Hi Thomas,
I've just got around to installing VS. It needed IIS so I installed it separately in Windows 7 selecting what I thought would be the required components. However, the VS installer still prompts to install the required IIS components.

Did you let the VS installer go ahead and install the IIS components it needed?

Regards,
Craig

Craig said...

Hi Thomas,
Please ignore the last comment about IIS configuration. I remembered I'd found this information in Andy Leonard's blog.

However, now that VS is up and running I've hit the same problem I had running VS in Vista Business x64 (now running in Windows 7 Enterprise x64). That is, after closing a VM by saving state I am unable to restart the VM from the saved state; VS just hangs. I can only successfully restart after a full VM shutdown.

Is this something you've experienced?

Regards,
Craig

Craig said...

I feel a right dunce now. My VM wouldn't restore from saved state because the CPU's virtualization technology had been turned off in the BIOS.

Save and restore okay now.

BTW, I had to turn on compatibility view mode for the VS admin web site in IE8.

HTH
Craig

Volker Heck said...

Thank you for the great tutorial!
One annotation:
If your Win7 PC ist member of a domain, then you can only change the Group Policy settings, if the machine has a connection to the AD server. Otherwise the changes have no effect.
(Took me some time to find this out working on my notebook while not in the office...)

Volker Heck

JaD said...

This is not working for me.
I am using Windows 7 x64.

JaD said...

Hi Thomas,

Thanks for such great tutorial, but it is not working for me.

Is it supposed to work on x64 OS?

Thanks.

Thomas said...

JaD,

No idea why this is not working for you. My system is x.64 and the screen shots were taken on an X.64 system.

The comment "it does not work" is not very helplful - what in specific does not work? Where did my instructions not work for you?

Thomas

JaD said...

I was getting errors during setup that was causing service and COM components not getting installed properly. I managed to reghack the service to start but could not connect because of COM components.

However, I finally got it working as you described. I was having issues with GPOs not being propagated to the registry properly.

OTOH, I ended up writing a script that automates the whole installation process (both x86 and x64), providing that you indicate the MSI in a variable at the begining (got from %temp% when you run downloaded exe).

Thanks and regards.

Brian said...

Hi Thomas....
Thats a great help.. thanks for that.. It seems to be mostly working.

One small problem for me, when I try and launch the labs from the lab launcher, I get a white screen which says "Local loop-back connections are disabled". Any ideas on how to get around this? Thanks!

TiborK said...

Thanks Thomas!

Worked great for me (x64). :-)

Tibor Karaszi

OC said...

Love this tutorial. Seems to work for me except I loose my connection to the internet. Durint the driver install of VS R2 Sp1, I see my connection die. I uninstall the VS program and get the connection back just fine. Any ideas?

varf said...

Hello,

This is a great tutorial, thanks for the info, and in order to cooperate I can add that when appears the error for the version of MSI, you just right click the MSI file and select option "Troubleshoot Compatibility", in order to work, all the compatibility settings must be enabled in the Local Group Policy, the system will scan and fix the problem for you, after that the MSI can be executed without any problem.

Jason Presley said...

I am getting this wonderful error: "Unable to register the virtual machine with Virtual Server. May be due to a corrupted config file, or a Virtual Server error."

Anyone else get this and have been able to work around it. I'm on Win7 x64. Thanks!

nicferr said...

Thank you very much Thomas!
Great job!

xasperxy said...

u dont have a hack tool for msi labs , just right click the msi package and click on "troubleshoot compatibility" and then click on start program to make sure.

Nir said...

is it gonna work on every version of win 7 , because i have the home premium version and doesn't have the same menus the shows in the screen-shots ??
someone ??

thanks
nir

AnubixDevilX said...

hi
by chance this same configuration could be done on windows server 2008r2
thank you very much

Thomas said...

I have not tried this on R2, but I imagine it might work. But why would you want to when R2 has a much better virtualisation product (Hyper-V).

levi said...

fantastic tutorial.

ran into some issues with the MSL installer after orca but i read xasperxy, his tip worked right smartly.

yes, it is unfortunate that MSL is always a few generations behind on their labs.

Rich said...

Not sure if you're taking comments here, but if you are...I REALLY need this to work, I'm an MCT with new hardware running Win 7 Pro. I managed to get the first two steps completed, but when I try to install Virtual Server 2005 SP1, it gives me an "blocked with Incompatiblity Issues" message. Any suggestions?

HELP!!

Thomas said...

Rich,

I accept all posts but those from the comment spammers.

It sounds like your problem is that you did not properly disable the built-in protection against Virtual Server. In particular - did you do step 3?

But I have to say, using VS on Win 7 seems a bit of a waste of time. MS deliberatly blocked it although I am not sure if that is for technical or marketing grounds. Nevertheless it is an unsupported configuration and those I tend to stay away from.

I, too, am an MCT and I understand the situation that MSL hs put us both in with respect to Images. I use a simple technique - I have two disks for my laptop. On those rare occasions I need an old VS class, I pop in a hard disk with XP 64 loaded and can then just import the images and go. For the rest of the time, I pop my main hard drive in and this boots by default to Win 7 (and I run Oracle Virtual Box for the simpler demos). I also do a boot-to-VHD to Windows Server R2 and Hyper-V. I have two VHDS I use relating to the classes I teach, but can add/subtract VHD boots as needed.

In short my view is that you should not waste your time with trying to get this to work. If your job is dependent on it, use XP/64 for best performance.

slovar2003 said...

Thank you )
All Russian students use your post to install Learning courses )))

tyrob56 said...

In response to AnubixDevilX question I can confirm that this does in fact work on WS08R2. I have had to use this workaround on a few occasions when our facility is running a custom course that uses parts of one class's VMs that use Hyper-V and parts of another Class's VMs that use Virtual Server or Lab Launcher. The only caveat is that when running the Virtual Server VMs you must turn off the Hyper-V Service, otherwise the VMs run extremely slow to the point of unusable. Hope this info was useful.

Tom Chen said...

I followed all the screenshots in the tutorial, installed virtual server 2005 r2 sp1 on my win 7 ultimate x64 box, however I can create VM but cannot add virtual network adapter mapped to my host's physical NIC. I only see 'internal card' in the drop down. Hope someone can help me!

Hotdog said...

Man...thanks a million! I still cannot get over the fact that MS did not provide 64-bit support in Virtual PC in Win7. It almost seems at times that they are not trying to compete with VMWare at all.

Alex Gold said...

Thanks for such best tutorial.. i like it.. good work.. keep it up.. :)

MS Windows7

bare bones said...

All step sre very clear to implement ! Thanks for sharing .



Windows MAC Support

Meagan said...

Never found such a mentor of Windows 7 like you on web. I have learnt all the things related to Windows 7 from your blog only. Thank you so much.
----------------------

- IT Consulting Los Angeles

David richard said...

Thanks for sharing useful information,regarding virtual servers.virtual servers europe