vagrant-vsphere
vagrant-vsphere copied to clipboard
Allow cloning of vm's without vCenter
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.
Could you post the Vagrantfile you're using when you get this error?
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
Is there anything planned for the future to support the free Version of ESXI?
@regenrek, wondering the same
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.
@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
@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.
Guess this warrants a new plugin.
Thank you.
@jwbraucher This plugin should work with at least within the trial period of 60 days of ESXi, right ?
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.
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.