User Guide - YadongQi/vm_manager GitHub Wiki

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-userdebug.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/

3. Install vm-manager

Method 1 -- Download release package

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

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
$ 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] [-i config_file_path] [-d vm_name] [-b vm_name] [-q vm_name] [-f vm_name] [-m vm_name] [-l] [-v] [-h]
Options:
        -c, --create
                Create a new CiV guest
        -i, --import
                Import a CiV guest from existing config file
        -d, --delete
                Delete a CiV guest
        -b, --start
                Start a CiV guest
        -q, --stop
                Stop a CiV guest
        -f, --flash
                Flash a CiV guest
        -u, --update
                Update an existing CiV guest
        -l, --list
                List existing CiV guest
        -v, --version
                Show CiV vm-manager version
        -h, --help
                Show this help message

5. Create a new CiV

$ vm-manager -c

Fill all required fields and save. (currently flashfiles and extra fields are optional, all other fields must be filled) Example: TUI

After SAVE, a ini file will be created under ~/.intel/.civ/civ-1.ini

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