Sandeep Mahto
Sandeep Mahto

Reputation: 23

starting vagrant box from any virtual machines such as virtualbox through their interface

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

Upvotes: 2

Views: 790

Answers (1)

m1keil
m1keil

Reputation: 4575

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

Upvotes: 3

Related Questions