Anthony Thank you for the examples and feedback. Here are some questions I have: 1a. What version of the following are you using? - vCenter / ESXi - Chef server ; Chef client - Ruby 1b. Are you authorized to run commands on the ESXi hosts themselves? (We have to enable ssh to login to esxi host and more importantly, we do not have authorization to run anything on the host itself...this vmkfstools and knife-wax were not viable options for us to use). 2. Please confirm that when you provide a response to the $request_vm_name variable, you are providing a value that contains a '-' such as: abc1annavm-devenv (Note: I intentionally made this longer than14 characters) When I used names such as abc1annavm-devenv, my command fails with 'VM not found' error. I tried everything under the sun and finally removed the '-' and it worked. There should be an email from me to the community with more detail that I sent back when I was struggling through that issue. Regarding the use of VM name longer than 14 characters, the only time I have a problem with this is when I create the additional VMDKs. When I used abc1annavm-devenv, the 'knife vsphere vm vmdk add abc1annavm-devenv 2 --folder VMbuildout ...' fails with 'VM not found'. Again, I trod everything but it would not work until I changed it to 'abc1annavmdev'. And RE: your #4 - yes, I cannot use subfolders either, has to be at top level to work. NOTE: I'm thinking the problem has to do with the actual tie between vcenter and knife-vsphere. The problem we are seeing is not with the actual vm 'hostname' having a '-' or being more than 14 characters. It is the name vcenter uses for the folder construct. I find it quite suspect that all three issues I have are related to the folder structure as vcenter sees it but only when knife-vsphere tries to 'locate' something ... a - knife-vsphere cannot locate a VM who's VM folder name on the datastore has a '-' in the name b - knife-vsphere cannot locate a VM who's VM folder name on the datastore has more than 14 characters in the name c - knife-vsphere cannot locate a VM datastore if it is not located at the top level of the vcenter datacenter construct. But yet, knife-sphere can bootstrap a VM and chef-client can process a runlist on a VM with a hostname that has a '-' and more than 14 characters. 3. You are using a Template that already has additional vmdk's allocated. Once this is established, and you use knife-vsphere to add another VMDK, are you: - allocating it on the same datastore as the VMs primary vmdk (where OS exists) or any other datastore that already has a folder created with the folder name equal to the VM name? When I execute the "knife vsphere vm vmdk add abc1annavmdev 2 ..." and point to the same datastore as the VMs primary vmdk, it fails saying abc1annavmdev already exists. When I execute command and point to a different datastore so that it is the 'first' piece associated with abc1annavmdev, it creates the vmdk but fails to attach to the VM spitting out a deviceInfo error. When I execute command and point to a same datastore that i just created a vmdk on, it fails saying abc1annavmdev already exists. === I think it would be a good test for me to change my template so it has a secondary vmdk created/attached and then run my script to clone it and see if that makes any difference to the issues I have encountered. That seems to be the only difference between your scenario and mine shy of potential software versions. Again, thanks for giving me the details. Let me know the responses to my questions and I will go test the process with a second vmdk already attached to my template and then try to run my script to clone and add VMDKs. Thanks!!! Anna Sent from my iPhone
|
Archive powered by MHonArc 2.6.16.