vagrant.rst
changeset 2301 a99f277a9eae
parent 2291 a49f3423eb55
child 2302 f47dd29b4e06
equal deleted inserted replaced
2300:e538e158c38b 2301:a99f277a9eae
    43 https://github.com/sprotheroe/vagrant-disksize
    43 https://github.com/sprotheroe/vagrant-disksize
    44 
    44 
    45 Managing boxes
    45 Managing boxes
    46 ==============
    46 ==============
    47 
    47 
    48 Adding new box from catalog::
    48 Store new box from catalog locally::
    49 
    49 
    50   $ vagrant box add ubuntu/trusty64
    50   $ vagrant box add ubuntu/trusty64
       
    51   $ vagrant box add --provider virtualbox hashicorp/precise64
    51 
    52 
    52 Checking for box updates::
    53 Check for box updates::
    53 
    54 
    54   $ cd $BOXDIR
    55   $ cd $BOXDIR
    55   $ vagrant box outdated
    56   $ vagrant box outdated
    56 
    57 
    57 or::
    58 or::
    86 
    87 
    87 https://www.vagrantup.com/docs/cli/box.html
    88 https://www.vagrantup.com/docs/cli/box.html
    88   Command: ``vagrant box``.
    89   Command: ``vagrant box``.
    89 https://www.vagrantup.com/docs/boxes/versioning.html
    90 https://www.vagrantup.com/docs/boxes/versioning.html
    90   Box Versioning.
    91   Box Versioning.
       
    92 
       
    93 Exporting boxes
       
    94 ===============
       
    95 
       
    96 Any VirtualBox VM can be packages as Vagrant box. Find VM name or UUID with::
       
    97 
       
    98   $ VBoxManage list vms
       
    99 
       
   100 Pass it to one of::
       
   101 
       
   102   $ vagrant package --base $VM_NAME
       
   103   $ vagrant package --base $VM_UUID
       
   104   $ vagrant package --base $VM_NAME --output my.box
       
   105   $ vagrant package --base $VM_UUID --output my.box
       
   106 
       
   107 If you are in Vagrant managed directory (with ``.vagrant`` subdirectory) it is as simple as::
       
   108 
       
   109   $ vagrant package
       
   110 
       
   111 .. note:: Only one VM is packages even if Vagrant file defines several VMs.
       
   112 
       
   113 Import packages box::
       
   114 
       
   115   $ vagrant box add --name $NAME /path/to/new.box
       
   116   ...
       
   117   $ vagrant init $NAME
       
   118   ...
       
   119   $ vagrant up
       
   120 
       
   121 https://www.vagrantup.com/docs/boxes/base.html
       
   122   Create own vagrant image.
       
   123 https://www.vagrantup.com/docs/cli/package.html
       
   124   ``package`` command.
    91 
   125 
    92 Managing plugins
   126 Managing plugins
    93 ================
   127 ================
    94 
   128 
    95 https://www.vagrantup.com/docs/cli/plugin.html
   129 https://www.vagrantup.com/docs/cli/plugin.html