How to virtualize Exchange 2007

Well, I’m going through my p2v exercise with my current employer and whilst I have p2v’d many servers I had not converted an exchange server before. Our exchange server is a single windows 2003 R2 x64 box with all the exchange roles installed on it, its not a complicated setup but for us it doesn’t need to be. So googling around I found quite a few horror stories of failed p2v attempts. So with a degree of uncertainty I planned for the exchange conversion.

I started off my stopping and disabling these services on my exchange server (because of this obviously you need to carry this out within a maintenance window as exchange will be down for a couple of hours at least.)

MS Exchange Active Directory Topology
MS Exchange File Distribution
MS Exchange Information Store
MS Exchange Mail Submission
MS Exchange mailbox Assistants
MS Exchange replication service
MS Exchange search indexer
MS Exchange service host
MS Exchange system attendant
MS Exchange transport
MS Exchange transport log sear
microsoft search (exchange)
sql server (blackberry)
sql server browser
sql server vss writer
Backup exec

Now there are a couple of services there that are specific to my set up but you get the idea, anything exchange or sql based I stopped and disabled. I then carried out the conversion as per any other p2v using the standalone vmware convertor program. I also wanted to shrink the servers D drive as it was way too big for the mailstore so I configured that as well at this point.
When the conversion had completed I powered down the old physical server and powered on the vm. Then I removed the brand specific drivers and applications (such as HP and dell drivers and array helpers). The I installed the vm guest tools and configured the networking.

I then reset all the disabled services to automatic and restarted the vm. a few nervous minutes later I was able to view emails in owa, use active sync and send/receive emails through outlook, so it all in all seems to have gone well. At least much better than my googling was suggesting it might.

So in my experience of converting exchange server 2007 all you need to do is stop the exchange and sql services (plus any backup agents you may have) and disable them.
Run the conversion using the current vmware standalone converter
Power off the physical
Power on the VM
Remove all of the hardware specific drivers and applications
Install the vm guest tools
Configure the networking
Re-enable the disabled services and reboot the server.
Then check the event logs etc just to make sure windows isn’t complaining about anything.
Then you just need to let your users know that it is safe to use outlook etc again.

The trouble I guess with p2ving exchange is that once you have brought the services back online and it starts servicing mail requests its pretty much impossible to turn the old physical server back on as you will lose any recent transactions that the exchange vm made. So if there is something thats not quite right with it then you really have to power on through and find a fix for it rather than revert to reconverting or powering on the old physical.

vSphere5 Storage Profiles

Storage profiles in vSphere5 allow you to organise you storage within vSphere based upon its capabilities. vSphere includes some specific API’s that can detect a storage devices specific capabilities however not many storage devices support this function at the moment.
However you can also create user defined storage profiles which allow you to assign capabilities to datastores and then create storage profiles that you can link to the datastores capabilities. This allows you to ensure that your virtual machines get the storage capabilities that they need to perform within your own agreed SLA.

In order to use storage profiles you need to decide what capabilities of your shared storage you want to use to segregate your vm’s with. For example you may have a SAN with a high speed SAS set of disks along with a lower speed SATA array. In this example the choice is quite straight forward as you have a slower capacity based array and a smaller high speed array as well. In this instance you could create storage profiles to represent Capacity or Performance.

With this in mind let’s create a storage profile with these two parameters. Firstly click on Home/vm storage profiles.
1/ Click on manage storage capabilities then click the add button and in this instance lets just call the capabilities Fast and Slow. Create a separate entry for Fast and one for Slow.

2/ Then click on the “Create VM Storage Profile” button. Because we have a fast and slow choice I’m going to use the names Tortoise and Hare as the names of the storage profiles. So give your first storage profile a name in this instance Tortoise then select next. You then need to select the storage capabilities to assign to the storage profile. In our instance we want to assign the Slow capability to the Tortoise Storage Profile. Click Next and then review the information and click Finish.

NB. You can assign two storage capabilities to a storage profile. However because you may also have system defined storage profiles you must not exceed 2 assigned capabilities per datastore. For example you could have 2 capabilities defined in a user defined storage profile but no system defined storage, or you could have one user defined capability in a user defined storage profile and one capability defined in a system defined storage profile.

Create another storage profile for the Hare and assign it to the Fast storage capability.
3/ Then click on the Enable VM Storage Profiles and just click the enable button.

4/ Now all you have to do is assign the user defined storage profiles to your datastores/dataclusters so click on Home\datastores and datastore clusters. Right click on a datastore then select assign user storage capability and select the storage profile you wish to assign to the datastore.
If you have datastore clusters you cannot assign a user defined storage profile to a datastore cluster root however if you assign the same user defined storage profile to each datastore in the cluster then the cluster will inherit the user defined storage profile.

When you are ready to create a new virtual machine you will now have an additional option in the new vm wizard to select the storage profile you need for the vm then it will show you the compliant and non-compliant datastores that you can use on the vm.

Parent virtual disk has been modified error vSphere 5

Whilst p2ving I came across this little issue when powering on a vm for the first time. I received an error stating the below:

Cannot power On: Reason: The parent virtual
disk has been modified since the child was
created. The content ID of the parent virtual disk
does not match the corresponding parent content
ID in the child.
error
DATE TIME
Power On virtual machine

Now the only thing that I can guess happened here is that vDR created a snapshot of the vm as it was being created. The first thing I tried to resolve the issue was to right click the vm select snapshot and then consolidate. This then thew up another error message similar to the first so that was no good.
I deleted the snapshot and tried again but received again the above error message.

I googled around a bit and found some rather convuluted solutions to the problem however I decided on a much simplier solution that worked just as well.

Before performing any of the below ensure that you have deleted any snapshots that are active on the VM.

1: Right click the vm and select edit settings
2: Select the virtual hard disk and select remove but DO NOT delete the VMDK
3: OK your way out of the settings then go back into the edit settings menu
4: This time select Add and choose Hard Disk and use an existing virtual disk
5: Point your new hard disk at the VMDK file and click OK
6: Power on the VM and all should now be well.

VNXE registration error

When you first switch on a VNXE you have to go through the management network setup tasks, then you have to register the product to download and install the licence file for the software packs you have purchased with the hardware. This is where I hit a bit of a brick wall for a while with our first VNXE 3100. All I got when clicking the obtain licence button was a message on the EMC website saying the Product ID is not recognised. This happened if I type the product ID/ serial number in manually or let the system do it (as it does when you click obtain licence).

So I rang emc support and after a few days of waiting I finally got an answer from them. The support chappie said that it does that if the order company that is registered against the device shows and different to the name of the site so as we bought these from a reseller I guess they were registered under our company name on the order but the site was registered as the reseller.

Quite why this makes any sense I do not know but the support guy emailed the licence files to me and all is now running as it should.

Creating a bootable USB installation media for windows 7

You can install windows 7 in many ways, one of them being creating a bootable USB key instead of using a DVD (cause lets face it installing from optical media is so last century and slow) . In order to do this you need the windows 7 install files (normally on your Windows 7 DVD or downloaded ISO file) and a windows vista/7 system to create the bootable USB key. a 4GB Usb key will do the job nicely here.

In order to create the key you will need to do the following:

Open an elevated dos prompt and type in “diskpart”
You will need to find the usb key by typing in “list disk” which will present all the disks available on your system (the usb key will have a smaller disk size so will be easy to spot.
Then type “select disk” and then the number that list disk gave representing the usb key. For example “select disk 1”
If the USB key is brand new you will need to create a partion on the key by typing “create partition primary” and then when it has created the partition type “format quick” which formats the partition as a fat32 drive using the quick method (perfectly adequate for what we want.
Once the format has completed type “active” which will mark the primary partition on the usb key as active and then type “exit” to get out of the disk partition tool.
All you need to do now is copy the entire contents of the windows 7 dvd to the USB key and insert the key into the target computer and configure the bios to boot from USB key.

 

 

Generating a new SID in windows server 2008 R2

A lot of people use the newsid tool to generate new sids for servers this unfortunately does not work so well with server 2008 and can produce some stunning results if you try and use it in R2 (hint it wont boot afterwards).

However you can create a newsid with sysprep, which is installed by default with server 2k8.

Click Start/Run
Type sysprep into the box and hit enter
it will direct you to the sysprep folder
double click the exe in the folder
leave the default option “Enter system out of box experience” and tick the generalise box which is the bit that will generate a new sid.
Click OK and wait for a bit the server will reboot run though some basic installation tasks and also run you through the mini-setup process.

This is great for template vm’s that have not already been set to to use the customisation wizards available in the various hypervisors.

Migrating Outlook autocorrect to a new profile

When you’ve done all that you can to diagnose a problem and you are left with the last bastian of hope that is migrating the user to a new profile (I do this by renaming the current one to something.old) along with PST’s and desktop, document and favourite folders you can also migrate Outlooks autocomplete data.

The file extention for the autocomplete data is *.NK2 which is normally located (in Outlook 2007) in %userprofile%\application data\microsoft\Outlook . Copy the NK2 file into the newly created profile and ensure that the NK2 file is renamed to match whatever you have chosen to call the Outlook profile in the users new profile. Et voila, years’ worth of autocorrect data back.

Adding Storage to Citrix Xenserver 5.6

Xenserver is a great virtualisation platform to run either as a standalone installation for a lab or branch office or as part of a pool of xenservers for larger scale virtualization projects.

To leverage much of the fun stuff that xenserver can do (xenmotion, HA etc) your vm’s must reside on shared storage. BTW Xenmotion is available in the free edition of xenserver as well so that is great news for all those home labs out there.

You should add storage at the pool level rather than to each individual server in the pool, for one thing its less clicks and another xenserver will moan when it detects multiple connections.

 

Right click on the pool and select “New Storage”

 

 

 

 

 

 

 

Now if you are adding storage for a home lab or small scale virtualization solution you will want to add and nfs or iscsi lun as storage, click next once you have made the correct choice and then you will need to give your new storage repository a name and configure the connection details.

 

 

 

 

 

 

 

Click finish and then you will need to click OK to allow the new SR to be formatted, now its ready to be used.

 

If you are playing with xenserver in a home lab you can use openfiler or starwinds Iscsi software to create and connect to iscsi luns.

Openfiler is a specific linux distribution which sole purpose is as a file server with various connection options. Starwind runs within windows and allows you to easily create iscsi connections to within a windows friendly GUI (always nice). Both are free, starwind obviously sell a commercial version but the free version is a great fit for lab environments.

An iomega storcenter ix200 is another great reasonably priced nas box which can also be an iscsi target. Its a nice tidy size and has 2 disks as standard in a mirrored config.

I’m thinking of creating a couple of videos based on storage configuration for xenserver so watch this space.

TTFN

 

 

 

 

 

Active Directory Sites and Services Tutorial 2k8 R2

Active Directory Sites and Services allows you to create a logical outline of your physical sites and links. Much the same as AD users and computers allows you to create a logical structure of you users and computers objects etc. Sites and Services also allows you to map and control active directory replication which is great for replicating to sites that maybe are not quite so well connected as others. This allows you to design active directory around physical boundaries and challenges such as a slow wan link to a branch office or even {shudder} a dial up link that is only connected irregularly.

By default when you create a new root forest a site is created within sites and services (helpfully named DEFAULTFIRSTSITE) and all domain controllers are added to the to the default first site. To take advantage of the features of sites and services you will need to create 3 different type of objects Those are subnets, Inter-site transport links, and sites. Sites are the objects for physical locations so for example if you had 3 sites, london, paris and isle of wight each location would be represented with a site. Inter-site transport links are objects that define how sites link to each other so if london and paris had a dedicated pipe between each other that would be a site link and if isle of wight had a dial up connection then that would also be a site link. Subnet objects define what subnet a site uses which allows client computers to interrogate DNS to find out which site they are on and therefore contact the local domain controller or other service that is sites and services aware.

 

To start configuring sites and services its always a good idea to change the name of the DEFAULTFIRSTSITE to something meaningful, so for example you can rename it to CorporateHQ. And also rename the DEFAULTIPSITELINK which at the moment has no use until you create an additional site. Now another cool thing whilst we are talking about links is that you can choose one of two different protocols when configuring the link which is either IP or SMTP. Yep I said SMTP the protocol mostly used for mail transport. I’ll explain more on that later.

Initially If you have more than one site link as we do in our example you will need to create the links first that will bind the sites toegether (remember that links are representations of physical links such as WAN connections or slower technologies such as dial up). To create a site link you will need to decide which protocol is best for the site link that you would like to create, you would use IP for an always up connection such as a site to site VPN, or better connection. Now because SMTP is good for queueing data and sending when the link is available you would use SMTP for links that are not always up such as dial up links or slow and unreliable connections to remote offices. I’ll explain more in later blog posts. Right click on the link protocol folder that you wish to use for the connection and select New Site Link, you will at the moment get a warning message about only having one site configured which obviously causes problems for site links as they have nothing to link to, at the moment you can safely ignore this message and click ok. Give you link a name and click ok.

Now to create your first additional site you need to right click on the sites container and click “new site” Choose a name for the site (something short but meaningful) and click next. Then select the sitelink that you would like to use to connect the site with. Then you will get a final message saying you need to take additional steps to correctly configure sites and services for replication.

Once you have created a site its time to start populating the site with configurable options. Now one thing that does underpin alot of what sites and services is about is the subnet configuration. By identifying which subnet a site uses, you enable clients local to that site to be able to find and use their local domain controller(s) or service is sites and services aware. Also when you create and promote other DC’s they will automatically add themselves to the correct site when they are created based upon their own IP address. To create a new subnet all you need to do is right click on the subnets container and select new subnet. Then enter the subnet details into the box and select the pre-created site that it should be associated with. So for example if our paris site uses 10.0.0.x as its address range you would enter 10.0.0.0/24 into the prefix box and then select the paris container.

 

I’ll blog about the configuration of your new sites and services topology which will allow you to define preferences and costs to the links to specify in what order they should be used etc.