Thursday 28 April 2011

Migrating a Win SBS 2003 server into VMware

Last weekend I had the joy of migrating our main domain controller (Windows Server 2003) from its own physical server to a virtual server running on VMWare (ESXi 4.1U1).  Overall it went very smoothly with just a few issues.  It was a long process though.  I started it Saturday mid afternoon, came in Sunday morning to find it had got confused as time on ESXi host was wrong (Windows needs activation NOW, no network, installation ID not displayed and MS tech support don't work on Sundays).  Fixed the time on host and restarted it.  Came in Monday (bank holiday luckily) and finished the install without further issues.  These are the steps I took:
  1. Firstly uninstall everything you don't need any more, delete all temporary files, empty the recycle bin and move any file shares off the machine for now (Transfer rates for the convertor were about 5MB/s on decent hardware with a gigabit switch - far faster to move files out, then convert, then move files back in)
  2. Defrag the hdd (generally a good idea and should make things faster)
  3. Turn the machine off and boot from a VMware Convertor CD
  4. At this point I blocked all emails at our firewall so that if I was not happy at any point I would not have any emails delivered to the wrong machine.
  5. Leave whatever networks it detects alone - far better to clean up unneeded interfaces after teh clone than to delete one that was actually in use
  6. For best speed do not change the size of partitions
  7. Unselect any recovery/maintenance partitions - they will be irrelevant ont eh virtual hardware anyway
  8. Tick install VMWare tools - its needed for lots of virtual hardware drivers so you want to install it early
  9. Run the convert
  10. Go home for the night (Seriously, my convert took about 17 hours)
  11. Before turning the machine back on check the hardware settings
  12. Change the SCSI card type from Bus Logic to LSI Logic - significantly faster
  13. Create a Snapshot
  14. Turn on the virtual machine, log in as the domain administrator user not just a member of the domain administrators group*, let it find drivers for everything it detects on boot, let it install VMWare tools and then when you are happy its finished reboot
  15. Repeat point 12 if required
  16. Open a command prompt window and enter these two lines:
  17. set DEVMGR_SHOW_NONPRESENT_DEVICES=1 devmgmt.msc
  18. In the device manager select "Show hidden devices" then go through and delete all the greyed out devices (yes all of them, there might be a LOT - it took me about 20 minutes).  They will not be used again but if you leave them there they will still load the drivers on boot and might have unintended consequences 
  19. Note that if you use static IP addresses then the missing network adaptor will still have it assigned - you need to remove the device (as described inpoint 16) before you will be able to assign the IP address to a VMware virtual network adaptor and get the network working.
  20. Reboot and check you are happy with all the file shares, test incomming and outgoing emails (after re-enabling emails through the firewall if you disabled it) etc
  21. Activate windows
Congratulations, you now have your server running in VMWare.  Hopefully none of your users will notice anything different (or will notice an improvement - but they never seem to mention that). 

    * Some things have gone wrong unless logged in as user "administrator" for example activation does not generate its identifier so it is not possible to activate.  Your experiences might differ but my gut feeling is that for fundamental setup the actual administrator has fewer problems than a member of the domain admins group.  For normal maintenance, windows updates, software install I just use my main account.


    1. Hi I just converter my sbs 2003 sp2 server to esxi 5.0 . Everything are working perfectly except the licenses. On the physical machine we had 25 user licenses (5 + 20 add-ons) and unfortunately the 20 extra licenses were not transferred correctly. We tried to restore or add new licenses (on the virtual machine) through the server management without success. It’s giving me an error and open window for debugging.

      Do you have any idea how to add or restore licenses without the server management tool ?


      1. Hi Peter,
        Sorry to hear about your problem, my CAL's all transferred without any issues so I have not seen this before. A couple of suggestions:

        The Server Management MMC console has several snapins and it might be one of the others causing the console to crash. Try just running the licencing part on its own:
        (click start-> run -> type "%systemroot%\system32\sblic.msc /s" (no quotes) and hit enter.)

        Another option might be to power on the original physical SBS server (make sure you unplug all network cables first!) and to try backing up your licences to a USB memory stick then copy the files to your virtual SBS and try to re import them.

        Also worth checking:
        Are all patches installed and have you rebooted?
        Check the hard drive of the source machine and virtual machine - you might have a corrupted system file from before/during the transfer which is the cause of the crash.

        Otherwise I'm afraid its down to google and any error messages you see. Good luck getting it sorted.

        Finally I *think* that SBS 2003 in *per user* mode does not enforce the licence count - eg it warns you repeatedly but does not stop anything working. Not ideal but as long as you have the licences to show the BSA if they ever pay a visit it would work - although you probably want to verify this before trusting it. Worst case scenario its only for 2 years and then you will have to move to a newer OS when MS stops providing security updates.

    2. Hello Neal and thanks for your quick reply,

      I have just solved the problem. The problem was caused during conversion of the physical machine to virtual.

      Unfortunately all the executables of the server management license tool inside the virtual machine were corrupted so I just copied the ones from the physical server and replace the faulty ones.

      Now the license tools are working properly and I can add backup transfer licenses without any problem.


    3. Excellent article can be used as a guideline)
      I work in a similar field virtual data rooms , the information can be useful for you, any new sensible information is useful)

    4. What are you using for monitoring VM server? They have their own control panel ? For standard windows server we are using Total Network Monitor but I don't think that it will work with VM server.