frapposelli / vagrant-vcloud

Vagrant provider for VMware vCloud Director®
MIT License
67 stars 38 forks source link

The box you attempted to add doesn't match the provider you specified. #115

Closed dorheini closed 3 years ago

dorheini commented 9 years ago

Hi. I have a .box file which we used for VirtualBox. Now we are migrating the deployment enviroment from VirtualBox to vCloud. We would like to use the same box for vCloud but i keep get the following error when trying vagrant up --provider=vCloud

The box you attempted to add doesn't match the provider you specified.

Provider expected: vmware_ovf, vcloud, vcenter Provider of box: virtualbox

So basically what i'm asking is how can i convert the .box file we currently have so it will be cross platform .box or maybe create another box file (out of the current .box file we have) that supports vCloud provider?

Thanks, Dor.

StefanScherer commented 9 years ago

I recommend to build a VMware base box with packer and use the packer-post-processor-vagrant-vmware-ovf plugin. Here is an example with the highlighted lines https://github.com/gosddc/packer-templates/blob/master/templates/ubuntu.json#L207-213 for the post-processor.

I also have lot of packer templates ported to vCloud, eg. from the box-cutter/ubuntu-vm (now boxcutter/ubuntu) in my personal branch:

This repo also contains some tweaks for the Ubuntu box to work in our vCloud environment as we do not have official support of Ubuntu 14.04 in it yet.

For Windows base boxes there are some other tricks I worked out in another repo forked from joefitzgerald/packer-windows in my_vagrant_vcloud branch:

There also are some tweaks to turn on WinRM after guest customization. The base box also has OpenSSH inside as vagrant-vcloud can rsync the synced folder into the guest VM before provisioning.

dorheini commented 9 years ago

Hi Stefan. Thanks for the quick response. You recommend using packer to create base box for vCloud (VMWare). Can you provide manual for using packer? what is it, where do i download it from and how do i use it so that i could create a base box with vcloud provider out of existing box or out of VirtualBox VM (Which was created out of the box file i just mentioned).

It is highly important to mention that i must create the vcloud box file out of existing box which is currently supports only VirtualBox.

Thanks, Dor

StefanScherer commented 9 years ago

@dorheini I normally create Vagrant boxes with packer ( https://www.packer.io ) from ISO file for each specific hypervisor.

If you only have the VirtualBox box you probably have to convert the disk image to VMware. But I haven't done this yet. Possible steps are VMware Converter or export/import with OVA files. You have to uninstall the VBox Additions and install the VMware Tools inside the VM. But it's only a guess.