ACRN Sample App - projectacrn/acrn-hypervisor GitHub Wiki

Proposal for an ACRN Sample App

Introduction

The Getting Started Guide is the document of reference to set up ACRN on a system. It is designed to take the user through the entire process of starting from a bare system with no Operating System installed to one running ACRN and an Ubuntu-based Service VM. It also includes some basic steps to bring up a User VM based on Ubuntu but this is where it stops. Wouldn't it be nice to also have some sample app available that can demonstrate ACRN in action? ;-)

Objective

Provide an "ACRN Sample App" that can easily and quickly be set up by users and that demonstrates ACRN functionality in a limited, real-world context.

Evaluation criteria:​

  • Ease of use and usefulness: Measured by the OOB DX metric that comprehends usability, usefulness, learnability and other characteristics of the sample app.​
  • Minimal set-up time: if the Getting Started Guide takes about 2 hours, our goal for the sample should be about 1 hour with a maximum of 2 hours.​
  • Demonstrate ACRN is functional with limited, simulated context but one that maps to real-world ACRN application ​
  • Universal (no HW dependency)​
  • Demonstrate ACRN unique feature in delivering real-time VMs​
  • Expandable learnings: users can take the learnings and apply them to another ACRN application

Proposal #1

The current thinking is to show the scenario described in the picture below. There are two post-launched User VMs in this set-up, one Real-Time VM (aka RTVM) and one standard VM. A brief description of both User VMs is included immediately following the picture.

ACRN-Sample-App

  1. Post-launched RTVM​
  • Based on Zephyr​
  • Uses ivshmem to communicate with other Post-launched User VM​
  • Zephyr shell available from Service VM terminal (no serial port needed)​
  • Runs Cyclictest​ and a shell
  • Self-contained executable script​
    • Embeds launch script and Zephyr binary image​
      • Note: it is highly desirable to be able to provide a pre-compiled Zephyr image else we need to walk the user through the installation of the Zephyr development tools which will increase the time and effort and is not directly beneficial to the learning experience for ACRN.
    • Can be run on standard shared.xml scenario
  1. Post-launched User VM​
  • Based on Ubuntu​
  • Collects performance data (cyclictest) from RTVM over ivshmem
  • Runs Visualization UI​
  • Visualization tool (UI): could be web-based, but need to make sure the graphical environment is available to the User VM​.
    1. Alternative #1: Text-based visualization tool (if such thing exists)?
    2. Alternative #2: run the visualization tool in the Service VM directly

Proposal #2

ACRN-Sample-App-2

  1. Post-launched RTVM​
  • Based on Ubuntu (20.04)
  • Kernel with PREEMPT_RT patch
  • Uses ivshmem to communicate with other Post-launched User VM​
  • Runs cyclictest​ and a shell
    • Can be run on standard shared.xml scenario
  1. Post-launched User VM​
  • Based on Ubuntu​
  • Collects performance data (cyclictest) from RTVM over ivshmem
  • Runs Visualization UI​
  • Visualization tool (UI): could be web-based, but need to make sure the graphical environment is available to the User VM​.
    1. Alternative #1: Text-based visualization tool (if such thing exists)?
    2. Alternative #2: run the visualization tool in the Service VM directly

Opens

There are some open questions that we need to evaluate and consider:

  • Do we prefer to also include steps for the user to modify the scenario? The current thinking (i.e. @gvancuts personal thoughts ;-)) is to use the existing shared.xml scenario so as to not force the user to re-configure, re-build and re-install ACRN as he's just done that.
  • Could we provide a complete virtual disk image for the Ubuntu-based User VM?
  • Same question for the Ubuntu RTVM?
  • Where do we host the Zephyr application (Cyclictest + shell) that we will use?

Zephyr

Are those components available today:

  1. Shell - Yes
  2. ivshmem - Yes
  3. Cyclictest - No

Glossary

  • OOB: Out Of the Box
  • DX: Developer eXperience
  • UX: User eXperience