VMware Cloud Community
yliu9
Contributor
Contributor
Jump to solution

Re-attach virtual machines back into ESX

Just wondering.. if you remove a machine from the inventory or if you find an orphaned virtual machine that you just can't "fix" with the normal means (such as restarting VC, hostD, etc), is there any easy way of re-attaching that virtual machine back in?

So far the only way is to rename the original folder of that VM Guest, re-create the VM guest and copy the old VMDKs across, etc., and it seems to be awfully manual...

Reply
0 Kudos
1 Solution

Accepted Solutions
markrez
Contributor
Contributor
Jump to solution

If you have a VM that you need to bring in, using the VI Client, browse to the datastore (right-click storage, browse) where the VM is located and right-click the vmx file for the VM and choose "Add to Inventory." It will prompt you for a name, where you want to put it, etc. It will then show up in your inventory!

View solution in original post

Reply
0 Kudos
4 Replies
markrez
Contributor
Contributor
Jump to solution

If you have a VM that you need to bring in, using the VI Client, browse to the datastore (right-click storage, browse) where the VM is located and right-click the vmx file for the VM and choose "Add to Inventory." It will prompt you for a name, where you want to put it, etc. It will then show up in your inventory!

Reply
0 Kudos
dmaster
VMware Employee
VMware Employee
Jump to solution

Hi yliu9,

You can do the following from the servcie console:

show registered vm's

vmware-cmd -l

register a new vm

vmware-cmd -s register <config_file_path>

unregister an existing vm

vmware-cmd -s unregister <config_file_path>

slayedbylucifer
Enthusiast
Enthusiast
Jump to solution

another way to do the same task from command line:

run:

vmware-cmd -s register <path_to_the_vmx_file>

here please make sure that in the "path to the vmx file" you need to use the UUID of the datastore and and NOT the name of the datastore.

SSGNet
Contributor
Contributor
Jump to solution

oops, didn't mean to post here.

Reply
0 Kudos