acrn-hypervisor/misc/sample_application/image_builder/README.rst
Junjie Mao 3f0eb96d85 sample_app: Add scripts to create RT and HMI VM images
Creating VM images is always a pain to users, and it is especially the case
for those who want to set up the ACRN sample application which needs two
different VM images, one with graphical desktop and the other optimized for
real-time.

This patch introduces the so-called "image builder" utility which is a set
of scripts that can automate the creation of those VM images. The scripts
will take care of:

  - Forking image files based on Ubuntu cloud images and enlarge the root
    file system per needs.

  - Setting up users and passwords.

  - Installing necessary packages to run either the graphical desktop or
    real-time applications.

  - Specific to the RT VM image, disabling services and tweaking kernel
    command line for optimized real-time performance.

  - Copying the sample applications into the images so that users can
    start them directly, after they launch the VMs.

Tracked-On: #7820
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-08 08:26:43 +08:00

52 lines
1.5 KiB
ReStructuredText

:orphan:
ACRN Sample Application Image Builder
#####################################
This directory contains the scripts to create VM images for ACRN sample
application.
Prerequisites
*************
Make sure you have Ubuntu installed with network access on your development
computer. Then execute the following command to install the prerequisites.
.. code-block:: bash
sudo apt install -y kpartx \
schroot \
mount \
wget \
qemu-utils
Also you'll need the Debian packages of Linux RT kernels built from
https://github.com/projectacrn/acrn-kernel when (and only when) building a
real-time VM image. After the kernel is built, copy those Debian packages (whose
names looks like ``linux-libc-*``, ``linux-headers-*`` and ``linux-image-*``) to
this directory (i.e. misc/sample_application/image_builder/).
Build images
************
To build the VM image for graphical HMI, run the following command under this
directory:
.. code-block:: bash
./create_image.sh hmi-vm
This will generate an image named ``hmi_vm.img`` under the this directory, which
can be used as the file of a virtio-blk device of a post-launched VM. Installing
the GNOME desktop system will take some time depending on your network and
storage speed.
To build the VM image for running real-time applications, run the following
command under this directory:
.. code-block:: bash
./create_image.sh rt-vm
This will generate an image named ``rt_vm.img`` under the this directory.