Scroll to navigation

FLAKE-CTL-FIRECRACKER-PULL(8)() FLAKE-CTL-FIRECRACKER-PULL(8)()

Name

FLAKE-CTL-FIRECRACKER-PULL(8) -

NAME

flake-ctl firecracker pull - Fetch firecracker image

SYNOPSIS

USAGE:

flake-ctl firecracker [--user] pull [OPTIONS] --name <NAME> <--kis-image <KIS_IMAGE>|--rootfs <ROOTFS>|--kernel <KERNEL>> OPTIONS:
--force
--initrd <INITRD>
--kernel <KERNEL>
--kis-image <KIS_IMAGE>
--name <NAME>
--rootfs <ROOTFS>
--user


DESCRIPTION

Pull the components of a firecracker image from the given location into /var/lib/firecracker/images/NAME on the local machine. In user mode the image is stored in the registry of the calling user below ~/.config/flakes/firecracker/images/NAME. After completion the available firecracker images can be listed via:

$ tree /var/lib/firecracker/images


and shows a file structure like in the following example

/var/lib/firecracker/images
└── myImage

├── initrd
├── kernel
└── rootfs


An image pulled with --kis-image carries an additional source_checksum file, see UPDATE CHECK below.

UPDATE CHECK

An image pulled with the --kis-image option takes part in a checksum based update check. The archive given to --kis-image must be accompanied by a checksum file at the same location which is named like the archive plus a .sha256 suffix. For an archive named foo.tar.xz the checksum file is expected at foo.tar.xz.sha256. If no such file exists the pull is rejected with an error.

The checksum is used to verify the downloaded archive and it is stored along with the image as source_checksum. Pulling an image under a name that already exists in the registry then behaves as follows:

  • The checksum file is fetched and compared against the source_checksum record of the registered image. If both match, the image is up to date. Nothing is downloaded, nothing in the registry is touched and the command succeeds.
  • If the checksums differ, the latest version of the image is fetched and replaces the image in the registry.

An image registered by a --rootfs/--kernel pull provides no such reference and is therefore not update checked. Pulling into an existing name stays an error for those images unless --force is given.

OPTIONS

Force pulling the image even if it already exists This will wipe existing data for the provided identifier. The image is fetched from scratch, no update check against an existing image of the same name is done
Single initrd image to pull into local image store
Single kernel image to pull into local image store
Firecracker image built by KIWI as kis image type to pull into local image store. This means the file behind KIS_IMAGE is expected to be a tarball containing the KIS components; rootfs-image, kernel and optional initrd. A checksum file named like KIS_IMAGE plus a '.sha256' suffix must be available at the same location, see UPDATE CHECK
Image name used as local identifier
Single rootfs image to pull into local image store
Pull into the user specific registry, rootless mode. The image is stored below ~/.config/flakes/firecracker/images. Requesting user mode as the root user has no effect

ENVIRONMENT

FLAKE_ALLOW_INSECURE_TRANSPORT

The images pulled here provide the root filesystem and the kernel of a virtual machine. They are therefore only fetched via https. If the image can only be reached through a transport that provides no integrity and no authenticity of the server, e.g plain http, setting this variable allows to use it. Only do this if the connection to the image source can be trusted.


EXAMPLE


AUTHOR

Marcus Schäfer

COPYRIGHT

(c) 2022, Elektrobit Automotive GmbH (c) 2023, Marcus Schäfer