Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow cloning of vm's without vCenter #70

Open
jischebeck opened this issue Jun 4, 2014 · 11 comments
Open

Allow cloning of vm's without vCenter #70

jischebeck opened this issue Jun 4, 2014 · 11 comments

Comments

@jischebeck
Copy link

We are using vSphere Servers without a vCenter. After starting vagrant up, I get the following error: "the operation is not supported on the object".

Please add a feature to support cloning of VMs without vCenter, like it is described in:
http://www.lucd.info/2013/06/30/hl-tools-part-1-clone-a-vm-without-vcenter/

As an alternative to updating the existing vmx-file, a template vmx-file could be defined as part of the vagrantfile or the box definition.

@marnovdm
Copy link

marnovdm commented Jul 7, 2014

Could you post the Vagrantfile you're using when you get this error?

@jischebeck
Copy link
Author

I get the error using the following Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = 'dummy'
  config.vm.box_url = './example_box/dummy.box'

  config.vm.provider :vsphere do |vsphere|
    vsphere.host = 'replaced'
    vsphere.data_center_name = 'ha-datacenter'
    vsphere.template_name = '_template_centos65_vagrant'
    vsphere.name = 'ji_centos'
    vsphere.user = '<user>'
    vsphere.password = '<password>'
    vsphere.insecure = 'true'
     vsphere.clone_from_vm = true
  end
end

@regenrek
Copy link

Is there anything planned for the future to support the free Version of ESXI?

@nitrocode
Copy link

@regenrek, wondering the same

@jwbraucher
Copy link

The vagrant-vsphere plugin uses the vSphere API to clone VM's. The error that you are seeing, "NotSupported: The operation is not supported on the object.", is a response coming from ESXi telling you that the API call for CloneVM is not supported. This is a fairly essential operation for using vagrant to provision VM's and cannot easily be worked around by making changes to the vagrant-vsphere plugin.

@nitrocode
Copy link

@jwbraucher

It's fairly easy to clone a VM using vmfkstools which is accessible by SSHing into the ESXi server. I use the following script for my servers to do a quick clone without vcenter.

https://gist.github.com/nitrocode/007fce26f161aa0b74ec

./clone.sh ORIGNAME CLONENAME

@jwbraucher
Copy link

@nitrocode

The vagrant-vsphere plugin only works with the vSphere API. It is unlikely that all of the same functionality could be provided by SSHing into an ESXi server and running shell commands. CloneVM is only one of many API calls needed for vagrant-sphere to function properly.

Even if it were possible to recreate the same functionality of vagrant-vsphere using SSH and shell commands this would amount to an entirely different vagrant plugin. There are no plans to take the vagrant-vsphere project in this direction.

@nitrocode
Copy link

Guess this warrants a new plugin.

Thank you.

@vikas027
Copy link

@jwbraucher This plugin should work with at least within the trial period of 60 days of ESXi, right ?

@bish0polis
Copy link

Hmm. If you VMwareCeption an esxi box, it'll have a shiny new 60-day. I bet you could spin up a snapshotted esxi host as a host for the actual box building; then reel it back (to a powered-off state) when you're done.

@jtcressy
Copy link

This plugin will not work with any form of standalone esxi. I tested it on a standalone host with an enterprise plus license and the feature is still not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants