qemu.guest_initialize#

Guest initialization#

This script initializes a guest environment by setting up the necessary resources for guest-instance management. It creates a directory structure to store files related to the guest, such as:

  • PID files

  • Monitor files

  • Serial input/output logs

  • Other instance-specific metadata

Additionally, the script prepares guest storage, including the boot drive, using an existing .qcow2 image (e.g., created via Cloud-init, Packer, etc.). The boot drive is a qcow2 overlay backed by that image: the system-imaging store holds the images, and each guest references one, holding only what it writes. The image must then stay unchanged while a guest uses it; with overlay set to false, the boot drive is a copy of the image instead.

Configuration#

  • qemu.guests.<GUEST NAME>.system_image_name: str

    Name of the system image. This will be overwritten if also given as script argument.

  • system-imaging.images.<SYSTEM IMAGE NAME>.disk: dict

    A dictionary containing the path to the disk image and, if this path does not exist, a URL from where the disk image cna be downloaded.

Retargetable: False#

cijoe.qemu.scripts.guest_initialize.main(args, cijoe)#

Provision using an existing boot image

CLI arguments#

  • --guest_name GUEST_NAME

    Name of the qemu guest. (default: None)

  • --system_image_name SYSTEM_IMAGE_NAME

    Name of the system image. This will overwrite any system image name defined in the configuration file. (default: None)

  • --overlay {true,false}

    Back the boot image with the disk image, as a qcow2 overlay; with false, copy it. With the overlay, the disk image must stay unchanged while the guest is in use. (default: True)