- From: <
- Subject: [chef-dev] Re: Re: [chef] Re: Re: Fwd: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re:
- Date: Wed, 9 Apr 2014 14:32:13 -0700 (PDT)
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
vCenter 5.1 will be 5.5
# gem -v
# knife -v
# ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
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).
We are authorized to run commands on the esx hosts, but this process does not
do that. The knife vsphere runs on the vCenter.
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:
(Note: I intentionally made this longer than14 characters)
Correct, I can use a name with a dash and longer than 14 characters when
creating a VM clone.
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
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
changed it to 'abc1annavmdev'.
Yes, I can add a vmdk to a VM with a name longer than 14 characters. But not
if it’s in a sub-folder.
And RE: your #4 - yes, I cannot use subfolders either, has to be at top level
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.
I believe it’s something in that little snippet of code that’s keeping it
from locating the VM’s in the subfolders. It works on VM’s in a toplevel
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
- 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?
I usually use vCenter to add another vmdk, in addition to the ones in the
template. But, if I use knife vsphere, it picks the datastore where it puts
# knife vsphere vm vmdk add testserver 10 --vmdk-type thin --vsuser root
Enter your password:
Datastore: vcenter_vmfs_04 (1.97 TB(2161359454208) / 5.00 TB)
Next vmdk name is => [vcenter_vmfs_04] testserver/testserver_2.vmdk
Capacity: 10 GB
Disk: [vcenter_vmfs_04] testserver/testserver_2.vmdk
Attaching VMDK to testserver
using SCSI controller 0
using SCSI ID 2
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
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
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
Yes, add the second vmdk to your Template and see what happens. You can also
move everything to a top level folder?
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
my template and then try to run my script to clone and add VMDKs.
Archive powered by MHonArc 2.6.16.