|
|
## Description
|
|
|
Using LXD Containers to simple & quick create virtualhosts for Oniro testing.
|
|
|
Using LXD Containers to simple & quick create full-system containers for testing Oniro.
|
|
|
|
|
|
LXD solution is lightweight and does not burden your system like classic virtual machine.
|
|
|
|
|
|
Unlike to Docker it can be usable as full working virtual system in container.
|
|
|
|
|
|
## Intruction
|
|
|
## Instruction
|
|
|
1. Installation and setup of LXD
|
|
|
``` bash
|
|
|
sudo snap install lxd
|
|
|
lxd init # setup size of storage, 120GB is recomended for building tests
|
|
|
lxd init # setup size of storage, 120GB is recommended for building tests
|
|
|
# Size in GB of the new loop device (1GB minimum) [default=30GB]: 120
|
|
|
# Keep default values for others settings
|
|
|
```
|
... | ... | @@ -20,12 +20,12 @@ lxc profile copy default onirotest-profile |
|
|
lxc profile edit onirotest-profile
|
|
|
```
|
|
|
3. Insert settings below to lxc profile
|
|
|
``` bash
|
|
|
``` yaml
|
|
|
config:
|
|
|
user.user-data: |
|
|
|
#cloud-config
|
|
|
npackage_upgrade: true
|
|
|
npackages:
|
|
|
package_upgrade: true
|
|
|
packages:
|
|
|
- htop
|
|
|
- gawk
|
|
|
- wget
|
... | ... | @@ -34,23 +34,23 @@ config: |
|
|
- unzip
|
|
|
- texinfo
|
|
|
- gcc-multilib
|
|
|
- build-essential.
|
|
|
- chrpath.
|
|
|
- socat.
|
|
|
- cpio.
|
|
|
- python3.
|
|
|
- build-essential
|
|
|
- chrpath
|
|
|
- socat
|
|
|
- cpio
|
|
|
- python3
|
|
|
- python3-pip
|
|
|
- python3-pexpect
|
|
|
- xz-utils.
|
|
|
- debianutils.
|
|
|
- iputils-ping.
|
|
|
- python3-git.
|
|
|
- python3-jinja2.
|
|
|
- libegl1-mesa.
|
|
|
- xz-utils
|
|
|
- debianutils
|
|
|
- iputils-ping
|
|
|
- python3-git
|
|
|
- python3-jinja2
|
|
|
- libegl1-mesa
|
|
|
- libsdl1.2-dev
|
|
|
- pylint3
|
|
|
- xterm..
|
|
|
- file.
|
|
|
- xterm
|
|
|
- file
|
|
|
- zstd
|
|
|
users:
|
|
|
- default
|
... | ... | @@ -61,7 +61,7 @@ config: |
|
|
plain_text_passwd: 'onirotest'
|
|
|
home: /home/onirotest
|
|
|
shell: /bin/bash
|
|
|
lock_passwd: True
|
|
|
lock_passwd: true
|
|
|
gecos: Ubuntu
|
|
|
groups: [plugdev, dip, netdev, root, sudo]
|
|
|
```
|
... | ... | @@ -113,7 +113,7 @@ Now you can use new virtualhost to testing any things. |
|
|
|
|
|
You can also simple create new containers using `lxc launch ubuntu:20.04 name_of_your_new_container -p onirotest-profile` or continue work in previous container.
|
|
|
|
|
|
to check runnig containers please use `lxc list`
|
|
|
To check running containers please use `lxc list`
|
|
|
``` bash
|
|
|
➜ ~ lxc list
|
|
|
+-------------+---------+-----------------------+-----------------------------------------------+-----------+-----------+
|
... | ... | |