HowTo Install an Exchange test lab

Introduction

This guide provides information on how to set up a test lab with Windows Server 2008 + Exchange 2007 and Windows 2008 + Exchange 2010. Some parts of this guide are specific to Ubuntu Linux distribution, so we encourage you to update the documentation with additional configuration details for other distributions.

This test lab will provide a reliable evaluation environment based on trial software downloaded from Microsoft website that you can use to test and work on OpenChange stack and features. Note that the lab is not intended to be used for production purposes given the 180 day trial limitation.

Prerequisites

System requirements

  • The host used along this guide is an amd64 platform running Ubuntu server 10.04 LTS Lucid
  • Minimum of 2Gb of memory is required to run all virtual machines at the same time
  • Minimum of 100Gb of available space is mandatory

Installing VirtualBox

Please refer to http://www.virtualbox.org/wiki/Linux_Downloads for instructions on how to install VirtualBox on your favorite Linux distribution.

Prepare your environment

Install bridge utilities:

apt-get install bridge-utils uml-utilities

In this guide, we will install virtual machines under the vboxuser account and under */vbox* directory:
  1. Create vboxuser and add it to vboxusers group:
    # adduser -a vboxuser vboxusers
  2. Add vboxuser to uml-net group to grant access to bridge capabilities:
    # adduser -a vboxuser uml-net
  3. As root create the /vbox directory and grant access to vboxuser
    # mkdir /vbox
    # chown -R vboxuser:vboxusers /vbox
    

Now sudo as vboxuser account.

We store ISO files within an iso/ directory located at the root of the vboxuser home directory.

HowTo Create Windows 2008 base image

Guide on HowTo Create Windows 2008 base image

HowTo Create Exchange 2010 Virtual Machine

Guide on HowTo Create Exchange 2010 Virtual Machine

HowTo Create Exchange 2007 Virtual Machine

Guide on HowTo Create Exchange 2007 Virtual Machine

Quick start|stop|restart script

If you have followed all the different steps until now, you should be able to run either the Exchange 2007 or Exchange 2010 virtual machines. In our setup, we have created snapshot named ready after we installed Exchange server and setup Exchange accounts. The following script will ease start, stop and restart operations for the exchange_2007 and exchange_2010 virtual machines:

#!/bin/sh

vm=$2

echo `id`

start()
{
        case "$vm" in
                exchange_2007)
                                VBoxManage snapshot exchange_2007 restore ready
                                VBoxHeadless -s exchange_2007 &
                                ;;
                exchange_2010)
                                VBoxManage snapshot exchange_2010 restore ready
                                VBoxHeadless -s exchange_2010 &
                                ;;
                *)
                echo "Usage: $0 start {exchange_2007|exchange_2010}" 
                exit 1
        esac
}

stop()
{
        case "$vm" in
                exchange_2007)
                                VBoxManage controlvm exchange_2007 poweroff
                                VBoxManage snapshot exchange_2007 restore ready
                                ;;
                exchange_2010)
                                VBoxManage controlvm exchange_2010 poweroff
                                VBoxManage snapshot exchange_2010 restore ready
                                ;;
                *)
                echo "Usage: $0 stop {exchange_2007|exchange_2010}" 
                exit 1
        esac
}

case "$1" in
start)
    start
    ;;
stop)
    stop
    ;;
restart)
    stop
    start
    ;;
*)
    echo "Usage: $0 {start|stop|restart} {exchange_2007|exchange_2010}" 
    exit 1
esac

exit 0

Troubleshooting

I have 2 different mouse pointers with rdesktop

This is a known rdesktop bug. Installing Vbox guest additions and rebooting the server appears to resolve this issue.

I can't press <ctrl><alt><del> to log in

  1. On the bottom left of the login screen, select the ease of access icon
  2. Tick the Type without the keyboard (On-Screen Keyboard) option and press OK
  3. On the virtual keyboard, click on <ctrl>, then <alt> then <del> keys
  4. Close the virtual keyboard and enter your Administrator password

error code '2147504141' and message This property can't be found in cache'

This probably means you didn't disable IPv6 prior to starting the Exchange installation

How can I restore the snapshot created earlier?

For example if you want to restore AD_installed snapshot, run:

$ VBoxManage controlvm exchange_2010 poweroff

$ VBoxManage snapshot exchange_2010 restore AD_installed
Oracle VM VirtualBox Command Line Management Interface Version 3.2.6
(C) 2005-2010 Oracle Corporation
All rights reserved.

Restoring snapshot ce2940a0-d8c6-41d8-aa9a-3061907b0b94
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
$ VBoxHeadless -s exchange_2010
Oracle VM VirtualBox Headless Interface 3.2.6
(C) 2008-2010 Oracle Corporation
All rights reserved.

Listening on port 3391.

Note: Your virtual machine needs to be powered off before you can revert the snapshot

I don't have Internet from Windows 2008 VM

It is possible your local bridge adapter has a default route which comes prior to the NAT one. Open a Windows console and run route print command.
If your route for your local bridged interface (10.254.0.101 in our case) is showing up before your NAT one:

Network destination       Netmask     Gateway       Interface      Metric
0.0.0.0                   0.0.0.0     10.254.0.1    10.254.0.101   266
0.0.0.0                   0.0.0.0     10.0.2.2      10.0.2.15      266

Remove the bridged interface default route:

route delete 0.0.0.0 MASK 0.0.0.0 10.254.0.1

Also available in: HTML TXT