-->

How to re-register the VM through esxi host.

What is the VM ?

A virtual machine (VM) is an operating system (OS) or application environment that is installed on software, which look like physical hardware to the operating systems and applications.

Each VM consists of several types of files stored on a supported storage device. For example, a file with the .vmx  configuration of the virtual machine and a file with the .vmdk extension holds the actual data stored by the VM.

How to re-register the VM through esxi host.

  1. login to ESXi host through ssh.

2. Switch to /vmfs/volumes directory which is having mount points for all the connected datastores.

command   

#cd /vmfs/volumes

3. Search for the VM through-ought all the data-stores using following command

    [root@ESXI01 volumes]#find ./ -iname *vmname/last four numbers of VM*

e.g [root@wdfesx639 volumes]# find ./ -iname *4733* [searching for vmw4733]

and result will as below

[root@ESXI01 volumes]# find ./ -iname *4733*

./3d8727ad-3e06bcce/vm4733

./3d8727ad-3e06bcce/vm4733/vm4733.vmx

./3d8727ad-3e06bcce/vm4733/vm4733-flat.vmdk

./3d8727ad-3e06bcce/vm4733/vm4733.nvram

./3d8727ad-3e06bcce/vm4733/vm4733.vmdk

./3d8727ad-3e06bcce/vm4733/vm4733.vmxf

./3d8727ad-3e06bcce/vm4733/vm4733.vmsd

./3d8727ad-3e06bcce/vm4733/vm4733_1-flat.vmdk

./3d8727ad-3e06bcce/vm4733/vm4733_1.vmdk

./3d8727ad-3e06bcce/vm4733/vm4733_2-flat.vmdk

./3d8727ad-3e06bcce/vm4733/vm4733_2.vmdk

./3d8727ad-3e06bcce/vm4733/vm4733-41b44aff.vswp

./3d8727ad-3e06bcce/vm4733/vm4733-41b44aff.hlog

4. Now run below command to re-register respective .vmx file of respective VM, resulting re-registration of VM.

vim-cmd solo/registervm <full path of the .VMX file>

e.g.

[root@ESXI01 volumes]# vim-cmd solo/registervm /vmfs/volumes/3888727ad-3706bce/vm4733/vm4733.vmx

1216

After successful execution of the command, it will return VMID of the registered VM, which is 1216 in above example.

5. Now after global search in VC, the VM will be listed as powered off.

Wait for 5 mins., the VM will be automatically powered on by HA or try to power on it manually after 5-10 mins.

===================***=======================

Relevant Topics:



How to re-register the VM through esxi host. How to re-register the VM through esxi host. Reviewed by Virtulization on May 04, 2021 Rating: 5

No comments:

Home - PageNavi (show/hide)

hide
Powered by Blogger.