Notes:
- Unfortunately the process is not as simple as I'd have expected it, that's why I wrote this little step-by-step instruction.
- My setup is/was:
- OSX 10.9.4
- VirtualBox 4.3.12
- VMware Fusion 6.0.4
- OS as VM to migrate: Ubuntu 10.04.4 LTS
- Open Oracel VM VirtualBox Manager
- Make sure the VM is powered off
- Go to 'File' > 'Export Appliance', select your instance and hit 'next'.
- Change destination folder for the *.ova if you like
- Set Format to 'OVF 1.0' and push 'next'
- Change some Appliance Settings if you like. Hit the 'export button' and get a coffee
- Go to 'add' > 'import' and select your previouly created .ova image
- Change the destination folder if you like and push 'save'
- VMware may inform you that the image does not passed the OVF specs - ignore it an retry. It should work anyway.
- Go to location where your VMNAME.vmwarevm exists in cd into it.
- Make sure a 'metadata.json' file is in it. Otherweise create it. The minimum content should be:
{"provider":"vmware_fusion"}For more info read: https://docs.vagrantup.com/v2/boxes/format.html - run
tar cvzf NAME.box ./*to pack it. (This may take a while, so get a coffee)
- Backup the 'Vagrantfile' and the '.vagrant/'' folder
- Comment all providespecific settings in you Vagrantfile
- To add the box run:
vagrant box add /path/to/VMNAME.vmwarevm/NAME.box --provider=vmware_fusion --name=NAME(Relax and enjoy your coffee)
# The output should look something like this:
b21:htdocs biophonc$ vagrant box add /Virtual-Machines/pp.vmwarevm/pp.box --provider=vmware_fusion --name=pp
==> box: Adding box 'pp' (v0) for provider: vmware_fusion
box: Downloading: file:///Virtual-Machines/pp.vmwarevm/pp.box
==> box: Successfully added box 'pp' (v0) for 'vmware_fusion'!- Verify it by fireing it up:
b21:htdocs biophonc$ vagrant up
Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: Cloning VMware VM: 'pp'. This can take some time...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
==> default: Starting the VMware VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 192.168.27.129:22
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Forwarding ports...
default: -- 22 => 2222
==> default: Configuring network adapters within the VM...
==> default: Waiting for HGFS kernel module to load...
==> default: Enabling and configuring shared folders...
default: -- /Volumes/projects/presseportal.v2/htdocs: /vagrant
default: -- /Volumes/projects/presseportal.v2/htdocs/presseportal: /var/www/presseportal.de- Tweak the provider specific config if you like to...
That's it!
Great write up, I'm just confused though for the section
Use it with Vagrant. Can you provided examples of what you needed to change?conf.vm.provider "virtualbox" do |v|?config.vm.box =?