Minivirt maintains a database of images identified by their SHA256 checksum. They may have any number of tags.
Show images in the database:
% miv images
5446f671 1.4G ubuntu-22.04
84200bbd 115M alpine-3.15
8ad24d9f 1.4G ubuntu-20.04
c86a9115 114M alpine alpine-3.16
Minivirt can build images from recipes, which are YAML files, with a syntax inspired by GitHub Actions workflows. Download any file from the /recipes
directory and run:
miv build alpine-3.16.yaml --tag alpine -v
The -v
flag directs the output of the build (serial console or SSH) to stdout.
The image is now in the database:
miv run alpine
Commit a VM as an image:
miv commit myvm myimage
Save the image as a TAR archive:
miv save myimage | gzip -1 > myimage.tgz
Later, load the image:
zcat myimage.tgz | miv load myimage
To make sure the images and VMs are consistent, run a database check:
miv fsck
To remove an image, first untag it. This only removes the tag, not the image itself.
miv untag myimage
The image is removed during prune:
miv prune
Add a remote repository:
miv remote add default https://f003.backblazeb2.com/file/minivirt
Pull an image. {arch}
will be interpolated to the machine architecture.
miv pull default alpine-{arch} alpine
To host an image repository, you need an object store (e.g. Amazon S3, Backblaze B2, MinIO, etc). Set the following environment variables:
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
: authentication credentials.AWS_ENDPOINT_URL
(optional): if the object store is not hosted on the AWS public cloud, this should point to the appropriate endpoint.
The bucket name is taken from the last part of the remote's URL, e.g. minivirt
for the default repository.
Run miv push
to upload an image:
miv push default alpine-3.16 alpine-3.16-aarch64