.. index:: iso installer, debian installer qemu

.. _deploy_to_iso_installer:

to: iso-installer
*****************

Provides QEMU operations using an operating system installer into a new image
and then boot into the installed image to run the specified test definitions.

.. note:: Currently only tested with Debian Installer.

.. code-block:: yaml

  - deploy:
      timeout:
        minutes: 4
      to: iso-installer
      os: debian_installer
      images:
        # the iso and the preseed file can be very tightly coupled.
        iso:
          url: http://example.com/debian-8.3.0-amd64-CD-1.iso
          image_arg: -drive file={iso},index=2,media=cdrom,readonly
        preseed:
          url: http://example.com/debian-8.3.0-cd1-preseed.cfg
      iso:
        kernel: /install.amd/vmlinuz
        initrd: /install.amd/initrd.gz
        installation_size: 2G

.. _deploy_to_iso_installer_images:

images
======

The ISO and the preseed file can be tightly coupled but point releases of a
stable release will typically continue to work with existing preseed files.
LAVA tests of the installer tend to only install the base system in order to
test kernel functionality rather than the operating system itself.

.. _deploy_to_iso_installer_images_iso:

iso
---

.. _deploy_to_iso_installer_images_iso_archive:

archive
^^^^^^^
.. include:: actions-deploy-images-archive.rsti

.. _deploy_to_iso_installer_images_iso_compression:

compression
^^^^^^^^^^^
.. include:: actions-deploy-images-compression.rsti

.. _deploy_to_iso_installer_images_iso_image_arg:

image_arg
^^^^^^^^^

QEMU requires ``,media=cdrom,readonly`` to handle the ISO correctly.

.. code-block:: yaml

  - deploy:
      to: iso-installer
      images:
        iso:
          url: http://example.com/debian.iso
          image_arg: -drive file={iso},index=2,media=cdrom,readonly

.. _deploy_to_iso_installer_images_iso_url:

.. include:: actions-deploy-images-url.rsti

.. _deploy_to_iso_installer_images_iso_preseed:

preseed
-------

Debian Installer can retrieve settings from a ``preseed`` file to allow the
installation to proceed without prompting for information.

.. _deploy_to_iso_installer_images_iso_preseed_url:

.. include:: actions-deploy-images-url.rsti

.. _deploy_to_iso_installer_iso:

iso
===

.. _deploy_to_iso_installer_iso_kernel:

kernel
------

Take an absolute path specified by the test writer to copy the kernel out of
the specified iso so that necessary kernel options can be added to the default
ISO boot commands.

Paths to pull from the ISO need to start with ``/`` as the top level of the
mounted ISO.

Paths to pull from the ISO must also be unique.

.. code-block:: yaml

  - deploy:
      to: iso-installer
      iso:
        kernel: /install.amd/vmlinuz
        initrd: /install.amd/initrd.gz

.. _deploy_to_iso_installer_iso_initrd:

initrd
------

Take an absolute path specified by the test writer to copy the kernel out of
the specified iso so that necessary kernel options can be added to the default
ISO boot commands.

Paths to pull from the ISO need to start with ``/`` as the top level of the
mounted ISO.

Paths to pull from the ISO must also be unique.

.. code-block:: yaml

  - deploy:
      to: iso-installer
      iso:
        kernel: /install.amd/vmlinuz
        initrd: /install.amd/initrd.gz

.. _deploy_to_iso_installer_iso_console:

console
-------

``console`` argument to pass to QEMU.

.. code-block:: yaml

  - deploy:
      to: iso-installer
      iso:
        console: ttyS0,38400,n8

.. _deploy_to_iso_installer_iso_installation_size:

installation_size
-----------------

Size of the empty image to be provided to the installer. Typically a maximum of
5G. Use megabytes for a smaller image, although ~1G is likely to be the
smallest practical size

.. code-block:: yaml

  - deploy:
      to: iso-installer
      iso:
        installation_size: 2G
