Closed harryyeh closed 11 years ago
BTW my desktop operating system is Ubuntu 12.04 that I'm using
The VMDK file is copied from your local machine to the hipervisor. So I guess that the path '/vmfs/volumes/DataStore-1/Ubuntu1204Server/Ubuntu1204Server.vmdk' is wrong. If you want use a vmdk from the data store you can use the --use-template option
@cometcomputing sorry for the late replay. I believe @maintux did a great job explaining what --vm-disk is for. Feel free to re-open it otherwise.
Thanks!
Thanks for the response, I actually went through the source code and noticed there's no way to pass a directory of where the template is actually stored on the server - the code is just using all the defaults. Also if you change the name from datastore1 to something else it won't work
I was actually looking at the ESX Module and gem and
@templates_dir = opts[:templates_dir] || "/vmfs/volumes/datastore1/esx-gem/templates"
How do you actually pass in a template directory parameter with your gem?
You are right, I'll update the knife–esx code asap so will be possible to use custom template directory. stay tuned ;-)
Awesome, I was thinking of contributing to the project (never really done that before) with some fixes if the come along - we do a lot of stuff with ESXi, if I find some more errors I'll let you know
ok thank you so much. :-)
I submitted some fixes, please review them
knife esx vm create --esx-username root \ --esx-host server1 \ --esx-password password \ --vm-disk /vmfs/volumes/DataStore-1/Ubuntu1204Server/Ubuntu1204Server.vmdk \ --vm-name vmserver1 \ --datastore DataStore-1
This is the command I am running - I have ESXi 5 - is anyone else getting this error?
Not sure if I need a template file but this
ERROR: You have not provided a valid VMDK file. (--vm-disk) is odd.
is the --vm-disk option supposed to point to an image in the DataStore or on the client machine on the chef client where you are running knife?