Tagged: p2v

How to virtualize a Domain Controller

First off a domain controller is always a scary thing to p2v but it can actually be a fairly straightforward process to complete.

In our network our DC’s also have other roles and services installed on them which made the easiest and proper way of just creating a new DC within the virtual environment then demoting and removing the old physical one rather difficult. So p2v was really our only option.

If you follow these instructions then you wont go far wrong with p2ving your domain controller.

1/ Investigate your domain controllers services and see if you also have any transactional databases on there as well or anything that may be sensitive to consistancy (such as SQL/Oracle/backup software or AV).

2/ Write down the services that are associated with any DB’s or picky software you may have.

3/ Run the vmware converter standalone install on the domain controller but choose the advanced install (client-server) and select only the agent to be installed.

4/ Once the install has completed Reboot your DC into DSRM mode by furiously hitting F8 at the appropriate point of the boot process.

5/ Input your DSRM Adminstrator password (remember at this point there are no domain accounts available on the DC).

6/ Open up the services.msc tool and stop and disable those servers you have listed previously as sensitive to change (db’s etc).

7/ Run the vmware vCenter Converter Standalone client on your own laptop or whatever you use to do p2v’s with.

8/ P2v the DC in the normal way running through the wizard (If you get the old multiple connections are not allowed message try inputting the IP of the DC instead of the DNS name or the other way round depending on what you have done first).

ii/ One thing you will need to think about if is your DC points to itself for primary DNS resolution then the conversion will fail and in the export logs you will see something similar to this  “Found dangling SSL error”. Change the server you are converting to point to an alternative DNS server that can resolve your ESXi servers and vCenter addresses.

9/ When the p2v process has completed from the ViClient make sure your vNic’s are disconnected from the network (so when the vm is powered on it wont be able to talk to the production network).

10/ Uninstall all the vendor installed helper drivers and apps etc, (hp/dell/IBM nic drivers and diag utils etc) and configure the networking also reenable and set the services back to automatic or whatever the previous state of the services were (SQL DB’s AV\Backup software etc).

11/ shutdown the physical DC and also the virtual DC.

###WARNING AT THIS POINT THE PHYSICAL DC MUST NEVER EVER BE CONNECTED BACK TO THE PRODUCTION NETWORK EVER AGAIN###

12/ Reconnect your vm to the production network and power it on.

13/ When its booted give it a few minutes to calm down and then login and check the following

Event Logs (its handy to check the old ones pre p2v as well) just to make sure your not panicing about an error or message that existed previously.

Check replication by creating an object in AD (a user for example) on the other domain controller and check that it is replicated to the newly vm’d DC
Delete the newly created object and check that it is also deleted on the other DC.

Run DCDIAG and NETDIAG and pay attention to any errors or informational messages you may receive.

Check your backup software interface I know for sure that Backupexec disables the job and you have to run through the edit settings menu and reselect the drives/folders you want to backup.

Then all you need to do is monitor the situation and just periodically check the event logs etc for oddities.
The last and most important job of all is to go into your server room and decable the old physical server (for the sake of a couple of minutes this could save you hours of heartache if a well meaning tech powers the DC back on again by accident).

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.

Virtualizing linux boxes

I’m going to talk briefly about virtualizing live linux servers. At work i’ve just virtualized my first red hat box. Was it painless? No. Was it informative? Yes.
l was given the task of p2v’ing the box after a disk in its mirror failed. So with a good bit of googling i came upon this tutorial on how to virtualize the box. It was not quite complete for me and I had to figure out various error messages I encountered along the way but I eventually managed it and with shaking hands clicked the vm’s power on button.

I must admit I was expecting a good number of errors when it started (and would not have been surprised by a kernal panic), but it booted into kudzu hardware manager uninstalling all the old bits and installing the new and too my relief completed its boot without any further issues.

Some of the issues that I came across along the way is doing the conversion in this way creates a VM for you and it firstly mounts a VM convertor helper ISO into the VM. This helper VM requires an IP address etc so you need to either let it DHCP for an address or Statically assign one during the convetor wizard screen.

Also as it needs to be contactable on the network you need to ensure that the VM is set up so that the network card(s) are on your production network. So if any of you normally put the cards into an isolated lan then this wont work. Also I’m not sure if this is to do with our setup or convertor “feature” I found I had to have the machine running the convertor client connecting to the convertor server on the linux box in the same subnet.

Trouble is now I’ve done one I expect I’ll be labelled with the “Linux Virtualization Expert” badge at work and will be given lots of other jobs that wont be quite so smooth! Ah well its all about the learning curve isnt it.