West-Life Virtual Research Environment Docs
  • Introduction
  • Data Management
  • Virtual Folder
    • User's guide
      • Settings
        • Import settings from another Virtual Folder
      • File Manager
      • File Picker
      • Related applications
        • Jupyter notebook
      • Metadata
    • Installation guide
      • Cloud installation
      • Local installation
      • Integration with SSO
    • Integration guide
      • Select File or Dir from Virtual Folder
      • Working with WEBDAV
      • Embedding Virtual Folder Component
      • Adding component into Virtual Folder
    • Developer's guide
      • Backend
      • Frontend - Web Application
      • Metadata and API
        • Dataset metadata and API
        • File metadata and API
      • Import Export Settings API
      • Related application and services
      • Untitled
  • Virtual Machines and Containers
    • Preparing vagrant VM template
    • Preparing docker container
  • Repository
    • Installation guide
      • Prerequisites
      • Automatic installation
      • Manual installation from source codes
    • User's guide
      • Scientist imports project proposal
      • Staff uploads data
      • Scientist works with dataset
      • Metadata
    • Developer's guide
      • Metadata generation
      • ARIA integration
Powered by GitBook
On this page
  • Scientific Linux 7
  • Download ISO
  • Install minimal system
  • Define root and vagrant user
  • Post-installation script
  • Create box
  • CernVM 4
  1. Virtual Machines and Containers

Preparing vagrant VM template

PreviousVirtual Machines and ContainersNextPreparing docker container

Last updated 5 years ago

The following section describes how to prepare VM template from scratch, e.g. to be used as base vagrant box or as a base VM template. It's not needed to perform these steps when installing any products, however, might be usefull to maintain version of base OS.

Scientific Linux 7

Download ISO

As a base for most VM templates, Scientific Linux is used. Download the latest version from

recommended is Network installation ISO - SL-*-netinst.iso

Install minimal system

In installation packages - select Minimal system.

Define root and vagrant user

Set root password (vagrant) and create new user (vagrant:vagrant)

Post-installation script

In Virtualbox - Insert VBoxGuest Additions Devices -> Insert Guest Additions CD image ....

Log-in as root, and execute one of the following script:

  1. for non-GUI environment: bash <(curl -L https://bit.ly/2xDpLwR)

  2. for GUI environment: bash <(curl -L http://bit.ly/2GfrE7z)

Reset, check if everything works, if new kernel was installed - then manually uninstall old kernel

uname -a
# outputs which kernel is loaded
rpm -q kernel
# outputs which kernel is installed
yum remove kernel-...
# uninstalls unused kernel
bash <(curl -L ....)
#repeat post-install script 1. for non-GUI or 2. GUI

Create box

Stop virtualbox, remove unused IDE, sound card, change video memory etc.

Launch vagrant script to package box. Expecting the virtual machine name is my-sl7-virtualmachine

vagrant package --output sl7mini.box --base my-sl7-virtualmachine

Explanation:

  • package instruct vagrant to get virtual machine from virtual box and package it into separate file

  • --output sl7mini.box writes the result to file named as sl7mini.box

  • --base my-sl7-install takes VirtualBox virtual machine named my-sl7-virtualmachine

CernVM 4

Download CernVM4 image for vagrant.

http://ftp1.scientificlinux.org/linux/scientific/7x/x86_64/iso/
https://cernvm.cern.ch/portal/downloads