Difference between revisions of "VMware Converter"

From vwiki
Jump to navigation Jump to search
(Added "Other Options")
(→‎Troubleshooting: Added Unexpected element tag)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Overview==
VMware Converter clones an existing physical (or virtual) machine into a new virtual machine.
VMware Converter clones an existing physical (or virtual) machine into a new virtual machine.
# A new VM is created
# A new VM is created
Line 67: Line 68:
#* Run now! Its bound to fail as a scheduled task! Click '''Next'''
#* Run now! Its bound to fail as a scheduled task! Click '''Next'''
# '''Ready to Complete'''
# '''Ready to Complete'''
#* Leave ''Power on the new virtual amchine after creation'' checkbox cleared, then click '''Finish'''
#* Leave ''Power on the new virtual machine after creation'' checkbox cleared, then click '''Finish'''


== Other Options ==
== Troubleshooting ==
=== Unable to determine guest operating system ===
Try re-registering the source VM in its vCentre
 
=== Unable to obtain hardware information for the selected machine ===
Unfortunately this is generic error and can be triggered by a rich variety of reasons.  You'll probably need to ''Export diagnostic details...'' and then trawl through the logs to get a better picture, though there's no guarantee that this will be in any way illuminating. 
 
Some suggestions from various sources...
* Try migrating the VM to another ESX
* Try re-registering the VM in the vCentre inventory
* Network connectivity problems between the server and client (ie the vCentre that Converter is running from, and the client machine that Converter is connecting to)
* Try changing the VM's OS to ''Other'' (32bit or 64bit), migrate and then change the OS back to what it really is.
* In Vista (and maybe Win7) run Converter as an Administrator
 
=== Converted VM boots to PSOD - STOP 7B ===
This problem is caused by the converted OS being unable to find drivers for the boot device.  The conversion appears to complete successfully, but on booting the new VM it fails with a '''STOP: 0x0000007B''' blue screen of death (BSOD). Solutions for Windows 7 and Windows 2008 machines are below, see [http://kb.vmware.com/kb/1005208 VMware KB 1005208 - Injecting SCSI controller device drivers into Windows when it fails to boot after converting it with VMware Converter] for details on how to fix on other operating systems
 
==== Registry Hack ====
Prior to running the P2V conversion, on the physical nmachine...
# Ensure that the LSI_SAS driver exists
#* <code> C:\Windows\System32\Drivers\lsi_sas.sys </code>
# Locate the following registry key
#* <code> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LSI_SAS </code>
# If it exists, with contents, change the following
#* <code> Start </code> to <code> 0 </code> (would have been <code>3</code> originally)
# If it doesn't exist with contents, import the key from a working Win7 or Win2008 VM
# Reboot, and then reattempt
 
==== VMX Hack ====
There are times when the registry hack (above) fails to prevent the STOP 7B BSOD.  In the situations I've seen, this is because the boot disk in the VM is attached via IDE rather than SCSI.  In which case you need to hack the VMX config file for the VM in order to represent the boot disk via SCSI.
 
# Shutdown the VM, and identify where the VMX config file is located
#* To find the VMX:
#*# Right-click over the VM and select '''Edit Settings...'''
#*# Go to the '''Options''' tab
#*# Inspect the '''Virtual machine Configuration File''' field
# Remove the VM from the inventory (right-click, '''Remove from Inventory''')
# Edit the VMX file
#* Either download the VMX using Datastore Browser, and in order to edit locally. Rename the original file to <code><VM Name>.vmx.orig</code>
#* Or SSH to the ESX and edit directly (create a copy of the config file 1st!)
# Look for all config lines starting with <code>ide</code> (they needn't be all together in the same place)
# Update as per the examples below, and save the VMX
# Browse the datastore to the edited VMX, and right-click to '''Add to Inventory''' to re-add the VM into vCentre
#* If the import fails, restore the original VMX file and try again, you may have made a mistake in the config (you may have missed some lines in the jumbled up config file)
# Double check the disk config of the VM, then power on
#* If the power-on fails, remove VM from the inventory again, restore the original VMX file and try again, you may have made a mistake in the VMX config file
 
Original contents of VMX file...
ide0:0.present = "TRUE"
ide0:0.fileName = "VM-Name.vmdk"
ide0:1.present = "TRUE"
ide0:1.clientDevice = "TRUE"
ide0:1.deviceType = "cdrom-raw"
ide0:1.startConnected = "FALSE"
 
New contents of VMX file...
ide0:0.present = "TRUE"
ide0:0.clientDevice = "TRUE"
ide0:0.deviceType = "cdrom-raw"
ide0:0.startConnected = "FALSE"
scsi0.present = "true"
scsi0.sharedBus = "none"
scsi0.virtualDev = "lsisas1068"
scsi0:0.present = "true"
scsi0:0.fileName = "VM-Name.vmdk"
scsi0:0.deviceType = "scsi-hardDisk"
 
==== Unexpected element tag ====
* A general system error occurred: Unexpected element tag “ConvertManager” seen while parsing serialized DataObject of type converter.AgentInstanceContent at line7, column 63 while parsing return value of type converter.ServiceInstanceContent, version converter.version.version2 at line 7, columen 0 while parsing SOAP body at line 6, column 0 while parsing SOAP envelope at line 2, column 0 while parsing HTTP response for method retrieveConent on object of type converter.ServiceInstance at line 1, column 0
 
Caused by the VMware Converter utility from a previous attempt still existing on the server to be P2V'ed, uninstall the utility
 
== Alternatives ==
If VMware Converter is unable to P2V your machine (for example as of writing you can't P2V a Win2k8 R2 machine as the VSS interface has changed and VMware haven't released a new version yet), there are other (free) options
If VMware Converter is unable to P2V your machine (for example as of writing you can't P2V a Win2k8 R2 machine as the VSS interface has changed and VMware haven't released a new version yet), there are other (free) options
# Use [http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx SysInternals Disk2vhd] to hot-clone a machines disks to Microsoft format VHD files
# Use [http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx SysInternals Disk2vhd] to hot-clone a machines disk(s) to Microsoft format VHD files
# Use [http://www.starwindsoftware.com/converter StarWind V2V Converter] to convert VHD files to VMDK's
# Use [http://www.starwindsoftware.com/converter StarWind V2V Converter] to convert VHD file(s) to VMDK format (use sparse/thin (VI4 only) and iSCSI options)
# Create a new VM, then upload the VMDK files
# Upload the VMDK file(s) to an appropriate datastore (in a folder with the VM name)
# Edit the VMX file to cater for the new VMDK's
# Create a new VM, using the active/boot disk of the VMDK's just uploaded (if multiple disks, add others separately after VM has been created)
# On first boot it may be nessessary to edit the registry to avoid a BSOD (change <REG_DWORD Start</code> to </code> in <code>HKLM\p2v\ControlSet001\services\LSI_SAS</code> (you need to boot usind a recovery CD to be able to access the registry.
# Edit the VMX file to cater for the new VMDK's ??
# On first boot it may be necessary to edit the registry to avoid a BSOD (change <code>REG_DWORD Start</code> to <code>0</code> in <code>HKLM\p2v\ControlSet001\services\LSI_SAS</code> (you need to boot using a recovery CD to be able to access the registry.


For further info see http://sanbarrow.com/p2v2008r2.html
For further info see http://sanbarrow.com/p2v2008r2.html


[[Category: VMware]]
[[Category: VMware]]

Latest revision as of 16:31, 22 December 2016

Overview

VMware Converter clones an existing physical (or virtual) machine into a new virtual machine.

  1. A new VM is created
  2. The source machine's disks are snapshotted/shadow copied, so that they can be copied whilst the OS is still running
  3. The source machine's disks are copied to the new VM's blank disks
  4. The new VM is booted up, the OS needs to install new drivers for the new (virtual) hardware.

Pre-P2V Prep

  1. Delete unused, unneeded files
    • Temp files and folder
    • Old profiles
    • Internet caches
    • Recycle Bin
  2. De-install any unneeded applications or services
  3. Perform a defrag (optional - may speed up P2V)
  4. Reboot server

Performing a P2V

Standalone

  1. Install the application on the machine to be virtualised
    • Select Typical
    • May require a restart
  2. Start-up VMware Converter application
  3. Click on the large Convert Machine icon with the large green arrow in the bottom half of the screen, to start the Wizard
  4. 1 - Specify Source
    • Leave Select source type: as Powered-on machine
    • Select This local machine, and click Next
  5. 2 - Specify Destination
    • Leave Select destination type: as VMware Infrastructure virtual machine
    • Update VMware Infrastructure server details with the server (ESX or VC) and appropriate login details, and click Next
    • Select an appropriate destination host (if you're logged into a VC)
    • Update Virtual machine name as required
    • Select an appropriate Datastore, and click Next
  6. 3 - View/Edit Options
    • Data to copy
      • Un-tick any disks you don’t want (like tiny hardware utils partitions), click the drop down if you want to change the size of a disk during migration
    • Devices
      • Tweak CPU and memory settings as required
      • If your source machine uses IDE you must change the Disk Controller: to SCSI (LSI logic is standard for Windows machines)
    • Services
      • Update as required
    • Advanced Options
      • Review and change as required
      • There may be a warning that sysprep can't be found, normally this isn't a problem (assuming you want a clone of your current machine and don't want a new SID created)
    • Click 'Next
  7. 4 - Ready to Complete
    • Review and click on Finish
  8. Wait until the process has completed (the initial ETA is often inaccurate, after 5mins or so its fairly reliable), then shutdown the physical/source machine
  9. Using the VI Client, connect to the Virtual Center Server, right click on the new virtual machine and choose edit setting
    • For all Serial Ports and any unwanted Network Adapters, select the item and click on Remove, finally click on OK
    • Right click on the virtual servers and choose Power On.
    • Wait for a little while as the server may reboot itself once or twice, then right click on the virtual server and choose Open Console. Logon to the server and setup the network card settings as appropriate.

Plug-in

Procedure assumes you're P2V'ing

  1. Within vCentre, right-click over the destination ESX and click Import Machine...
  2. 1: Source
    • Leave What do you want to import? as Physical Computer, and click Next
    • In Name or IP Address: enter the source physical machine's IP address (its more reliable than using a name) and in Authentication enter the details of a local admin account for the source machine. Click Next
    • Edit new disk sizes as appropriate, its recommended to check the Create a seperate disk for each volume. option. When finished click Next
  3. 2: Destination
    • Enter the new virtual machine's name, and destination location, then click Next
    • Select an appropriate datastore (which enough space!), then click Next
    • Select appropriate network(s), then click Next
  4. 3: Customization
    • Its recommended to select the Remove all System Restore checkpoints option (if available), VMware Tools can be installed later, then click Next
  5. 4: Schedule Task
    • Run now! Its bound to fail as a scheduled task! Click Next
  6. Ready to Complete
    • Leave Power on the new virtual machine after creation checkbox cleared, then click Finish

Troubleshooting

Unable to determine guest operating system

Try re-registering the source VM in its vCentre

Unable to obtain hardware information for the selected machine

Unfortunately this is generic error and can be triggered by a rich variety of reasons. You'll probably need to Export diagnostic details... and then trawl through the logs to get a better picture, though there's no guarantee that this will be in any way illuminating.

Some suggestions from various sources...

  • Try migrating the VM to another ESX
  • Try re-registering the VM in the vCentre inventory
  • Network connectivity problems between the server and client (ie the vCentre that Converter is running from, and the client machine that Converter is connecting to)
  • Try changing the VM's OS to Other (32bit or 64bit), migrate and then change the OS back to what it really is.
  • In Vista (and maybe Win7) run Converter as an Administrator

Converted VM boots to PSOD - STOP 7B

This problem is caused by the converted OS being unable to find drivers for the boot device. The conversion appears to complete successfully, but on booting the new VM it fails with a STOP: 0x0000007B blue screen of death (BSOD). Solutions for Windows 7 and Windows 2008 machines are below, see VMware KB 1005208 - Injecting SCSI controller device drivers into Windows when it fails to boot after converting it with VMware Converter for details on how to fix on other operating systems

Registry Hack

Prior to running the P2V conversion, on the physical nmachine...

  1. Ensure that the LSI_SAS driver exists
    • C:\Windows\System32\Drivers\lsi_sas.sys
  2. Locate the following registry key
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LSI_SAS
  3. If it exists, with contents, change the following
    • Start to 0 (would have been 3 originally)
  4. If it doesn't exist with contents, import the key from a working Win7 or Win2008 VM
  5. Reboot, and then reattempt

VMX Hack

There are times when the registry hack (above) fails to prevent the STOP 7B BSOD. In the situations I've seen, this is because the boot disk in the VM is attached via IDE rather than SCSI. In which case you need to hack the VMX config file for the VM in order to represent the boot disk via SCSI.

  1. Shutdown the VM, and identify where the VMX config file is located
    • To find the VMX:
      1. Right-click over the VM and select Edit Settings...
      2. Go to the Options tab
      3. Inspect the Virtual machine Configuration File field
  2. Remove the VM from the inventory (right-click, Remove from Inventory)
  3. Edit the VMX file
    • Either download the VMX using Datastore Browser, and in order to edit locally. Rename the original file to <VM Name>.vmx.orig
    • Or SSH to the ESX and edit directly (create a copy of the config file 1st!)
  4. Look for all config lines starting with ide (they needn't be all together in the same place)
  5. Update as per the examples below, and save the VMX
  6. Browse the datastore to the edited VMX, and right-click to Add to Inventory to re-add the VM into vCentre
    • If the import fails, restore the original VMX file and try again, you may have made a mistake in the config (you may have missed some lines in the jumbled up config file)
  7. Double check the disk config of the VM, then power on
    • If the power-on fails, remove VM from the inventory again, restore the original VMX file and try again, you may have made a mistake in the VMX config file

Original contents of VMX file...

ide0:0.present = "TRUE"
ide0:0.fileName = "VM-Name.vmdk"
ide0:1.present = "TRUE"
ide0:1.clientDevice = "TRUE"
ide0:1.deviceType = "cdrom-raw"
ide0:1.startConnected = "FALSE"

New contents of VMX file...

ide0:0.present = "TRUE"
ide0:0.clientDevice = "TRUE"
ide0:0.deviceType = "cdrom-raw"
ide0:0.startConnected = "FALSE"
scsi0.present = "true"
scsi0.sharedBus = "none"
scsi0.virtualDev = "lsisas1068"
scsi0:0.present = "true"
scsi0:0.fileName = "VM-Name.vmdk"
scsi0:0.deviceType = "scsi-hardDisk"

Unexpected element tag

  • A general system error occurred: Unexpected element tag “ConvertManager” seen while parsing serialized DataObject of type converter.AgentInstanceContent at line7, column 63 while parsing return value of type converter.ServiceInstanceContent, version converter.version.version2 at line 7, columen 0 while parsing SOAP body at line 6, column 0 while parsing SOAP envelope at line 2, column 0 while parsing HTTP response for method retrieveConent on object of type converter.ServiceInstance at line 1, column 0

Caused by the VMware Converter utility from a previous attempt still existing on the server to be P2V'ed, uninstall the utility

Alternatives

If VMware Converter is unable to P2V your machine (for example as of writing you can't P2V a Win2k8 R2 machine as the VSS interface has changed and VMware haven't released a new version yet), there are other (free) options

  1. Use SysInternals Disk2vhd to hot-clone a machines disk(s) to Microsoft format VHD files
  2. Use StarWind V2V Converter to convert VHD file(s) to VMDK format (use sparse/thin (VI4 only) and iSCSI options)
  3. Upload the VMDK file(s) to an appropriate datastore (in a folder with the VM name)
  4. Create a new VM, using the active/boot disk of the VMDK's just uploaded (if multiple disks, add others separately after VM has been created)
  5. Edit the VMX file to cater for the new VMDK's ??
  6. On first boot it may be necessary to edit the registry to avoid a BSOD (change REG_DWORD Start to 0 in HKLM\p2v\ControlSet001\services\LSI_SAS (you need to boot using a recovery CD to be able to access the registry.

For further info see http://sanbarrow.com/p2v2008r2.html