tpiros / auto-create

Automatically create Virtual Machines on an ESXi server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vim.fault.NotFound

ketank1000 opened this issue · comments

iam new to esx tring to create the vms.
as per ur script every thing is getting created properly.
but it is failing to register the vm
giving the following error :

(vim.fault.NotFound) {
faultCause = (vmodl.MethodFault) null,
faultMessage =
msg = "Unable to find a VM corresponding to "(vim.fault.NotFound)""
}

any suggestion ?

Haven't seen that error unfortunately - not sure why that'd be happening. If you come across a solution please do share!

sorry for late reply. I found the solution :)

according to your script the vm gets created at the location where we run the script file
#Creating the folder for the Virtual Machine
mkdir ${NAME}

And you try to register vm on diff location
#Adding Virtual Machine to VM register - modify your path accordingly!!
MYVM=vim-cmd solo/registervm /vmfs/volumes/datastore1/${NAME}/${NAME}.vmx

So there was a path problem. Vm was getting created but not able to find the .vmx file to turn on.
Can you update the path of dir so that if anyone runs your script from anywhere will have no issue.
i suggest to keep path static.