2022-04-19 16:55:38 +08:00
|
|
|
.. _upgrading_configuration:
|
|
|
|
|
|
|
|
Upgrading ACRN Configurations to Recent Releases
|
|
|
|
################################################
|
|
|
|
|
2022-06-10 07:31:40 +08:00
|
|
|
The configuration files, introduced in :ref:`acrn_config_types`, are refined
|
2022-05-06 06:01:22 +08:00
|
|
|
every release for richer features, clearer organization, and more user-friendly
|
|
|
|
presentation. Due to the strict validation ACRN adopts, configuration files
|
2022-04-19 16:55:38 +08:00
|
|
|
for a former release may not work for a latter if they are not upgraded. This
|
|
|
|
tutorial introduces the steps to upgrade those files.
|
|
|
|
|
|
|
|
Board XML
|
|
|
|
*********
|
|
|
|
|
|
|
|
A board XML file lists the characteristics of a board and is generated by the
|
2022-05-06 06:01:22 +08:00
|
|
|
Board Inspector. Each ACRN release adds more information to that file
|
2022-04-19 16:55:38 +08:00
|
|
|
in order to enable new features. Thus, always regenerate the board XML using the
|
2022-05-06 06:01:22 +08:00
|
|
|
Board Inspector of the new release when you upgrade.
|
2022-04-19 16:55:38 +08:00
|
|
|
|
2022-05-06 06:01:22 +08:00
|
|
|
For the steps to use the latest Board Inspector, refer to
|
2022-04-19 16:55:38 +08:00
|
|
|
:ref:`board_inspector_tool`.
|
|
|
|
|
|
|
|
Scenario XML
|
|
|
|
************
|
|
|
|
|
|
|
|
A scenario XML file captures the configurations of hypervisor features and
|
|
|
|
definitions of VMs. Starting from v3.0, the highly recommended way to upgrade a
|
|
|
|
scenario XML is to use the scenario XML upgrader found at
|
2022-05-06 06:01:22 +08:00
|
|
|
``misc/config_tools/scenario_config/upgrader.py``. Run this script from the
|
2022-04-19 16:55:38 +08:00
|
|
|
command line in the following way:
|
|
|
|
|
2022-05-06 06:01:22 +08:00
|
|
|
.. code-block:: bash
|
2022-04-19 16:55:38 +08:00
|
|
|
|
2022-05-06 06:01:22 +08:00
|
|
|
misc/config_tools/scenario_config/upgrader.py <your scenario XML> <out file>
|
2022-04-19 16:55:38 +08:00
|
|
|
|
2022-05-06 06:01:22 +08:00
|
|
|
* ``<your scenario XML>`` is the path to the scenario XML file for a previous
|
|
|
|
release.
|
2022-04-19 16:55:38 +08:00
|
|
|
|
2022-05-06 06:01:22 +08:00
|
|
|
* ``<out file>`` is the path to the new scenario XML file generated by the
|
|
|
|
script.
|
2022-04-19 16:55:38 +08:00
|
|
|
|
2022-05-06 06:01:22 +08:00
|
|
|
The script generates the new scenario XML file by migrating as many data in
|
|
|
|
``<your scenario XML>`` as possible, based on the latest schema. If any data
|
|
|
|
cannot be migrated, the script generates messages. For example:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
WARNING:root:hv/DEBUG_OPTIONS/some = '1' is discarded
|
|
|
|
INFO:root:vm[1]/os_config/name = 'OS Name': Guest OS names are no longer needed in scenario definitions.
|
2022-04-19 16:55:38 +08:00
|
|
|
|
|
|
|
A warning message indicates that some data are discarded unintendedly, while an
|
|
|
|
info message indicates an intended drop of obsoleted data.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
The upgrader's best efforts at migrating data from scenario XMLs of former
|
|
|
|
releases do not guarantee that all data can be migrated. Thus, you should
|
|
|
|
carefully review all messages from the upgrader tool. In case any meaningful
|
2022-05-06 06:01:22 +08:00
|
|
|
data is lost, use the :ref:`ACRN Configurator <acrn_configurator_tool>` to
|
|
|
|
open the upgraded scenario XML for further edits.
|
2022-04-19 16:55:38 +08:00
|
|
|
|
|
|
|
Launch XML
|
|
|
|
**********
|
|
|
|
|
2022-05-06 06:01:22 +08:00
|
|
|
Starting from ACRN v3.0, data in a launch XML are merged into the scenario XML.
|
|
|
|
You can use the same upgrader tool to upgrade a pair of scenario XML and launch
|
|
|
|
XML files into the merged format:
|
2022-04-19 16:55:38 +08:00
|
|
|
|
2022-05-06 06:01:22 +08:00
|
|
|
.. code-block:: bash
|
2022-04-19 16:55:38 +08:00
|
|
|
|
2022-07-05 09:58:20 +08:00
|
|
|
misc/config_tools/scenario_config/upgrader.py --launch <your launch XML> <your scenario XML> <out file>
|
2022-04-19 16:55:38 +08:00
|
|
|
|
2022-05-06 06:01:22 +08:00
|
|
|
The upgrader migrates all data in both XMLs into the ``<out file>`` and shows
|
|
|
|
messages about discarded data in the same way as upgrading a scenario XML alone.
|