Downloading a Linux ISO file and building a machine from scratch can take a while and be prone to errors. We'll be using a pre-built VirtualBox disk image containing an installed version of a Linux distribution to save time.

CockroachDB can run on many different Linux distributions. We’ll be downloading a pre-built VirtualBox 64 bit image based on Ubuntu called Linux Lite from osboxes. There’s no special reason we are using Linux Lite as our operating system. It was chosen because osboxes.org had a pre-built VirtualBox image that could be downloaded easily and it was one of the smaller available at around 760Mb compressed.

For more information, please see the VirtualBox Images page on osxobes.org.

Virtual Machine Specifications

Network

The network interface configured on the virtual machine is of type NAT (Network Address Translation). It allows the machine to use the host machine’s networking to access the Internet and requires no additional configuration on the host. See the Introduction to networking modes in the VirtualBox Documentation for more information.

While the guest machine can access the Internet using NAT via the host’s network, outside machines including the host cannot access the guest directly. Access to the guest is done using a terminal on the GUI console when the machine is started.

Time Synchronization

Clustered machines are sensitive to changes in time. By default, VirtualBox tries to keep the guest’s time in synchronization with the host by making small adjustments which can cause timing errors in CockroachDB.

It’s more important that the time be consistent rather than accurate, so because this cluster is on one virtual machine, time synchronization between guest and host has been disabled.

What’s Next

The next step is where most of the action happens. We will Configure and Start the virtual machine.