Copy of How to run net tests
Setup VM with:
CPU - 4
Memory - 8GB
Hard disk - 100GB
Have to use DEBUG build, where we have debug macro
Create user:
sudo useradd -m -d /var/ztest -g staff -s /bin/bash ztest
# add password for remote ssh
sudo passwd ztest
Add user to sudo:
echo "ztest ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers.d/ztestInstall packages for net tests:
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:
sudo zfs create -o mountpoint=/zones rpool/zonesConfigure zones
The zone configuration should be considered for the cz zone, for other zones, the setting is the same:
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.cfgInstall and run zones (example for zone cz):
sudo zoneadm -z cz install
sudo zoneadm -z cz bootInstall 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:
apt download socatIn 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):
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.debLaunch tests:
sudo /opt/net-tests/bin/nettestWait for several minutes and have found full logs at:
/var/tmp/test_results/<ISO TIME>