VMware Cloud Community
Zolile
Contributor
Contributor
Jump to solution

adding a vm back to inventory

Hi guys

i have a big problem. I deleted a vm from inventory and now i cant get it back. i tried browsing through the datastore and right clicking to get it back but the add to inventory button is disabled.

This is very very urgent please help.

1 Solution

Accepted Solutions
UmeshAhuja
Commander
Commander
Jump to solution

Hi,

Cross check you are going with the correct steps mention below , or else have you done any other activity on the vm like delete disk or delete snapshot due to which you are not able to get the add to inventory button.

To register a virtual machine in vCenter Server:
  1. Open the vSphere / VMware Infrastructure (VI) Client and log in with appropriate credentials.
  2. If connecting to vCenter Server, click on the desired host.
  3. Click the Configuration tab.
  4. Click Storage.
  5. Right-click on the appropriate datastore and click Browse Datastore.
  6. Navigate to the folder named after the virtual machine, and locate the <virtual machine>.vmx file. 
  7. Right-click the .vmx file and click Add to inventory. The Add to Inventory wizard opens. 
  8. Continue to follow the wizard to add the virtual machine.

To register a virtual machine from a command line:
  1. Log in as root to the ESX host with an SSH client.
  2. Run the command:

    # vmware-cmd -s register <full path to virtual machine>\<virtual machine name>.vmx

To register a virtual machine from a command line on an ESXi host:

  1. Log in as root to the ESXi host with an SSH client. For information on using Tech Support mode, see Using Tech Support Mode in ESXi 4.1 (1017910).
  2. Run the command:

    # vim-cmd solo/registervm /vmfs/volumes/datastore_name/VM_directory/VM_name.vmx
Thanks n Regards
Umesh Ahuja

If your query resolved then please consider awarding points by correct or helpful marking.

View solution in original post

4 Replies
a_p_
Leadership
Leadership
Jump to solution

Can you confirm you right clicked the VM's .vmx file? Does this file show up with Type "Virtual Machine"?

André

UmeshAhuja
Commander
Commander
Jump to solution

Hi,

Cross check you are going with the correct steps mention below , or else have you done any other activity on the vm like delete disk or delete snapshot due to which you are not able to get the add to inventory button.

To register a virtual machine in vCenter Server:
  1. Open the vSphere / VMware Infrastructure (VI) Client and log in with appropriate credentials.
  2. If connecting to vCenter Server, click on the desired host.
  3. Click the Configuration tab.
  4. Click Storage.
  5. Right-click on the appropriate datastore and click Browse Datastore.
  6. Navigate to the folder named after the virtual machine, and locate the <virtual machine>.vmx file. 
  7. Right-click the .vmx file and click Add to inventory. The Add to Inventory wizard opens. 
  8. Continue to follow the wizard to add the virtual machine.

To register a virtual machine from a command line:
  1. Log in as root to the ESX host with an SSH client.
  2. Run the command:

    # vmware-cmd -s register <full path to virtual machine>\<virtual machine name>.vmx

To register a virtual machine from a command line on an ESXi host:

  1. Log in as root to the ESXi host with an SSH client. For information on using Tech Support mode, see Using Tech Support Mode in ESXi 4.1 (1017910).
  2. Run the command:

    # vim-cmd solo/registervm /vmfs/volumes/datastore_name/VM_directory/VM_name.vmx
Thanks n Regards
Umesh Ahuja

If your query resolved then please consider awarding points by correct or helpful marking.
Rahim_from_PSPL
Enthusiast
Enthusiast
Jump to solution

I have created quick video on how to add VM back to inventory.

VM Remove and Add to inventory - YouTube

Rahim Shaikh Blog: http://www.rahimshaikh.com Youtube: https://www.youtube.com/channel/UC5IBuZFT0Q_MHv0sLsTffHA
Reply
0 Kudos
ighaniem
Contributor
Contributor
Jump to solution

What is it means "register VM" I mean what is it's usage and why should I use it?

Reply
0 Kudos