Logo
  • PHP
    • HipHop / HHVM
    • Modern PHP
    • PHPStorm
    • LAMP
    • Laravel
    • Composer
    • PDO
  • JavaScript
    • node.js
    • AngularJS
  • CSS
    • SASS
    • “CSS4” (CSS level 4)
  • HTML
  • Git
  • LAMP
  • Vagrant
  • UI / UX
  • Architecture of …
  • Off-Topic
With ♥ from Berlin
November 4, 2013
Chris
Linux, Local Development, Vagrant, Virtual Machine / VM
Comments Off on How to copy Vagrant boxes (or duplicate them)

How to copy Vagrant boxes (or duplicate them)

PreviousNext
vagrant

Copy vagrant box & compress it

Making a real 1:1 copy of a Vagrant box is really easy ! Simply turn off the box (if she is currently running – yes, for me a Vagrant box is female!) with

vagrant halt

and create a package.box file (default name) in the same folder with

vagrant package

That’s it. The package.box contains the full virtual machine, compressed. You can put this file whereever you want now.

 

Create a new VM from the new box file (quick method)

Now create a new folder somewhere (for your new project that uses the box) and initialize a new default Vagrantfile via

vagrant init

Open the file, and edit this: Rename the default boxname (which might be precise64) to something new, like “my-zend-framework-box“.

config.vm.box = "my-zend-framework-box"

Uncomment and edit the default box location from

# config.vm.box_url = "http://domain.com/path/to/above.box"

to the filepath of your package.box. Windows users need to write the path this way:

config.vm.box_url = "file:///d:/folder/package.box"

Then uncomment and change the default IP to something you want, I recommend increasing the last number of the IP.

config.vm.network :private_network, ip: "192.168.33.101"

Run your Vagrant box with:

vagrant up

 

Create a new VM from the new box file (long method)

If you want to add the box to your vagrant box list (to use the box by it’s name, not by giving the file location) do it like this:

vagrant package

Add the box to Virtualbox (chose a box name for name-of-this-box):

vagrant box add name-of-this-box package.box virtualbox

Now you can create virtual machines from this box by simply giving the name of the box in the Vagrantfile, like

config.vm.box = "name-of-my-box"

A config.vm.box_url is not necessary anymore.

 

Be aware of synced folder issues !

There’s a weird issue going on with the synced folder: When packing a box and creating a new virtual machine from it, you might loose the content of the synced folder in the guest system. Obviously the fresh and empty synced folder on the host deletes the synced folder’s content in the guest. I haven’t tried yet, but maybe turning off the synced folder before packing is a solution.

 

vagrantvirtual machinevm
Share this
the-php-login-project

How to install php-login-minimal on Ubuntu 12.04 LTS

In this article I’ll show you how to install the minimal version of the php-login.net‘s login script (see the GitHub

(Links) How to fix an extremely slow Symfony inside a Vagrant box

When you work with Vagrant (if not – try it!) on a Windows or Mac machine (which is an excellent

The architecture of StackOverflow

One of the most interesting talks these weeks, and a rare insight into one of the most active pages on

Frontend Ops Conf 2014 – Sarah Goff-Dupont: Git, Continuous Integration and Making It Pretty (31min video)

php uk conference

Slides & talks from PHP UK Conference 2014

The slides of most of PHP UK CONFERENCE 2014‘s talks are online, very interesting stuff, have a look. And a

php

Must-read PHP blog: PHPweekly.com

Probably one of the best ressources for your weekly doze of news from the PHP scene: phpweekly.com simply publishes a

Create a fast, perfect and bootable 1:1 Windows backup (full clone of HDD) for SSD migration

In this article I want to share a super-simple, extremely fast and totally free workflow with you that will create

hiphop php

[Link] How to set up HipHop, Nginx and Laravel in Ubuntu 12.04 LTS (in a Vagrant box)

This is probably the most useful tutorial in 2014 so far. An excellent post by Chris Fidao, explaining how to

laracon-2014-eu-amsterdam

Laracon 2013 – Kapil Verma: Engineering Complex Applications with Laravel 4 (40min video)

More videos of 2013’s and 2014’s Laracon events from US and EU on their Youtube channel.

php

PHP 5.6.0 RC1 is available

The first Release Candidate of PHP 5.6 is available here on php.net, as usual also for Windows systems. The RC

1/4

Categories

Search

redaktionelle-hochlastseiten
Hochlastseiten mit PHP, MySQL und Apache am Beispiel stern.de (deutscher Artikel)
Experimenting with HHVM at Etsy (Link)
How major web companies (and banks) handle passwords quite wrong
How to fix the ugly font rendering in Google Chrome
atomic-design
An introduction into Atomic Design, a super-clean way to style web applications
bitdeli git github stats
Get visitor stats for your GitHub repo with BitDeli
mod-rewrite-ubuntu-14-04-lts
EOL lists of Ubuntu, Debian and CentOS for your server plannings
php
Is there a JSFiddle for PHP ? Yes !
digitalocean coupon
DigitalOcean VPS coupon codes for december 2013 and early 2014
Material Design – How Google designed Android L (7min video)
php
Postmodern PHP: appserver.io, a multithreaded application server for PHP, written in PHP
sass
New features in SASS 3.3 (a talk by SASS-creator Chris Eppstein)
Meet the developers behind Ableton (14min video)
phpstorm 7.0 php
How to setup and use XDEBUG with PHPStorm 6/7 (locally in Windows 7/8 and Mac OS X)
phpstorm 7.0 php
How to debug code on a remote server (or in vagrant box) with PHPStorm

Tags

apache bash centos composer conference coupon CSS debian fonts framework git GitHub hack HHVM HipHop HTML HTML5 IDE JavaScript JS LAMP laravel linux mod_rewrite MVC MySQL Nginx optimization PHP PHP 5.5 PHP 5.6 phpmyadmin PHPStorm security server SSD Ubuntu UI UX vagrant video virtual machine voucher VPS wordpress
Side-Project: Wordle-Solver:
www.wordle-helper.info

Pages

  • Privacy Policy