Knife-vsphere

Hey my chef buddies!

If you have used the ‘knife vsphere vm clone …’ command, maybe you can help me. After getting through all the ‘env’ things like user, password, vcenter host, doing insecure to bypass ssl, etc, and with all those settings, I can successfully do several of the ‘list’ commands like ‘knife vsphere vm list’, so I know those are all resolving as try should but, when I try to clone a VM, I’m receiving the error “VM/Template not found.” This is for a RHEL VM.

I’ve tried several gyrations to identify its location but nothing seems to be working.

  • I’ve tried using a VM, that is powered on, for the source
  • I’ve tried a VM that is converted to a template
  • I’ve tried identifying the datastore.
  • I’ve tried identifying the datacenter where the source is located
  • I tried using the relative path o the template (relative to datacenter layer an relative to the datastore)

Any suggestions?

Much appreciated
Anna

Sent from my iPhone

  1. try specifying the folder containing the template with the undocumented
    --folder option. This explicitly sets src_folder
    herehttps://github.com/ezrapagel/knife-vsphere/blob/master/lib/chef/knife/vsphere_vm_clone.rb#L219
  2. confirm knife vsphere template list returns the template
  3. maybe try the --template-file option [I've never used this]

Cheers,
Alastair

On Wed, Jan 22, 2014 at 10:32 PM, Anna Redding amrsun23@yahoo.com wrote:

Hey my chef buddies!

If you have used the 'knife vsphere vm clone ...' command, maybe you can
help me. After getting through all the 'env' things like user, password,
vcenter host, doing insecure to bypass ssl, etc, and with all those
settings, I can successfully do several of the 'list' commands like 'knife
vsphere vm list', so I know those are all resolving as try should but, when
I try to clone a VM, I'm receiving the error "VM/Template not found." This
is for a RHEL VM.

I've tried several gyrations to identify its location but nothing seems to
be working.

  • I've tried using a VM, that is powered on, for the source
  • I've tried a VM that is converted to a template
  • I've tried identifying the datastore.
  • I've tried identifying the datacenter where the source is located
  • I tried using the relative path o the template (relative to datacenter
    layer an relative to the datastore)

Any suggestions?

Much appreciated
Anna

Sent from my iPhone