Esxi Vm an Error Occurred

Invalid Land of a Virtual Machine on VMWare ESXi by and large triggers when we delete a virtual machine and the information remain in the VMWare vSphere/ESXi configuration for some reason.

Equally part of our Server Management Services we assist our clients with like errors of the virtual machines.

Today, let'due south observe out the causes and effective solutions suggested by our Support Team.

Invalid State of a Virtual Machine on VMWare ESXi

As we mentioned earlier, this mistake might occur due to information that remain in the VMWare vSphere/ESXi configuration. In improver, this can happen afterwards we manually remove VM files from the VMFS storage after running vMotion.

In these cases, we will not be able to delete a VM from vSphere Web Customer using the built-in tools.

Invalid State of a Virtual Machine on VMWare ESXi

Symptoms:

Nosotros may see 1 or more than of these errors when trying to start a virtual machine:

          Could not power VM, no swap file, failed to power on VM.        
          A general system fault occurred. The system returned on error. Advice with the virtual machine may have been interrupted.        

In this article, allow us see what invalid virtual machines are, how they occur, and some effective solutions our Support Techs suggests.

Causes of 'Invalid State of a Virtual Auto on VMWare ESXi'

In vCenter Server, an "orphaned" virtual auto is one that exists in the vCenter Server database merely no longer present in ESX host inventory.

An "invalid" virtual machine is a VM that is inaccessible considering the ESXi host is offline or inaccessible, the VM configuration file is locked or decadent or contains a bad choice, etc.

In the case of an orphaned virtual machine, we need to either re-annals or remove the VM from inventory.

To re-register a virtual auto, we navigate to the VM's location in the Datastore Browser and re-add the VM to inventory. To remove an orphaned VM from inventory, we right-click the VM and choose "Remove from inventory."

In the case of invalid virtual machines there are many potential causes and it requires additional troubleshooting.

Let us now focus on the well-nigh common causes our Support Techs have come beyond.

  • ESXi host not responding or asunder

We ensure that the ESXi host is accessible and available in the vCenter Server inventory. If the host is "Disconnected" or "Not responding," all VMs on that host will be unavailable to vCenter.

  • VM configuration file is locked

To verify this, nosotros navigate to the VM'due south directory in the Datastore Browser for the appropriate datastore. We should encounter the VM configuration file (.vmx file) listed. If the icon for this file is a bare page instead of the VM icon, it can be a cause.

To verify that this is the case, we run the vmfsfilelockinfo command from the ESXi host to check the VM configuration file for a lock.

After the remedy, nosotros demand to remove the VM from inventory and r-register or reload it.

  • VM configuration file is missing

If the VM configuration file is missing, the VM will be "invalid" in the vCenter inventory.

To verify that this has occurred, we navigate to the VM's directory in the Datastore Browser for the advisable datastore.

If there is no VM configuration file with the ".vmx" extension and other files are available (logs, disks, etc.), then the file may demand to be recreated.

After recreating the VM configuration file, the VM will demand to be removed from inventory and reregistered or reloaded.

  • VM configuration file contains invalid options or text errors

If the VM configuration file is present, and the ESXi host is available in vCenter Server's inventory, the VMX may take become corrupt or incorporate invalid options or text errors.

Almost ofttimes, this volition exist missing quotation marks, invalid end-of-line, or an pick that is non valid.

To make up one's mind the verbal cause of the invalid selection or text error nosotros follow the below steps:

  1. Reload the VM configuration.
  2. Check the host management agent log file by viewing /var/log/hostd.log
                  # tail -n50 /var/log/hostd.log            
  3. We should see messages that indicate the reload failure.
    For example:
                  info hostd[18267520] [[email protected] sub=vm opID=vim-cmd-61-609d user=root] File "/vmfs/volumes/5c182b95-ac4a587e-65f1-90b11c24698d/testVM/testVM.vmx" line 6: Syntax fault.  info hostd[18267520] [[electronic mail protected] sub=Vmsvc.vm:/vmfs/volumes/5c182b95-ac4a587e-65f1-90b11c24698d/testVM/testVM.vmx opID=vim-cmd-61-609d user=root] Failed to load virtual machine            
  4. If there is a "syntax fault" listed, there is a fault in the VM configuration file.
    Examine the file and ensure that there are no issues with quotation marks, corrupt entries, invalid options, etc.
  5. Subsequently correcting the file, reload the VM over again and determine if information technology returns to normal.

If it does not, nosotros repeat this process to identify whatsoever additional faults.

  • VMware Tools Installation or Update

When we endeavour to install or update VMware Tools, VM could besides get into an invalid state.

The only way to remove such a VM is to use the SSH console of the ESXi host.

  1. Enable SSH on the ESXi host with the problem VM (Actions -> Settings -> Security Profile -> Services -> SSH -> Edit -> Showtime)
  2. Connect to the ESXi host using SSH client (Putty, mputty, etc.)
  3. To become the ID of the problem virtual machine, nosotros run this command:
                  vim-cmd vmsvc/getallvms | grep invalid            
  4. A list of all VMs with the Invalid status registered on this host will be displayed. There should be a string like: Skipping invalid VM '22'. In this case, 22 is the ID of the virtual motorcar
  5. To try and restore this VM in vSphere, we run the control:
                  vim-cmd vmsvc/reload 22 (in a minute refresh the customer interface and cheque the VM condition)            
  6. To unregister (delete) a problem virtual auto, we run the following command:
                  vim-cmd /vmsvc/unregister 22            
  7. 7. Refresh the vSphere customer interface. The virtual machine with the Invalid status should disappear.

Likewise, to delete the problem VM manually from the host configuration file /etc/vmware/hostd/vmInventory.xml, delete the section containing the data of the problem VM from the vmInventory.xml file (backup the file earlier doing anything) in a text editor and restart the host services:

          services.sh restart        

[Need a helping hand with the process? We are available 24*7!]

Resolve running virtual auto with invalid status

If a running virtual motorcar gets the Invalid status, it is likely that the VM configuration file is corrupted.

To resolve the issue we follow the beneath steps:

  • Remove the VM from the inventory and restart the ESXi host
  • And so, create a new VM and connect the virtual disks (vmdk) of the former VM to it (Apply an existing deejay)
  • Perform Storage vMotion to collect all files of the new VM in a unmarried folder
  • Starting time new VM and brand sure that it works
  • Finally, delete the files of the old VM

If the problem of the Invalid VM appear after losing access to VMFS storages, we will take to manually remove them from the inventory and manually register them.

To do that we accept to observe the VMX file of a virtual machine in the VMFS storage, correct-clicking it and selecting Register VM. And then, start the VM and make sure that it is available.

[Still stuck with the mistake? Contact u.s.a. now!]

Conclusion

In short, Invalid State of a Virtual Automobile on VMWare ESXi, is an error VMWare administrators face. This article outlines the virtually common errors that relate to orphaned virtual machines and how our Support Engineers tackle it.

Forbid YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Allow us help y'all.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

brookscamvintat2000.blogspot.com

Source: https://bobcares.com/blog/invalid-state-of-a-virtual-machine-on-vmware-esxi/

0 Response to "Esxi Vm an Error Occurred"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel