Sunday, January 30, 2011

Converting Windows 2000 with VMware Converter

Converting a Windows 2000 machine has a bunch of caveats and problems when going from physical to virtual (p2v), using VMware vCenter Converter Standalone.

Requirements:
  • VMware Standalone Converter version 4.0.1 (See Additional Info at the end)
  • Update Rollup 1 for Windows 2000 SP4 (KB891861)
  • Windows 2000 Sysprep tools (Q257813)
  • A Windows or Linux LiveCD. I recommend Knoppix (6.4+ - Linux) or Hiren (Windows).
    If you need to modify registry keys, use Hiren.

Procedure:
  1. Install VMware Standalone Converter version 4.0.1
  2. Extract sysprep tools and place them in C:\Documents and Settings\All Users\Application Data\VMware\VMware vCenter Converter Standalone\sysprep\2k
    That should be on the same machine that has VMware Converter, not the Windows 2000 server.
    * On Windows 2008, the location is C:\Users\All Users\VMware\VMware vCenter Converter Standalone\sysprep\2k (Thanks Anonymous for the tip!)
    or C:\ProgramData\VMware\VMware vCenter Converter Standalone\sysprep\2k (thanks Ben!)
  3. Either apply the update rollup to the server or extract the update rollup and replace it with the file SCSIPORT.SYS in C:\WINNT\system32\drivers. Applying the update is recommended if the system is stable.
  4. If you’re using a static IP on the Windows 2000 server, see this Knowledge Base article.
  5. Run the Converter and deploy the agent. If you’re asked to restart, restart then start the VMware Converter service manually before running the Converter again, otherwise it’ll ask you to deploy the agent again.
  6. In Step 3: View / Edit Options, Click on the Devices pane and change the disk controller to BusLogic SCSI.
  7. Keep the number of processors as is, because if you change it, Windows 2000 won’t auto-detect new CPUs and you’ll need to update the Hardware Abstraction Layer (HAL) on it manually. See KB234558 and KB249694 for more details.
  8. In the Networks pane, deselect the option to connect at power on.
  9. In the Advanced Options pane, do not select the options to power off the source and select the option to power on the target (VM). Do install VMware tools.
    Do NOT select "configure guest preferences for the virtual machine"
With that, you should be set to convert that machine. After the conversion is complete, the VM will start, install VMware tools, then restart. After it comes up you should apply the proper network settings then shutdown and enable the NIC to connect at power on.

Problems and Solutions:
  • "disk read error" when starting the virtual machine.
    This happens because you have selected the Disk Controller as “Preserve Source” or “IDE” -- you must select “SCSI” -- after doing so, you’ll need to reconvert the machine.
  • “KMODE_EXCEPTION_NOT_HANDLED” Blue Screen of Death (BSOD) during boot up.
    This happens because Windows 2000 is using the old SCSI driver (SCSIPORT.SYS).
    You must boot into a LiveCD and replace the file in the location mentioned above.
    This happened to me even after I copied the SCSIPORT.SYS to the target machine before converting.
  • After installing the Converter agent, you face problems & restart the Windows 2000 server, then when running converter again, it asks you to re-deploy the agent.
    This happens because when the Windows 2000 system comes up again, the Converter agent service isn’t started again.
    Open the services console (services.msc in run) and right-click VMware Converter then choose Start. After the service is started, run VMware Converter and it should connect.
  • Unable to communicate to the agent.
    The network traffic is probably blocked by firewalls that are on the Converter machine, the Windows 2000 target machine or in between. Make sure the firewalls are disabled or port 9089 is allowed to pass through.
  • "Inaccessible boot device" Blue Screen of Death (BSOD) during boot up.
    This happens due to some misconfiguration of drivers in the registry.
    To fix this, run the Converter program again and do a machine reconfiguration only (don't reconvert). Let it install VMware Tools, select "Reconfigure destination virtual machine" and do NOT select "Configure guest preferences for the virtual machine"
    If that does not solve your problem, read this thread.

Using The Linux LiveCD:
If you’re new to Linux, then here are some steps to help you replace files on virtual machines.

  1. Boot the virtual machine from the LiveCD, by either attaching the ISO file from the data store, your machine, or burning the ISO to a CD (as an image!) and booting it from your CD drive.
  2. At the boot prompt of Knoppix, just press enter to boot into the graphical interface.
  3. Now we need to attach the VM’s disk to the Linux system: open a root shell / terminal.
  4. Type: fdisk -l
    This will list all disks in your VM. Identify your operating system hard disk (by capacity if possible). If it’s not possible, then proceed with the next steps until you find your desired partition by looking at its contents.
    You will see things like: /dev/sda, /dev/sda1, /dev/sda2, ...etc. sda is your first hard disk. sdb is your second hard disk. sda1 is the first partition in your first hard disk.
  5. Type: mkdir /mnt/os
  6. If your operating system (OS) is installed on the first hard disk, first partition, then type: mount /dev/sda1 /mnt/os
  7. You can now open a file manager in the graphical interface and go to this directory: /mnt/os -- you’ll see the contents of that partition.
    If that is not your desired partition, skip to step 10 then try mounting another partition.

    Note: Make sure you mount a partition & not a disk!
    mount /dev/sda1 is correct. mount /dev/sda is not.
  8. To copy a file over the network from a Windows share on another machine, open a file manager and in the address tab type: smb://ip
    Example: smb://192.168.0.1, where the IP is of the machine you want to access over the network to copy a file from.
  9. Right click & copy the file, then go to /mnt/os and paste it there.
  10. You’re almost done. Now you just need to unmount the partition, so close the file manager window that opens /mnt/os and then in the root shell type: umount /mnt/os
  11. Reboot the VM and unattach the CD / ISO.

Additional Info:
  • Knoppix is like any *nix system: case-sensitive when it comes to file names. So you may have to delete to the original file manually then copy the new .SYS file due to the difference in letter case.
  • The sysprep tools will be used by the VMware Converter to prepare a new copy of Windows. It’s required for the cloning process.
  • Support for Windows 2000 has been dropped in VMware Converter version 4.3.
  • VMware Converter Standalone is free. VMware requires that you register to be able to download, but their servers are slow (at least in my experience). I got my copy from 4shared, so just search for it & verify the md5 checksum.
    Windows: VMware-converter-4.0.1-161434.exe - 35f22a3b40b114d70cdbda2d5056c10f
    Linux: VMware-converter-4.0.1-161434.tar.gz - 90ce68a9f75af91aed9119d419a98b3c
  • LiveCD Selection: You can choose anything that works for you as long as it has SCSI disk drivers, otherwise you won’t be able to see the VM’s disks (which is why getting Damn Small Linux was a waste of time...) and can read & write to the NTFS filesystem.

34 comments:

Anonymous said...

Hello,

You may want to update your post for doing conversions on Windows Vista/7 and Server 2008. The location to put the sysprep files is C:\Users\All Users\VMware\VMware vCenter Converter Standalone\sysprep\2k. It took me a bit to find it and will be helpful for anyone in a mixed environment.

MBH said...

Thank you!

I'll update the post.

Anonymous said...

Thank you so much for your detailed instructions. I was not able to use the .gho methods to get W2K to virtualize, but your steps worked out perfectly! I will inform that version 4.3 of the VMWare converter does not work with W2K for some reason.

I had to download 4.01 and it all worked out.

Thanks for your detailed explanations, saved my life.

MBH said...

I'm glad someone made use of this! :)

You could also use VMware's Cold Clone ISO (click Show Details) or make one your own.

Anonymous said...

Thanks for the post. The reason you had to redo the scsiport.sys even though you copied it over is Windows doesn't let you overwrite (or rename or delete) the file when it's in use (ie, when Windows is running). I finally managed to get SP4 update 1 (Chinese Simplified) installed (I don't read Chinese......), so hopefully now it will convert over nicely.....

MBH said...

Anonymous,

I thought Windows would throw an error if it wouldn't allow copying the file over, but it didn't. Stupid Windows...

You can always use a Linux liveCD to inject things.

vpaul said...

I guess you should mention that case makes sense. I had SCSIPORT.SYS in the converted system but scsiport.sys in the MS Update. Knoppix is case-sensitive and doesn't replace it. There is scsiport.sys driver availible from VmWare. http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006956. It is also a part of vmware tools.

sysprep tools aren't needed as configuration preferences shouldn't be changed.

MBH said...

vpaul,
Thank you for the addition. Even if Knoppix is case-sensitive (like any *nix system), you can rename the file.

Sorry that I didn't mention the case-sensitivity part ^_^'

Anonymous said...

I am trying to convert a W2K system to a VM.

Do you install the VMware Standalone Converter on the W2K system? or on another system, say a WinXP or Win7 system?

From the steps above, I am gathering that the VMware converter should be installed on the system where you want the VM to be created...

Extract the sysprep tools on the W2K system...

Next, apply the update rollup for W2K SP4 on the W2K system...

Then, run the Converter on the WinXP/Win7 system, deploy the agent to the W2K system

then using Converter connect from the WinXP/Win7 system to the agent running on the W2K system and convert to a VM image file to be created on the WinXP/Win7 system.

Just trying to clarify the steps in the procedure and where you install, run the tools.

t.fahey

MBH said...

Anonymous,

You install the converter either on the vCenter server (4.x) or on a desktop machine (XP/Win7), then deploy the sysprep tools on the same machine where vCenter Converter is installed, not on the machine you want to convert.

Also, you need the older version of the standalone converter to make sure it supports Win2k.

Anonymous said...

you the best thing that happnd to me this year..!! thats dude

Anonymous said...

MBH,

You might want to update the sysprep path for win2008/ Win7 etc though
C:\users\all users is inaccessible as it is a root link
The actual location is
C:\ProgramData\VMware\VMware vCenter Converter Standalone\sysprep\2k

Otherwise, brilliant post -saved me hours of frustration.
Thank you
Ben

MBH said...

Ben,

Thank you for the tip Ben! I've edited the post to include it.

Anonymous said...

The only thing bad thing I can say about this post is that Version is spelled Versoin in 1. above. :)

Thank you very much for this helpful post.

Just a thought, wouldn't it be easier to just upgrade W2K to 2003 when possible? I realize some folks might have legacy applications but if not...

MBH said...

Anonymous,

Thank for spotting the typo!

It's not always possible to upgrade a system in production, especially one that is fragile and doesn't have a full disk clone, or the hardware is too old and a disk clone would be useless.

For my clients, I convert the systems into VMs, then they either clone it & upgrade the clone (for testing), or build a whole new VM and install the software there.

I highly discourage them from upgrades & always prefer a fresh VM because all the old junk of drivers and registry keys will be gone.

hdo said...

Hello
I would like some extra info please:
1. Should I run sysprep on my W2K server before copying the sysprep files to the converter machine ?
I downloaded and copy the sysprep for W2k (from MS), but vmware converter still request them in the programdata folder.
2. I am using esx5 on my host server. the converter I found there does not take in charge W2K. I had to download version 4.0.1 of converter and run it from another pc. Can I send the data directly from converter 4 to esx5 infrastructure ?
thanks for your help
Hdo

MBH said...

hdo,

1) You should place the sysprep files on the program data on the machine that has the converter installed on it, not on the Windows 2000 machine.

2) Converter v4 will be able to communicate with vSphere 5 hosts, but the VM hardware will be the older version.

After you finish the conversion, do not power on the VM. Right click it in vCenter and upgrade the VM hardware, then you can power it on & install the latest VMware tools.

Anonymous said...

Thank you!
You made my day.

Anonymous said...

What VMWare Player should be used when converting Windows 2000 with Converter 4.0.1 ?

MBH said...

Anonymous,

Converter 4.0.1 is compatible with ESX[i] 4.x, so any Player that can read virtual machines from that version should work, including the latest Player version.

The latest Player/Workstation should still be able to run Windows 2000, but generally ask you to have SP4 & not a lower service pack.

Anonymous said...

Thanks!
Also curious how do people make backups of their VM? I guess the snapshot feature doesnt come with any of the free products.

MBH said...

Anonymous,
NEVER use snapshots for backups!!! Snapshots should be used to take a snapshot before applying a patch or testing a new feature, but never for backup, and for performance's sake, never leave a snapshot for more than 3 days.

Search online on how snapshots in VMware behave to understand the performance hits.

As for backups, if you have Enterprise license or higher, you get VMware Data Recovery (VDR) appliance which takes backups for free. It may be bundled with the Standard edition, too, so check with your VMware vendor or buy it from VMware directly.

Anonymous said...

Thx - great guide. Just used it without any problems:-) Only bad thing is that I now still have a very old server in my production environment ...

Unknown said...

Hi, thank you for your post, it did help me out "disk read error" issue.. My W2k vmware instance can run now on ESXi server :) Thanks again

ZiX said...

Thank you so much for this how-to and the level of detail you have provided, this helped us save a client's aging physical Win2K systems and buy them enough time to plan for a migration. Thanks again!

-ZiX

MBH said...

You are all very welcome and I'm glad it was helpful :D

Daryl said...

Hi MBH,

We recently got our hands on a really old production server on windows 2000 server and decided that we had better convert and host it on a VM datacentre before the hardware fails on us.

In this aspect is there any additional steps required or we should watch out for besides following the detailed steps in your blog? We were looking at just creating the VM image file which we would then pass over to the datacentre to load up the VM image for us. Is there any questions we should clarify from the hosting datacentre in terms of VM version/compatibility etc?

Sorry if we sound really noob as our experience with VMware is rather minimal. Thanks! =)

MBH said...

Hello Daryl,

I apologize for the late reply. According to this link http://www.vmware.com/virtualization/advantages/infrastructure/guest-os.html , Windows 2000 is still supported on vSphere 5, but the converter won't support it, so make sure you grab the right version of the converter.

To be honest, if this is a critical system yet fragile, then I suggest you power it off & clone the disks using any cloning tool.
I personally would load Linux from a live CD like Knoppix, then use the 'dd' command to clone the disk to another disk or to an image file.

This way, if the converter breaks the machine, you can at least restore the OS & data to the original state.

Good luck!

Daryl said...

Heya MBH!

Thanks for the reply!

Sorry that it took so long for me to revisit this as we have been caught up on our office relocation and the new office and servers setup.

Will definitely use your tip regarding the disk clone, thanks for the heads-up =)

For the convertor I have downloaded version 4.01 as per your blog, would this be okay to use and I'm guessing that the image produced would be compatible with vSphere v4 onwards till the latest 5.1?

I will finally be getting some lag time this week and will undertake the conversion then, so expect more of my silly questions if I face any brickwalls.

Thanks once again for your help and you have yourself a great weekend buddy =)

MBH said...

I'm not quite sure whether vsphere 5.1 will run v4 VMs or not, but even if it didn't, you could still reconvert the v4 image again using a newer converter.

So, phys -> v4 VM -> v5 VM

CoffeePHD said...

Great Howto. Thanks a lot.

Anonymous said...

Hi, for people out there needing the MS Sysprep for windows 2000, I just found the link http://download.microsoft.com/download/win2000platform/update/5.0.2195.2104/nt5/en-us/q257813_w2k_spl_x86_en.exe

Anonymous said...

does anyone know what is
"Unable to create a snapshot of the source volume. Error code: 50."
?
i get this error as soon as i start the conversion.
note,i am using "Unable to create a snapshot of the source volume. Error code: 50."
and i have installed .net on the pc.

MBH said...

Anonymous,
That most likely means Windows filesystem quiesce service failed to snapshot the filesystem.

You have two options: Use the old VMware cold clone CD (requires booting from the CD -- downtime) or use a cloning tool that the new converter can convert from it to a vmware virtual machine.