When attempting to deploy a VM from copied VMDK and VMX files in VMware environments, many administrators encounter the frustrating "Unknown VM (Invalid)" error. The VM appears in the inventory with this generic name and remains non-functional - settings can't be edited and the VM won't power on.
The primary culprit is often version incompatibility between the source and target environments. In my case, the files originated from VMware Player with a hardware version that wasn't compatible with our vCenter infrastructure. Other potential causes include:
- Missing or corrupted supporting files (NVRAM, VMSD, etc.)
- Improper file permissions after transfer
- Path references in the VMX file pointing to non-existent locations
Here's the working solution we implemented:
1. Modify Hardware Version
Edit the VMX file with a text editor to lower the hardware version:
virtualHW.version = "14" # Change this to match your target environment
2. Export as OVA
Use VMware Player or Workstation to export the VM as an OVA package:
# Example command line export using OVF Tool ovftool.exe "source.vmx" "output.ova"
3. Clean Import into vCenter
Import the OVA through the vCenter interface or CLI:
# PowerCLI import command example Import-VApp -Source "C:\path\to\output.ova" -VMHost $vmhost -Datastore $datastore
If the above method doesn't work, consider these alternatives:
Manual VM Registration
Create a new VM with matching specifications and attach the existing VMDK:
# Sample VM creation in PowerCLI New-VM -Name "FixedVM" -VMHost $vmhost -Datastore $datastore -DiskPath "[datastore] path/to/disk.vmdk"
To avoid this issue in the future:
- Always export/import using OVF/OVA formats when transferring between environments
- Verify hardware compatibility before migration
- Include all supporting files when copying VM directories
When attempting to deploy a VM from copied VMDK and VMX files in VMware, you might encounter an "Unknown VM (Invalid)" error. The VM appears in your inventory but remains non-functional, preventing you from editing settings or powering it on.
The most common causes for this issue are:
- Hardware version incompatibility (especially when files come from VMware Player)
- Corrupted or incomplete VM files
- Missing supporting files (NVRAM, VMSD, etc.)
- Improper file permissions
The working solution involves modifying the hardware version:
1. Open the VMX file in a text editor 2. Locate the line: virtualHW.version = "XX" 3. Change to an earlier version (e.g., "14" → "13") 4. Save the file 5. Export as OVA: vmware-vdiskmanager -r source.vmdk -t 0 target.vmdk ovftool source.vmx target.ova 6. Import the OVA into vCenter/ESXi
If hardware version adjustment doesn't work, try creating a new VM and attaching the existing VMDK:
# Create new VM with compatible hardware version New-VM -Name "FixedVM" -VMHost esxi01 -Datastore datastore1 -DiskMB 4096 -MemoryGB 4 -NumCpu 2 # Attach existing VMDK Get-VM "FixedVM" | New-HardDisk -DiskType RawVirtual -Controller "SCSI Controller 0" -Filename "[datastore1] path/to/existing.vmdk"
After successful deployment:
- Check VM logs for errors
- Verify network connectivity
- Test guest OS functionality
- Confirm all virtual hardware components work
To avoid similar issues in future:
- Always export VMs using ovftool when transferring between environments
- Document hardware versions used in your environment
- Maintain consistent VMware tools versions
- Consider using OVF templates for standardized deployments