Cannot create vm esxi 6.5
You will have to manually remove them from the inventory and manually register them by finding the VMX file of a virtual machine in the VMFS storage, right-clicking it and selecting Register VM. If the problem of the Invalid VM appeared after losing access to VMFS storages, when the access is restored the started VMs will run and the stopped ones will become isolated. Start your new VM and make sure that it works.Perform Storage vMotion to collect all files of the new VM in a single folder.Then create a new VM and connect the virtual disks (vmdk) of the old VM to it (Use an existing disk).Remove the VM from the inventory and restart the ESXi host.If a running virtual machine gets the Invalid status, it is likely that the VM configuration file is corrupted. To do it, delete the section containing the data of the problem VM from the vmInventory.xml file (backup the file before doing anything) in a text editor (vi, nano) and restart the host services: services.sh restart The virtual machine with the Invalid status should disappear.Īlso you can manually delete the problem VM from the host configuration file /etc/vmware/hostd/vmInventory.xml. If you want to unregister (delete) a problem virtual machine, run the following command: vim-cmd /vmsvc/unregister 22.If you want to try and restore this VM in vSphere, run the command: vim-cmd vmsvc/reload 22 (in a minute refresh the client interface and check the VM status).In this case, 22 is the ID of the virtual machine There should be a string like: Skipping invalid VM '22'. A list of all VMs with the Invalid status registered on this host will be displayed.To get the ID of the problem virtual machine, run this command: vim-cmd vmsvc/getallvms | grep invalid.Connect to the ESXi host using SSH client (Putty, mputty, etc.).Enable SSH on the ESXi host with the problem VM (Actions -> Settings -> Security Profile -> Services -> SSH -> Edit -> Start).
The only way to remove such a VM is to use the SSH console of the ESXi host.
You won’t be able to delete such a VM from vSphere Web Client using the built-in tools (the Unregister option in the Actions menu is inactive). This can also happen after you manually remove VM files from the VMFS storage after running vMotion and in some other cases. As a rule, the issue occurs after deleting a virtual machine, which data remained in the VMWare vSphere/ESXi configuration on some reason. Quite often, VMWare administrators are faced with the fact that the list of virtual machines contains VMs with the Invalid ( Unknown) status.