Ondrej Famera - top logo

fast-vm-repo - Get fast-vm images from terminal

Tired of remembering where to look for public fast-vm images (here)? The new fast-vm-repo scripts comes to help by providing same content as the website with public fast-vm images without need to open up the browser. Bonus feature: auto-completion in terminal for repository and image names.

GitHub repository: https://github.com/ondrejhome/fast-vm-repo/

Years long idea at the bottom of the Issues page of fast-vm project coming to implementation - repository system for fast-vm images. In its current form providing the comfort of just getting the fast-vm image repository metadata, looking at available fast-vm images from terminal and choosing which one to import into local fast-vm.

Installation on RPM based systems

  • Enable the COPR repository with fast-vm (which now also contains fast-vm-repo and fast-vm-public-repositories packages).
  • Install the fast-vm-repo package which provides the fast-vm-repo script without any repositories.
  • Get some repository files (.repo files) either by
    • installing package fast-vm-public-repositories that will install all available public repositories from all mirrors - same as using the website with public fast-vm images OR
    • installing your closest mirror repository package (fast-vm-public-repositories-kr package for South Korean mirror or fast-vm-public-repositories-cz for mirror in Czechia) OR
    • or just downloading directly .repo file from fast-vm-repo GitHub repository into /etc/fast-vm.repos.d/.

Example installation on EL8 systems:

# curl -o /etc/yum.repos.d/fast-vm.repo https://copr.fedorainfracloud.org/coprs/ondrejhome/fast-vm/repo/epel-8/ondrejhome-fast-vm-epel-8.repo
# dnf install fast-vm-repo
# dnf install fast-vm-public-repositories
 Package                          Arch     Version           Repository                                           Size
 fast-vm-repo                     noarch   0.3-1.el8         copr:copr.fedorainfracloud.org:ondrejhome:fast-vm    29 k
 fast-vm-public-repositories      noarch   20220222-1.el8    copr:copr.fedorainfracloud.org:ondrejhome:fast-vm   7.2 k
Installing dependencies:
 fast-vm-public-repositories-cz   noarch   20220222-1.el8    copr:copr.fedorainfracloud.org:ondrejhome:fast-vm   9.9 k
 fast-vm-public-repositories-kr   noarch   20220222-1.el8    copr:copr.fedorainfracloud.org:ondrejhome:fast-vm   9.9 k

Note that versioning of fast-vm-repo and fast-vm-public-repositories is decoupled from each other intentionally - there could be changes to list of public repositories regardless of fast-vm-repo script.

Basic usage

Usage workflow might sound familiar to user of RPM based systems and contains following steps:

  1. Download the repository metadata (if not already present)
     # fast-vm-repo repolist refresh
     [inf] Remote file: https://kr.famera.cz/fastvm-images/repository/kr_alma.xml
     [inf] Remote file size: 2065'
     [ok] Downloaded https://kr.famera.cz/fastvm-images/repository/kr_alma.xml
     [inf] Remote file: http://ftp.linux.cz/pub/linux/people/ondrej_famera/fastvm-images/repository/cz_alma.xml
     [inf] Remote file size: 2245'
     [ok] Downloaded http://ftp.linux.cz/pub/linux/people/ondrej_famera/fastvm-images/repository/cz_alma.xml
     RepoID               Enabled Cached Images Repository description        
     cz_alma                  yes   yes       3 CZ Alma Linux images          
     kr_alma                  yes   yes       3 KR AlmaLinux images           
  2. Browse list of available images.
     # fast-vm-repo list
     === Repo: (cz_alma) CZ Alma Linux images
                            Image|Hack| Download size |Extra
     Image name              Size|file|    XZ |   ZST | file
     alma-8.3                  6g  yes|  428MB|  445MB|  no 
     alma-8.4                  6g  yes|  440MB|  456MB|  no 
     alma-8.5                  6g  yes|  483MB|  499MB|  no 
     === Repo: (kr_alma) KR AlmaLinux images
                            Image|Hack| Download size |Extra
     Image name              Size|file|    XZ |   ZST | file
     alma-8.3                  6g  yes|  428MB|  445MB|  no 
     alma-8.4                  6g  yes|  440MB|  456MB|  no 
     alma-8.5                  6g  yes|  483MB|  499MB|  no 
  3. Import image into local fast-vm (In example below the Alma Linux 8.5 XZ image is imported from Czechia mirror)
     # fast-vm-repo import cz_alma alma-8.5
     [ok] Calling fast-vm-image to import the image.
     =========> fast-vm-image
     [__][inf] Detected remote file with size '524128308'.
     [__][inf] Detected remote file with size '1707'.

    Note that in case that you run above command on machine that hasn’t fast-vm installed your will receive following message. The fast-vm-image import ... command can be used in verbatim form on machine that has fast-vm installed.

     # fast-vm-repo import cz_alma alma-8.5 
     [inf] fast-vm-image import alma-8.5 http://ftp.linux.cz/pub/linux/people/ondrej_famera/fastvm-images/generated/6g__alma-8.5.img.xz https://raw.githubusercontent.com/OndrejHome/fast-vm-public-images/master/alma/xml/alma-8.3-current.xml https://raw.githubusercontent.com/OndrejHome/fast-vm-public-images/master/alma/hacks/6g_alma-8-hacks.sh
     [err] fast-vm-image command cannot be found, you probably need to install it and then you can run above command to import the image.

Advanced uses

  • Disable the repositories you don’t want to use by changing enabled=1 to enabled=0 in /etc/fast-vm.repos.d/*.repo files - this is recommended instead of deleting the files as the updated version of package could bring such file back while existing disabled file should remain untouched by the updates.
  • Checking the details of the images with fast-vm info <repo> <image_name> - At present you can find the URLs for the resources for given image file and placeholder for description of image that is not yet populated with data.
  • To import the images that are available in ZST format you may add the zst at the end import command to use that image instead. By default the format is xz. For example fast-vm-repo import cz_alma alma-8.5 zst will import ZST image. Both XZ and ZST images are identical in content but while ZST is slightly larger in size, it imports several times faster than XZ and is a recommended choice if you use SSD disk for fast-vm.

Whats next?

  • Documentation on how to contribute and maintain your own fast-vm image repository. This will allow same convenience of getting the public images also to users that wants to use fast-vm for their internal images that cannot be made public. One such idea is already repository of RHEL images at company I work right now.
  • Ability to download all needed files for given image to local directory - for those cases where you need few images with all the needed files for offline use.
  • Mirroring subcommand to allow creating fast-vm image repository mirrors - both for public or internal use

In long term (which might take some time):

  • Additional metadata that will provide information about images in repository in structured way, such as which appliance functionality is required for the image, where to import the extra files, etc.
  • Integrity checking of fast-vm images in repository (for proper checksums or just for missing files/wrong links).
  • Generation of webpage with images information from same data as repositories.

In summary the fast-vm-repo script brings in some “quality of life” improvements to fast-vm users that prefers to get stuff done from one place - from the terminal.

Last change .