Skip to content

Instantly share code, notes, and snippets.

@ilyasst
Created February 5, 2019 18:19
Show Gist options
  • Save ilyasst/99ebaefd4660703c2137ccae78c09b12 to your computer and use it in GitHub Desktop.
Save ilyasst/99ebaefd4660703c2137ccae78c09b12 to your computer and use it in GitHub Desktop.
$ VBoxManage import ./UCS-Virtualbox-Demo-Image.ova --vsys 0 --eula accept
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% 
Interpreting /home/crohr/dev/ucs/./UCS-Virtualbox-Demo-Image.ova...
OK. 
Disks: vmdisk1 53687091200 -1 http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized UCS-Demo-Image-virtualbox-disk1.vmdk -1 -1 
... 
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% 
Successfully imported the appliance.

Then list your VMs to find the VM ID:

$ VBoxManage list vms 
"UCS 4.1" {acef4c0a-35be-4640-a214-be135417f04d}

You can now package that VM as a Vagrant box:

$ vagrant package --base acef4c0a-35be-4640-a214-be135417f04d --output UCS.box 
==> acef4c0a-35be-4640-a214-be135417f04d: Exporting VM... 
==> acef4c0a-35be-4640-a214-be135417f04d: Compressing package to: /home/crohr/dev/ucs/UCS.box

And add it to the list of your local Vagrant boxes:

$ vagrant box add UCS.box --name UCS

Finally, you can create a Vagrantfile to use this box:

Vagrant.configure("2") do |config| 
   config.vm.box = "UCS" 
   # ... 
end

And vagrant up.

Thanks @crohr: crohr/ebarnouflant#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment