How To Create A Virtual Machine from a Physical Disk

We recently had a problem in converting a physical machine to a virtual machine. We have tools which work on the VMWare server products (ala Platespin) but we could not convert the ESXServer image back to a VMWare Workstation image. Despite some beta tools all we got was blue screened.

Hunting for a solution came across a detailed set of steps which use a Ghost image of the physical machine to create a virtual machine.

The steps are reporduced below:

These instructions assume that a Ghosted image already exists on a bootable CD or DVD. You will also need an existing virtual machine with the same operating system as the image you wish to convert.

For example, if you have an image of Windows 2000 Advanced Server, you will need an existing installation of Windows 2000 Advanced Server on VMWare. In addition, this assumes that the image you are converting has been created with an IDE drive.

Please read and execute these instructions carefully, as each step within depends on successful completion of the previous step!

UPDATE: Please note that you can execute a Ghost 10 image directly under VMWare Workstation 5.5

1. Obtain a bootable CD or DVD that contains the image you wish to convert.

2. Create a new MS-DOS virtual machine of the correct size and boot it from the Ghosted CD or DVD.

2.1. Start VMWare

2.2. Go to the File menu, choose New, then New Virtual Machine and click Next.

2.3. Click Custom, then Next.

2.4. Under Guest Operating System, choose MS-DOS. This is important because VMWare will look at this virtual machine as an IDE drive. Again, attempts to convert a SCSI image did not work in this scenario. I am not sure why.

2.5. Under Virtual Machine Name, choose a name for the virtual machine you will ultimately be using after conversion.

2.6. Next, choose how much memory you wish to allocate to the virtual machine you will ultimately be using after conversion. Note that these numbers can be changed by the individual user based on how much memory they will use keeping in mind how much physical RAM they have.

2.7. Click Next.

2.8. Under Network connection, choose Use bridged networking and click Next.

2.9. Click Create a new virtual disk and click Next.

2.10. Under Specify Disk Capacity, you need to specify, in gigabytes, how large to make the new disk. Note that you need to make the disk size at least as large as the image you are about to restore, and also need at least as much free space as you specify to allocate.

2.11. Click Allocate all disk space now and click Next. A warning message will appear asking if you're sure that's what you want to do. Be sure you have enough free space to create that size of a file.

2.12. Click OK to clear the warning message and allocate the disk space.

3. Restore the Ghosted image to your new virtual machine.

3.1. With the virtual machine powered off, place the DVD or CD with the image you want to restore into the DVD drive.

3.2. Boot the virtual machine.

3.3. Follow the instructions onscreen to boot from the CD/DVD ROM drive.

3.4. Follow the instructions to restore the image from CD/DVD onto the virtual hard drive.

3.5. When imaging is complete, shut down the virtual machine and remove the CD/DVD from the drive.

4. Configure another virtual machine with the same operating system as the one you just restored from the Ghosted image (assumes you already have another virtual machine with the same OS installed).

4.1. In VMWare, select the virtual machine that has the same operating system as the one you just restored from Ghost.

4.2. Go to the Edit menu and choose Virtual Machine Settings.

4.3. Click the Add button and click Next.

4.4. Choose Hard Disk and click Next.

4.5. Click Use an existing virtual disk and click Next.

4.6. Use the Browse button to navigate to the VMDK file for the image you created. For example My Data\My Virtual Machines\Test\Test.vmdk.

4.7. Click OK. The new virtual hard disk will be added.

5. Boot another virtual machine with the same operating system as the one you just restored from the Ghosted image. This will allow you to add the appropriate HAL.DLL file to the virtual machine, thus enabling it to boot in VMWare.

5.1. Boot the virtual machine to which you just added the new virtual hard disk.

5.2. Log into the virtual machine as an administrator.

5.3. On the Windows desktop, right-click My Computer and choose Manage.

5.4. Click Disk Management. You should see a disk in the right window pane for the virtual hard drive you just added.

5.5. Right-click the new hard drive and choose Change drive letter and paths.

5.6. Assign a driver letter to it (e.g., Z: ).

5.7. In the virtual machine you are currently running, navigate to the system drive\WINNT\system32 folder.

5.8. Search for the HAL.DLL file and copy it to the clipboard.

5.9. Navigate to Z:\WINNT\system32.

5.10. Rename the existing HAL.DLL there to HAL.dll.old.

5.11. Paste the HAL.DLL from the currently running virtual machine in the Z:\WINNT\system32 folder.

5.12. Go to the Start menu and choose shut down to turn off the virtual machine.

6. Boot the virtual machine to which you just created and copied the appropriate HAL.DLL file. At this point, the virtual machine you created from the Ghosted image should boot correctly with a minimum configuration (i.e., no sound, 640x480 resolution, etc.). From here, you will need to install the VMWare tools in the new operating system.

6.1. In VMWare, select your new virtual machine.

6.2. Go to the Edit menu and choose Virtual Machine Settings.

6.3. Click the Options tab.

6.4. Under Guest Operating System, change it to read the correct OS you restored from the ghosted image (e.g., Windows 2000Advanced Server). This is very important, as the next steps will not work properly if you choose the wrong OS.

6.5. Click OK.

6.6. Click Start this virtual machine.

6.7. Give the virtual machine time to boot and log in as an administrator.

6.8. If you see any plug and play messages at this point telling you to install new hardware, ignore them.

6.9. Once the machine is booted and the new hard ware massages are gone, go to the File menu in VMWare and choose Install VMWare Tools.

6.10. Follow the instructions to complete the installation of the VMWare Tools. This will tell the operating system which virtual hardware drivers to use so it can talk to the host operating system.

6.11. After the installation of the VMWare tools, you will be prompted to restart. It is a good idea to do so at this point.

6.12. Once restarted, you may do any additional configuration and testing of the new virtual machine.

Thanks to BlueAlliance for their hard work.

Author Mark Page

Mark is trying not to drink too much 'cool aid' at the moment. All the more for everyone else!

Add Comment

Name
Comment
 

Your comment has been received and will be shown once it passes moderation.