Setup VM with:
CPU - 4
Memory - 8GB RAM2GB swap
Hard disk - 100GB
Have to use DEBUG build, where we have debug macro
Create user:
Code Block |
---|
sudo useradd -m -d /var/ztest -g staff -s /bin/bash ztest
# add password for remote ssh
sudo passwd ztest
|
Add user to sudo:
Code Block |
---|
echo "ztest ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers.d/ztest |
Install packages for net tests:
Code Block |
---|
sudo apt update
sudo apt install system-test-nettest testrunner python
|
Login by user ztest and create zones:
Zones must be created according to the file:
/opt/net-tests/config/ip_forwarding.config
Currently accepted names: cz, sz, rz
Important! Zones must be in the / zones directory
Create dataset:
Code Block |
---|
|
sudo zfs create -o mountpoint=/zones rpool/zones |
The zone configuration should be considered for the cz zone, for other zones, the setting is the same:
Code Block |
---|
|
cat>cz.cfg <<EOT
create
set zonepath=/zones/cz
set autoboot=true
set ip-type=exclusive
commit
exit
EOT
sudo zonecfg -z cz -f cz.cfg |
Install and run zones (example for zone cz):
Code Block |
---|
sudo zoneadm -z cz install
sudo zoneadm -z cz boot |
Install the socat package for every zone:
The zones have not configured net, need to install it from the global zone.
Download it in the global zone:
Code Block |
---|
|
apt download socat |
In the current version, the name of the downloaded file is socat_1.7.3.1-2+deb9u1+dilos2_solaris-i386.deb
Install into the zones (example for zone cz):
Code Block |
---|
|
sudo apt -y -o Dir = /zones/cz/root update
sudo apt -y -o Dir = /zones/cz/root upgrade
sudo dpkg -i --root = /zones/cz/root socat_1.7.3.1-2+deb9u1+dilos2_solaris-i386.deb |
Launch tests:
Code Block |
---|
|
sudo /opt/net-tests/bin/nettest |
...