A virtual machine can be registered to the inventory via the vSphere Web Client, the VMware Host Client, or the ESXi command line interface (CLI).
Method 1: Using vSphere Web Client (vCenter Server)
- Launch the vSphere Web Client and log in with the appropriate credentials.
- Navigate to the desired ESXi host.
- Select the Configure tab.
- Under Datastores, right-click the appropriate datastore and select Browse Files.
- Locate the VM's directory and find the corresponding .vmx file.
- Right-click the .vmx file and select Register VM.
- Follow the registration wizard to complete the process.
Method 2: Using VMware Host Client (Direct to ESXi Host)
- Open the VMware Host Client and log in with the appropriate credentials.
- Click Storage in the navigation pane.
- Right-click on the relevant datastore and select Register a VM.
- Browse to the directory where the virtual machine resides.
- Select the .vmx file and click Register to complete the process.
Method 3: Using ESXi Command Line
- Connect to the ESXi host via SSH as the root user.
- Run the below command to register the VM:
vim-cmd solo/registervm /vmfs/volumes/<datastore_name>/<VM_directory>/<VM_name>.vmx