Skip to main content

Use VHD to a new VMWare Workstation

How to migrate a VHD to VMware Workstation


Introduction

This posting walks you through the process of migrating a pre-configured Microsoft Virtual Hard Disk (VHD) system to VMware, using nothing more complex than a text editor.  This posting integrates relevant postings on this topic from other authors.  Links to all references uses in researching and developing this posting are provided in the References section, below.  This posting was developed on VMware Workstation 7.1.3 build-324285, but applies to other VMware products, including ESX and Player.

In this posting, you will migrate the Microsoft Windows Server 2003 R2 Enterprise Edition VHD to VMware Workstation 7.1.3.

Step 1: Prepare VHD

  1. Download or locate the Source VHD. For this posting, the source VHD filename is Win2k3R2EE.vhd.
  2. Create a new folder in your VMware VM directory.  For this posting, a new folder win2k301 was created.
  3. Copy the source VHD to your VMware directory
    While not absolutely necessary, it facilitates file management to keep the VHD source file co-located in the same folder as the target VMware VM folder.
Step 2: Create New VM

  1. Launch VMware Workstation.
  2. From the File menu, point to New and then point to Virtual Machine..
  3. Click Virtual Machine.  The first page of the New Virtual Machine Wizard appears.
  4. Select the Custom (advanced) option
  5. Click Next.
  6. On the Choose the Virtual machine Hardware Compatibility page, select the appropriate virtual machine hardware compatibility from the Hardware dropdown, and then click Next.
  7. On the Guest Operating System Installation page, select the I will install the operating system later option, and then click Next.
  8. On the Select a Guest Operating System page, from the Guest operating system group, select Microsoft Windows, and then click Next.
  9. On the Processor Configuration page, leave all settings default, and then click Next.
  10. On the memory for the Virtual Machine page, change the memory to 1 GB (1024 MD), and then click Next.
  11. On the Network Type page, choose the network configuration desired.  For this posting, the Use bridged networking option was selected
  12. Click Next.
  13. On the Select I/O Controller Types page, leave the default (LSI Logic), and then click Next.  The next page is the most important in the VM creation process.
  14. On the Select a Disk page, select Use an existing virtual disk.
  15. Click Next.  The Select an Existing Disk page appears
  16. On the Select an Existing Disk page, click Browse, and then navigate to the location of the VHD
  17. Select the VHD file, and then click Open.  The navigation dialog closes, and you are returned to the Select an Existing Disk page
  18. Back on the Select an Existing Disk page, verify that the path and file name are correct, and then click Next.
  19. On the Ready to Create Virtual Machine page, click Finish.  The VM is created and a new tab appears in VMware
  20. Verify that the VM folder now has VMSD, VMX and VMXF files
Step 3: Edit VMX File

  1. Exit VMware Workstation.  If you are using ESX, remove the new VM (but don't delete the files).
  2. Navigate to the VM folder created in Step 1.  This folder should contain the VHD file along with a VMSD, VMX and VMXF files
  3. Right-click the VMX file, in this posting named win2k301.vmx, point to Open With, and then choose Notepad.  The VMware VM settings file opens in NotePad.
  4. Edit the scsi0.present setting from TRUE to FALSE.
  5. Edit the scsi0:0.present setting from TRUE to FALSE.
  6. Add the following settings:
    ide1:1.present = "TRUE" ide1:1.deviceType = "disk" ide1:1.fileName = "Win2k3R2EE.vhd"
  7. Save and close the VMX file.
Step 4: Launch the VM

  1. Launch VMware Workstation.  If you are using ESX, add the VM back.
  2. Start the VM.
  3. If you repeatedly experience this blue screen,
    you may not have correctly edited the VMX settings file.  Review this file and try again.
  4. You'll see the usual Windows settings screen appear
    and then various Windows Setup dialogs will also appear; and the rest is normal Windows startup
  5. If, after logging into the Windows VM, you find the cursor missing or stuck in the bottom right corner, see Troubleshooting I below.
  6. If after trying to shutdown Windows VM, you find that it appears to hang, see Troubleshooting II below.
Summary

This posting has presented one method for migrating Microsoft VHD systems to VMware Workstation without the need for third party conversion tools.  The process merely involves minor changes to the VMware settings file for the VM.

Troubleshooting I: Mouse cursor does not appear within the virtual machine window

 

This can occur if the original VHD system had Microsoft Virtual Machine Additions installed.  To verify this, perform the following tests:

  1. Right-click anywhere in the virtual machine window: does a pop-up appear repeatedly in the bottom right corner no matter where you right-click?
  2. Using your keyboard navigation skills, check the installed software: is Virtual Machine Additions listed?

If either is the case, try the following:

  1. Re-open the VHD in Virtual PC or Hyper-V, remove the Virtual Machine Additions, and then repeat steps 1-4 above.
  2. Re-install or update the VMware tools, but leave out the mouse driver, and then reboot.
  3. Launch Regedit, navigate to
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\... ...Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}
    look for the UpperFilters setting, and remove msvmmouf and any spaces from its value, leaving the mouclass value still there

Troubleshooting II: Shutdown Locks

 

This occurs after attempting a normal shutdown of the server.  The screen changes, the message appears indicating that server is shutting down, the message disappears, and then only a normal desktop is displayed that is unresponsive to keyboard and mouse input.  The only way to force the server to shutdown us using VMware shutdown option.  There is significant discussion and troubleshooting steps on this issue to be found in the VMware knowledgebase.  However, the workaround is simple:

  1. On the VM server (guest OS), from the Start menu, point to Control Panel, and then point to VMware Tools.
  2. Click this item.  The VMware Tools dialog appears
  3. Select the Scripts tab:
    1. On the Scripts tab, from the Script Event dropdown, select Shut Down Guest Operating System.
    2. Enable Use Script.
    3. Select Custom script
    4. Click the Edit button.
    5. In that file, add the following:  shutdown /s /t 10 /d P:0:0 /c "VM guest shutdown".
  4. Save and close the file
  5. Click OK.
  6. Test by performing a normal shutdown of the server.

Popular posts from this blog

Importing Exploit-DB Exploits into Metasploit in Kali Linux for Offline Access

You're going to need three terminals open for this. Terminal 1 for starting metasploit Terminal 2 for importing the exploit to local Metasploit repository Terminal 3 for searchsploit which we will use to search for the exploit instead of opening your browser and looking in exploitdb. Let's be done with it! 1. First, open the first terminal to run metasploit with the following commands: > service postgresql start > msfconsole  2. Go to Terminal 3 and run the following command to update its database: > searchsploit -u 3. Open Terminal 2, then go to the metasploit modules directory by: > cd .msf4/modules 4. Then create a directory inside the msf4 modules folder: > mkdir exploits 5. Now, back to the Terminal 3. We will to search for an exploit we want to import. Let's first try to look for the explore ms15-100 by typing: > searchsploit msf15-100 After pressing Enter, you should be able to see the search result. It will be a t...

Using Termux in Android to Download Youtube Videos

In termux: apt update && apt upgrade Give termux access to your phone's filesystem via ~/storage/shared termux-setup-storage Install python: packages install python Install youtube-dl pip install youtube-dl Create a folder to store your downloaded videos: mkdir /data/data/com.termux/files/home/storage/shared/Youtube Create youtube-dl config (volume-down key emulates Ctrl in termux): nano ~/.config/youtube-dl/config The contents of my config is as follows: --no-mtime -o /data/data/com.termux/files/home/storage/shared/Youtube/%(title)s.%(ext)s -f "best[height<=480]" (the height<=480 tells youtube-dl to download the best quality version up to 480px in width. You can change to 240, 360, 720 or 1080, etc to suit your needs / bandwidth restrictions. Save with "Volume-down" + O, then close nano with "Vol-down" + X Create "termux-url-opener" in ~/bin to enable one-click download via the "Share" menu i...

Free Photoshop Alternatives

  These tools have all the basic image manipulation features for you everyday photo editing needs and are   neither heavy on your Windows system, nor on your pocket   . So, let’s just leave Photoshop for professional designers and take a look at these   free image manipulation tools for Windows   and see which one will suit you the best. Adobe Photoshop Express Adobe Photoshop Express for Windows enables photo magic at your fingertips. It’s a small pack of  essential everyday photo-editing tools from Adobe  to help you create better-looking pictures. It has many exciting features to  enhance your photos and do easy touch-ups  through functions like crop, rotate, flip, brightness, etc. PC Image Editor PC Image Editor is a  solid but simple image-editing application . It’s built for beginners and professionals who like to customize or enhance photos with minimum effort. The super intuitive interface brings many editing tools and options su...