Validating the .vmx settings of a virtual machine
search cancel

Validating the .vmx settings of a virtual machine

book

Article ID: 311171

calendar_today

Updated On:

Products

VMware VMware Desktop Hypervisor VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

This article assists you in determining if a virtual machine's configuration (.vmx ) file contains settings that are preventing it from powering on or causing error messages to appear during the power on process. To correct the problem these settings can be removed or a new configuration file built.


Symptoms:
  • Virtual machine does not power on.
  • Virtual machine does not boot.
  • Error messages are seen when powering on a virtual machine.


Resolution

To determine if there is a problem with your virtual machine's configuration (.vmx ) file:

Warning: If you are using Lab Manager, VMware recommends that you do not follow this procedure. Doing so may result in harm to your virtual machine. Instead, undeploy the virtual machine and redeploy it.
  1. Verify that you are logged in as a user with administrator rights or root privileges.

  2. Locate the .vmx file for your virtual machine:

    • For ESX Server host:

      1. With the Virtual Infrastructure Client (VI Client) connect to the ESX Server host that is managing the virtual machine or to VirtualCenter.
      2. Right-click the entry for the virtual machine.
      3. Click Edit Settings.
      4. Click the Options tab.
      5. If not selected, click General Options.
      6. Look at Virtual Machine Configuration File.

        Note: The location of the .vmx file displayed here takes the form [server:datastore] directory/vm.vmx . Interpret the full path to this file on a server as /vmfs/volumes/datastore/directory/vm.vmx .

  3. Navigate to the .vmx file and view its contents. Confirm the following:

    1. You are able to view the contents. If you cannot view the contents, confirm the permissions on the file. For more information about ESX Server host, see Investigating power on permissions for ESX virtual machines (1003739). For more information about other VMware products, see Investigating power on permissions for hosted virtual machines (1003847).

    2. The contents are readable and do not appear to be cut off or missing information. If the contents are not readable or are cut off, restore this file from a backup or proceed to step 4.

    3. The entries make sense. If you see an entry for a virtual device or setting that doesn't match what you expect, edit the settings for the virtual machine from the VMware products user interface. If what is observed in the user interface seems correct, remove the device and add it back again or change the setting to something else and change it back again. If you see an entry that doesn't make any sense at all, remove it.

      Note: Before saving changes to the .vmx file back it up.

  4. Create a new virtual machine that points to the same virtual disks:

    Note: You cannot perform this task with VMware Workstation Player or VMware Player or an ACE Instance.

    1. Back up your virtual machine by cloning it or copying all of the files in its directory somewhere else.
    2. Delete the existing .vmx file.
    3. Create a new virtual machine.
    4. Choose Custom for the type of virtual machine.
    5. When prompted by the wizard for the location of the virtual machine, pick the same location as the existing virtual machine.
    6. Choose all of the same settings as for the original virtual machine.
    7. Click Use an existing virtual disk when prompted for the disk. Browse to the location of the original virtual machine's .vmdk files.

      Note: If the original virtual machine had more than one virtual disk, you must edit the new virtual machine after it has been created to add these back in again.

    8. Power on the new virtual machine after it is created.
    9. If the problem no longer occurs, confirm that everything is now working as expected, and delete the copy of the virtual machine.


Additional Information

验证虚拟机的 .vmx 设置