Blog posts - virtualization

Virtual PC 2007 or Virtual Server 2005 to Hyper-V migration guide

I’m working with Hyper-V since more than 1 year and now I’m migrating the developer images of my company from Virtual PC or Virtual Server 2005 to Hyper-V. For me the process is straightforward since I have done it a lot of times last year but I thought this might be interesting for someone else.

This guide doesn’t use any third party tools or the System Center Virtual Machine Manager and it doesn’t include clustering. For a list of Hyper-V supported guest operating systems please read About Virtual Machines and Guest Operating Systems. There are also a lot of information at TechNet:

If you are interested in Hyper-V networking with a Loopback Adapter you might want to take a look at the following articles:

In my case I had to migrate a virtual machine from Virtual PC 2007 SP1 to Hyper-V so you will see Virtual PC instead of Virtual Server 2005 in the screenshots.

Prepare the virtual machine

Before you can run the image with Hyper-V you need to prepare the virtual machine using Virtual PC or Virtual Server.

Document your virtual machine configuration

First of all you need to remember your virtual machine configuration so you can recreate it later with Hyper-V. Without 3rd party tools you need to write it down or to make a screenshot.

Remember your virtual machine configuration so you can recreate it later with Hyper-V.

As you can see in the picture I’m using 2 virtual network adapters: one for the communication between the images and one for getting access to resources outside your image (file share, internet). The communication between the images is faster using a local network adapter.

Important: “You cannot use a SCSI disk to boot a virtual machine in Hyper-V. If the boot disk of your virtual machine is not IDE, you should change it before migration. You can use a script for changing virtual machine disk type to automate changing the disk controller configuration type from SCSI to IDE. The script is available at http://go.microsoft.com/fwlink/?LinkId=135672.” (from the Virtual Machine Migration Guide)

Update your operating system with required updates and hotfixes

You need to update your image in order to meet Hyper-V guest operating system requirements. At the beginning of this guide you can find the requirements.

Installing Windows Server SP2. You need to update your image in order to meet Hyper-V requirements.

In my case I needed to update Windows Server 2003 SP1 to SP2. Otherwise you can’t install the Hyper-V Integration Services.

Uninstall the virtual machine additions

After installing all necessary updates you need to uninstall the Virtual Machine Additions. In Windows Server 2003 you can do this using Control Panel – Add or remove programs.

After installing all necessary updates you need to uninstall the Virtual Machine Additions.

After uninstall I restart the image in order to be sure everything worked fine.

Remove network settings and shut down virtual machine

Before you shut down your image you need to remove the network settings. Since Hyper-V Integration Services will install new network adapters you will get an error message when you try to reuse static IP settings.

After removing the network settings you need to shut down the image. Using a saved state will not work.

Create Hyper-V virtual machine

Now it’s time to get the image working with Hyper-V.

Create the virtual machine

At first I created the virtual machine using the Hyper-V wizard. Here you need the settings documented in the first step.

Creating a virtual machine configuration with the dopcumentes settings. 

Install Hyper-V Integration Services

When you connect to a Hyper-V image a console will open where you can select Action – Insert Integration Services Setup Disc from the menu (no need for searching the .iso file manually ;) ). This will automatically start the setup.exe inside the image.

Installing the Hyper-V Integration Services.
At first a new HAL will be installed and after rebooting the rest of the Integration Services will be installed which needs a second reboot. Please be aware that you need an install disc of your operating system if you deleted all drivers from your Windows folder. I did it when I created the image since it saved a lot of disc space and doing a copy of my image needed less time.

Recreating network settings

At the end you need to recreate the network settings since the Hyper-V Integration Services installed new network adapters.

Recreating the IP settings of the virtual network adapters.

If you didn’t remove static IP addresses at the end of the preparation process you will get an error message saying that the IP address is already assigned to an other network adapter. You can chose no if you don’t want to assign a new IP address. Using the same address worked for me without errors so far.

Conclusion

When doing a migration from Virtual PC or Virtual Server 2005 to Hyper-V you need to take care of a few things. Although I don’t have a cluster I can imagine that this might not be straightforward like it is written in this post.

Hyper-V – Tips and tricks – Part 1

Since I’m using Hyper-V in order to run my 64bit SharePoint 2007 / Windows Server 2008 development environment I have collected some useful tips and tricks over the time. Today I want to show you how you can clean your virtual hard disk from files taking up more than 3 GB of hard disk space.

Important: Since I use Hyper-V as my development environment I don’t recommend to do these things in a production environment!

Disk Cleanup

You can save up to 100 MB or 200 MB by e.g. removing temporary files.Usually you can do this by opening the properties of a local drive and then click the Disk Cleanup button. When using Windows Server 2008 you manually have to activate the features you need which makes Windows Server 2008 the better workstation for a SharePoint developer compared to Windows Vista .

In order to activate the Disk Cleanup button you need to install the Desktop Experience feature in Server Manager:

image

c:\windows\installer\

This folder took 2.67 GB of my hard disk space so I decided to remove the content of the folder which I don’t recommend in production environments. This folder stores files for the install and uninstall process of programs. Some files may be used in the future so removing the contents of the folder may lead to problems. For me as a developer deleting the content in my Hyper-V virtual image was ok.

image image

I removed the contents of this folder.

image image

Update 2009.01.22: Deleting the folders with the GUID is not a good idea because Office 2007 will not work and the Office Server links will loose their icons.

c:\msocache

If you install Office 2007 on your computer this folder is created to stores installation files. If you want to add components to your Office 2007 installation the installer takes the needed files from this folder. By deleting the contents of this I freed another 600 GB of hard disk space. If you want to add features to your Office 2007 installation you then need to insert the DVD or mount an image so the installer can access the needed installation files.

Conclusion

After deleting the files and folders you should defragment your virtual hard drive and after that you should compact the disk by using the Hyper-V Virtual Hard Disk Wizard.

image

I did comparable things with my Virtual PC 2007 and Virtual Server 2005 SP1 images and never experienced any problems as long as you use the virtual image as a developer image. You can do it too but you should take a closer look if this is suitable in your situation. Later on in the year 2009 there will be Solid State Disks for everyone and I think we don’t need to care about some GB of disk usage since you can copy large files with an incredible speed.

Update 2009.01.22: Please do it only if you understand and know what you are doing. ;)

Installing Exchange Server 2007 with Service Pack 1 on Windows Server 2008 - Part 2

This is the second part of installing Exchange Server 2007 with Service Pack 1 on Windows Server 2008. You can see the scenario and the required features and server roles here: Installing Exchange Server 2007 with Service Pack 1 on Windows Server 2008 - Part 1.

Installation screen of Exchange Server 2007 with Service Pack 1

Pre-installation

Before you can start the installation you have to install the following components:

  • .NET Framework 2.0
  • Microsoft Management Console
  • Microsoft Windows PowerShell

You can either install the PowerShell by using the command line or you can use the Server Manager to add the required PowerShell feature. If you want to use the command line run the following command:

  • ServerManagerCmd -i PowerShell

Installing PowerShell by command prompt.  Successfull installation of PowerShell by command prompt. 

You can also use the Server Manager:

Installing PowerShell by using Server Manager 

Finally we can start the installation of Exchange Server 2007.

Installation

  • Click next at the introduction screen.
  • You can then turn on or off the error reporting.

Click next at the introduction screen. You can then turn on or off the error reporting.

  • Choose the typical installation of Exchange Server.
  • If you have Outlook 2003 clients in your environment choose yes, if not choose no.

Choose the typical installation of Exchange Server. If you have Outlook 2003 clients in your environment choose yes, if not choose no.

  • After that your system will be analyzed if all required features are installed.
  • If all required features are installed you shouldn't the the following screen with the red bullets.
  • If you get the error message "Setup cannot detect an SMTP or Send connector with an address space of '*'." you can refer to the following article: http://support.microsoft.com/kb/556055/en-us.

After that your system will be analyzed if all required features are installed.  If all required features are installed you shouldn't the the following screen with the red bullets.

  • Now you can start the installation process.

Now you can start the installation process.

  • After finishing the installation you have successfully installed Exchange Server 2007 in your environment.

After finishing the installation you have successfully installed Exchange Server 2007 in your environment.

Please not that this is not a best practice article on how to deploy Exchange Server in a production environment.

Installing Exchange Server 2007 with Service Pack 1 on Windows Server 2008 - Part 1

In this article I will describe how to install Exchange Server 2007 with Service Pack 1 on Windows Server 2008. Scenario: I have installed Windows Server 2008 and configured the Active Directory role. Installing Exchange Server on a Domain Controller might not be suitable for a production environment. ;)

Installation screen of Exchange Server 2007 with Service Pack 1 

Prerequisites

Before we can start the installation we have to configure the Windows Server 2008 installation. Depending on the Exchange Server roles you have to install different Windows Server 2008 roles and features.

Exchange Server roles

These are the roles offered by Exchange Server 2007:

  • Hub Transport Server Role: Used for message routing.
  • Client Access Server Role: Provides the Outlook Web Access Interface.
  • Mailbox Server Role: Used for hosting mailbox stores.
  • Unified Messaging Role: Interface between Exchange and a compatible PBX phone system.
  • Edge Transport Role: Used to filter out viruses and spam before routing them to the internal network.

Exchange Server roles prerequisites

Since I don't need the Unified Messaging Role and the Edge Transport Role I will only install the prerequisites for the following roles:

Hub Transport Role Prerequisites

  • IIS6 Metabase Compatibility
  • IIS6 Management Console

Client Access Role Prerequisites

  • World Wide Web
  • IIS6 Metabase Compatibility
  • IIS6 Management Console
  • IIS7 Dynamic Content Compression
  • IIS7 Static Content Compression
  • IIS7 Basic Authentication
  • IIS7 Windows Authentication
  • IIS7 Digest Authentication

Mailbox Role Prerequisites

  • World Wide Web
  • IIS7 Dynamic Content Compression
  • IIS7 Static Content Compression

Installation of Exchange Server roles prerequisites

  • Select the Web Server (IIS) role and add the required features.

Select the Web Server (IIS) role. Add the required features.

  • Select the ASP.NET feature and all the checked features you can see in the pictures.

Add ASP.NET features 

  • After that you can finish the installation.

If you have selected all features you can start the installation.The installation has finished. 

Now you have all the Windows Server 2008 roles and features configured so you can start the installation of Exchange Server 2007 with Service Pack 1.