Content edits

Signed-off-by: Deb Taylor <deb.taylor@intel.com>
This commit is contained in:
Deb Taylor 2019-08-14 14:43:28 -04:00 committed by David Kinder
parent f147c388a5
commit a5647e9edf

View File

@ -1,68 +1,59 @@
.. _using_hybrid_mode_on_nuc: .. _using_hybrid_mode_on_nuc:
Using Hybrid mode on NUC Using Hybrid Mode on the NUC
######################## ############################
ACRN hypervisor supports hybrid scenario that the User VM ACRN hypervisor supports a hybrid scenario where the User VM (such as Zephyr
(such as Zephyr or Clear Linux) could run in a pre-launched VM or Clear Linux) runs in a pre-launched VM or in a post-launched VM that is
or in a post-launched VM which launched by Device model in Service VM. launched by a Device model in the Service VM. The following guidelines
The following guidelines shows how to set up the ACRN hypervisor hybrid describe how to set up the ACRN hypervisor hybrid scenario on the Intel NUC,
scenario on Intel NUC. The hybrid scenario on Intel NUC is shown in as shown in :numref:`hybrid_scenario_on_nuc`.
:numref:`hybrid_scenario_on_nuc`.
.. figure:: images/hybrid_scenario_on_nuc.png .. figure:: images/hybrid_scenario_on_nuc.png
:align: center :align: center
:width: 400px :width: 600px
:name: hybrid_scenario_on_nuc :name: hybrid_scenario_on_nuc
The HYBRID scenario on Intel NUC The Hybrid scenario on the Intel NUC
Prerequisites Prerequisites
************* *************
- `Intel NUC Kit NUC7i7DNHE - Use the `Intel NUC Kit NUC7i7DNHE <https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits/nuc7i7dnhe.html>`_.
<https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits/nuc7i7dnhe.html>`_ - Connect to the serial port as described in :ref:`Connecting to the serial port <connect_serial_port>`.
- Connecting to the serial port, described in :ref:`Connecting to the serial port - Install GRUB on your SATA device or on the NVME disk of your NUC.
<connect_serial_port>`
- Install Grub on SATA or NVME disk of NUC
Update Ubuntu GRUB to Boot hypervisor and Load Kernel Image Update Ubuntu GRUB
*********************************************************** ******************
#. Append the following configuration to the ``/etc/grub.d/40_custom`` file:
Perform the following to update Ubuntu GRUB so it can boot the hypervisor and load the kernel image:
#. Append the following configuration in the ``/etc/grub.d/40_custom`` file:
.. code-block:: bash .. code-block:: bash
:emphasize-lines: 18,20 :emphasize-lines: 10,11
menuentry 'ACRN hypervisor Hybird Scenario' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-e23c76ae-b06d-4a6e-ad42-46b8eedfd7d3' { menuentry 'ACRN hypervisor Hybird Scenario' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-e23c76ae-b06d-4a6e-ad42-46b8eedfd7d3' {
recordfail recordfail
load_video load_video
gfxmode $linux_gfx_mode gfxmode $linux_gfx_mode
insmod gzio insmod gzio
insmod part_gpt insmod part_gpt
insmod ext2 insmod ext2
echo 'Loading hypervisor Hybrid scenario ...' echo 'Loading hypervisor Hybrid scenario ...'
multiboot --quirk-modules-after-kernel /boot/acrn.32.out multiboot --quirk-modules-after-kernel /boot/acrn.32.out
module /boot/zephyr.bin xxxxxx
module /boot/zephyr.bin XXXXXX
module /boot/bzImage yyyyyy module /boot/bzImage yyyyyy
} }
.. note:: The module ``/boot/zephyr.bin`` is VM0(Zephyr) kernel file,
param ``xxxxxx`` is VM0s kernel file tag and must exactly match the ``kernel_mod_tag`` .. note:: The module ``/boot/zephyr.bin`` is the VM0 (Zephyr) kernel file.
of VM0 which configured in file ``hypervisor/scenarios/hybrid/vm_configurations.c``. The param ``xxxxxx`` is VM0s kernel file tag and must exactly match the
The multiboot module ``/boot/bzImage`` is Service VM kernel file, param ``yyyyyy`` ``kernel_mod_tag`` of VM0 which is configured in the ``hypervisor/scenarios/hybrid/vm_configurations.c``
is the bzImage tag and must exactly match the ``kernel_mod_tag`` of VM1 in file file. The multiboot module ``/boot/bzImage`` is the Service VM kernel
``hypervisor/scenarios/hybrid/vm_configurations.c``. file. The param ``yyyyyy`` is the bzImage tag and must exactly match the
The kernel command line arguments used to boot the Service VM is located in header file ``kernel_mod_tag`` of VM1 in the ``hypervisor/scenarios/hybrid/vm_configurations.c``
``hypervisor/scenarios/hybrid/vm_configurations.h`` and configured by `SOS_VM_BOOTARGS` MACRO. file. The kernel command line arguments used to boot the Service VM are located in the header file ``hypervisor/scenarios/hybrid/vm_configurations.h``
and are configured by the `SOS_VM_BOOTARGS` macro.
#. Modify the ``/etc/default/grub`` file as follows to make the GRUB menu #. Modify the ``/etc/default/grub`` file as follows to make the GRUB menu
visible when booting: visible when booting:
@ -72,31 +63,30 @@ Update Ubuntu GRUB to Boot hypervisor and Load Kernel Image
# GRUB_HIDDEN_TIMEOUT=0 # GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=false GRUB_HIDDEN_TIMEOUT_QUIET=false
#. Update grub:: #. Update GRUB::
$ sudo update-grub $ sudo update-grub
#. Reboot the NUC. Select the **ACRN hypervisor Hybrid Scenario** entry to boot #. Reboot the NUC. Select the **ACRN hypervisor Hybrid Scenario** entry to boot
the ACRN hypervisor on the NUCs display. The GRUB loader will boot the the ACRN hypervisor on the NUCs display. The GRUB loader will boot the
hypervisor, and the hypervisor will start VMs automatically. hypervisor, and the hypervisor will start the VMs automatically.
Hybrid Scenario Startup Checking Hybrid Scenario Startup Checking
******************************** ********************************
#. Use these steps to verify the hypervisor is properly running: #. Use these steps to verify that the hypervisor is properly running:
a. Login ACRN hypervisor shell from serial console. a. Log in to the ACRN hypervisor shell from the serial console.
#. Use the vm_list check pre-launched VM and Service VM are launched successfully. #. Use the vm_list command to verify that the pre-launched VM and Service VM are launched successfully.
#. Use these steps to verify all VMs are running properly: #. Use these steps to verify all VMs are running properly:
a. Use the ``vm_console 0`` to switch to VM0(Zephyr)s console, it will show a. Use the ``vm_console 0`` to switch to VM0 (Zephyr) console. It will display **Hello world! acrn**.
a string of **Hello world! acrn**. #. Enter :kbd:`Ctrl+Spacebar` to return to the ACRN hypervisor shell.
#. Use a :kbd:`Ctrl+Spacebar` to return to the ACRN hypervisor shell. #. Use the ``vm_console 1`` command to switch to the VM1 (Service VM) console.
#. Use the ``vm_console 1`` to switch to VM1(Service VM)s console. #. Verify that the VM1s Service VM can boot up and you can log in.
#. The VM1s Service VM could boot up and login in. #. ssh to VM1 and launch the post-launched VM2 using the ACRN device model launch script.
#. SSH to VM1 and Launch post-launched VM2 by ACRN device model launch script. #. Go to the Service VM console, and enter :kbd:`Ctrl+Spacebar` to return to the ACRN hypervisor shell.
#. Back to Service VM console, use a :kbd:`Ctrl+Spacebar` to return to the ACRN hypervisor shell. #. Use the ``vm_console 2`` command to switch to the VM2 (User VM) console.
#. Use the ``vm_console 2`` to switch to VM2(User VM)s console. #. Verify that VM2 can boot up and you can log in.
#. The VM2 could boot up and login in.
Refer to the :ref:`acrnshell` user guide for more information about available commands. Refer to the :ref:`acrnshell` for more information about available commands.