Virtual machine is invalid or inaccessible

Source: Internet
Author: User

First, "Problem description"

    1. Vcenter Directory manifest shows that the virtual machine is invalid or inaccessible

    2. Virtual machine Other operations are grayed out, i.e. no interface operation

Second, "Problem analysis"

    1. Inventory Service Issues

      Sometimes the virtual machine is marked as invalid or inaccessible, but in fact the VM is still normal, the business can access it normally, but it can't do anything to the virtual machine, which is generally a problem with the inventory service.


    2. Problems with the virtual machine itself

      The OS of the virtual machine itself can sometimes have problems, causing the virtual machine to crash, when the monitoring signal sent through Vmtools is interrupted, the host will mark the virtual machine as invalid or inaccessible. If you open ha and have virtual machine monitoring, then normally this will trigger ha to restart the virtual machine on the original host or other hosts in the cluster.


    3. Problems with the host process

      Virtual machine for the host is the equivalent of a Word or Excel program on our computer, is a process in a system, the process has a small probability of a problem due to some reasons, the virtual machine will not work properly.


Iii. "Solutions"

1. First you need to find the storage on which the virtual machine is stored, select the virtual machine-right-click to remove the list, at this time on the storage of the virtual machine, locate the Virtual machine folder, in this folder find the "virtual machine name. vmx" File, right-click "Add to Manifest". If "Add to manifest is grayed out", it is because the virtual machine is still running on ESXi, so you need to ssh into the Esxi,kill command to end the running virtual machine process.

SSH into ESXi, log in with the root user

Run Command: PS | grep virtualmachinename

The input is similar to the following:

7662 7662 VMX/BIN/VMX

7667 7662 VMX/BIN/VMX

7668 7662 MKS:VIRTUALMACHINENAME/BIN/VMX

7669 7662 VCPU-0:VIRTUALMACHINENAME/BIN/VMX

Multiple rows will be returned, each of which corresponds to a vmx process. Please identify the parent VMX process of the target virtual machine. The first column contains the PID, and the second column contains the PID of the parent process. Make sure that you terminate only the parent process. The parent process ID (PID) of each process is listed in the second column, which is identified in bold in this example. Make a note of the number for use in a later step.

Warning: Make sure that the line you identify is specific to the virtual machine that you want to repair. If you continue to perform this procedure on a virtual machine other than that virtual machine, you may cause other virtual machine downtime.

Terminate the process:

Kill ProcessID

Wait 30 seconds and repeat steps 2nd again to check if the process exists.

If it is not terminated, run the following command:

Kill-9 ProcessID

After you finish the virtual machine process, add the manifest.


Related KB Links:

Shutting down a virtual machine on an ESXi host (2049661)

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId= 2049661


Other than that:

If you add the virtual machine to the manifest again, prompting "the virtual machine or template has the same name, or already exists", adding the manifest will fail. Because the virtual machine VMX file still exists in the inventory database, it is now time to remove the Vmx file from the inventory database.

Create a new query through Sqlmanagement Studio

Select the Vcenter database and execute the following command:

Select * from VPX_VM wherelocal_file_name like '%machinename.vmx '

After the file is found, execute the following delete command (you may need to execute the command multiple times when deleting):

Delete from VPX_VM wherelocal_file_name like '% machinename.vmx '

where MachineName is the virtual machine name.

Related Knowledge Base:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2004139

This article from "Think you think, no no no" blog, please be sure to keep this source http://joket.blog.51cto.com/3504252/1739158

Invalid or inaccessible virtual machine

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.