2

I have made package of vagrant box through vagrant package command and I want to distribute that newly made vagrant box to every developers currently working in my team. The problem is that I do not want that every developer should install vagrant in it. I just want that the vagrant box which I have shared will get open through the user interface of virtual box or any virtual machine currently installed.

how could I achieve this goal??

Here is my error when I just try to open the vagrant.box through the virtual box

enter Failed to open the optical disk file /home/sandeep/vagrant image/ldapclient.box.

Could not get the storage format of the medium '/home/sandeep/vagrant image/ldapclient.box' (VERR_NOT_SUPPORTED).

Result Code: VBOX_E_IPRT_ERROR (0x80BB0005)
Component: Medium
Interface: IMedium {05f2bbb6-a3a6-4fb9-9b49-6d0dda7142ac}
Callee: IVirtualBox {fafa4e17-1ee2-4905-a10e-fe7c18bf5554}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)code here

3
  • I think the hash value of the vagrant box and the ubuntu os which we choose while creating new virtual machine doesn't match Jan 7, 2015 at 9:57
  • askubuntu.com/questions/144780/…. So you can answer your own question
    – BMW
    Jan 7, 2015 at 20:37
  • @BMW the link which you have provided is for how to launch a new virtual machine inside virtual box.. My problem is how to run a vagrant box through virtualbox through it's ui not through running vagrant up command Jan 8, 2015 at 5:10

1 Answer 1

3

a .box is just a tar file with some metadata and provider specific files inside.

It's not a Virtualbox supported format.

In your case, I'm not sure why you even use Vagrant (since you can just use Virtualbox's export function). But if you insist, all you have to do is to extract the files from the .box file and import into Virtualbox the .ovf & .vmdk files

Update:

Step by step guide how to extract .box file and run it in Virtualbox:

  1. Extracting: .box is just a tar/tar.gz/zip file, so use utilities like 7-zip, unzip or tar to extract the files (depends on your OS).
  2. After extracting you should see folder structure which is similar to the following one (I'm using ubuntu\trusty64 box as example): . |____14.04 | |____virtualbox | | |____.vagrant | | |____box-disk1.vmdk | | |____box.ovf | | |____metadata.json | | |____Vagrantfile |____metadata_url

as you can see, box format is just a container to provider specific data with some additional meta data that helps Vagrant with versioning and so on. The key files here are .ovf and .vmdk which Virtualbox supports.

  1. Open Virtualbox and in the File menu choose Import Appliance (this is in OS X. In your OS it might be a bit different)
  2. Point the import wizard to the .ovf file from your extracted directory and proceed with the import.
  3. Some machine details will be shown now and you can change some of them (Memory, CPU, etc)
  4. Proceed with the import - a new virtual machine should appear now in Virtualbox
  5. Start the new virtual machine
3
  • can u provide step by step procedure to extract the files from the .box file and import into the virtualbox Jan 17, 2015 at 9:44
  • Updated my answer, hope that helps!
    – m1keil
    Jan 17, 2015 at 11:40
  • thanks a lot for this answer , you have saved my time and also the time of my developers team :) Jan 18, 2015 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.