Skip to content

User Guide

Yadong edited this page Apr 10, 2024 · 13 revisions

Verified on:

Hardware: KBL-NUC/CML-NUL
OS: Ubuntu18.04/Ubuntu20.04

Tutorial

1. Prerequisites setup for Host Environment

Download celadon release, e.g.: CIV_00.20.02.24_A10

$ mkdir ~/setup/
$ #Put release tarball under ~/setup/.
$ cd ~/setup
$ tar zxvf caas-releasefiles-${build_variant}.tar.gz
$ sudo -E ./scripts/setup_host.sh

2. Create a new folder to hold guest specified resources

$ mkdir ~/caas1
$ cp ~/setup/OVMF.fd ~/caas1/
$ mkdir -p ~/caas1/vtpm0

3. Install vm-manager

Method 1 -- Download release package

$ sudo apt-get install ./vm-manager_vx.y.z_$OS_VER.deb #or sudo dpkg -i vm-manager_vx.y.z_$OS_VER.deb && sudo apt-get -f install

Method 2 -- Build and install from source:

$ #Get source code from https://github.com/projectceladon/vm_manager.git
$ sudo apt-get install --yes make libglib2.0-dev libncurses-dev libuuid1 uuid-dev libjson-c-dev devscripts build-essential lintian debhelper
$ debuild -b -uc -us
$ sudo dpkg -i ../vm-manager-x.y.z_*.deb #or sudo apt-get install ../vm-manager-x.y.z_*.deb

4. Usages

civ@civ-NUC7i7DNHE:~$ vm-manager -h
Usage:
  vm-manager [-c] [-d vm_name] [-b vm_name] [-q vm_name] [-f vm_name] [-u vm_name] [--get-cid vm_name] [-l] [-v] [-h]
Options:
  -h [ --help ]         Show this help message
  -c [ --create ] arg   Create a CiV guest
  -b [ --start ] arg    Start a CiV guest
  -q [ --stop ] arg     Stop a CiV guest
  -f [ --flash ] arg    Flash a CiV guest
  --get-cid arg         Get cid of a guest
  -l [ --list ]         List existing CiV guest
  -v [ --version ]      Show CiV vm-manager version
  --start-server        Start host server
  --stop-server         Stop host server
  --daemon              start server as a daemon

5. Create a new CiV

Create/modify ini file directly:

  • create folder to store civ config file
$ mkdir -p ~/.intel/.civ/
  • create config file

For example, you want to name your civ instance as civ-1, then you need to create civ-1.ini under ~/.intel/.civ/

$ touch ~/.intel/.civ/civ-1.ini
  • modify config file as your wish

Follow the sample ini to config your civ instance: civ-1.ini

And refer fields description: Fields

6. Flash virtual disk if required

If the virtual disk image is already flashed, you can skip this step.

$ vm-manager -f civ-1

7. Start Guest

$ sudo vm-manager -b civ-1

8. List Guests

$ sudo vm-manager -l

9. Stop Guest

This command will force to quit the guest

$ sudo vm-manager -q civ-1

10. Other useful commands

Import an existing config file
$ vm-manager -i civ2.ini
Delete a CiV config
$ vm-manager -d civ-1
Update/Modify a CiV config
$ vm-manager -u civ-1