Replicating Babylonnet (Tezos Testnet) Setup on multiple machines using VirtualBox Appliance

Mohammad Nauman
3 min readMar 15, 2020

--

Use Case

Setup Babylonnet on two or more machines, by copying, instead of downloading the whole chain with more than 40 GB data.

While this setup may not be very common, I had to do it in order to set up my second machine not only to save new chain downloading from internet with 40+ GB size and sync time of 15+ hours but also to save a significant amount of time required to set up a new virtual machine with all the different software and upgrades. I hope this solution would save time for other people with a similar use case.

Environment Setup

Machine 1:

  • MacBookPro 2015
  • VirtualBox 6.0.18
  • Virtual Machine Setup: Ubuntu 18.04.4 with Terminator, Docker, Docker-Compose, Curl, Git, Visual Studio Code
  • Tezos Babylonnet fully synced and running

Machine 2:

  • iMac 2019
  • VirtualBox 6.0.18
  • No virtual machine setup as it would be imported from the above setup.

Solution

A) Export the VM settings and data

  • Step 1: Power off your Tezos Testnet VM on Machine 1.
  • Step 2: Open VirtualBox Manager and click on Export
  • Step 3: Select the Tezos VM you want to export and click continue
  • Step 4: Accept the default settings and go to the next step
  • Step 5: Click on Export. It will create an OVA (Open Virtualization Archive) file.

B) Import the OVA file in Machine 2 VirtualBox:

  • Step 1) Download and install VirtualBox
  • Step 2) Open the VirtualBox Manager and click on import. Select the OVA file from the previous steps.
  • Step 3) Make sure to select “Generate new MAC addresses to all network adapters” as highlighted in the red box and click Import.

C) Increase storage space of virtual disk (optional):

Increasing the size of the virtual disk. In my case, I had configured the initial storage at 60GB but with the fully synced chain, it quickly maxed out, so I had to increase it to 100GB.

  • Step 1) From the VirtualBox VM settings, go to Storage and select the disk and copy the location of the VDI file.
  • Step 2) Open the terminal and execute the following commands to change

cd /Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/MacOS

VBoxManage modifyhd disk — resize 100000 <VDI file location>

  • Step 3) Start your virtual machine on Machine # 2 and you should be good to go with your new blockchain setup.

Happy Tezos Learning!

--

--

Mohammad Nauman

Python, Bitcoin, Lightening Network, and Austrian Economics