...
Code Block | ||
---|---|---|
| ||
sudo apt update
reboot
sudo apt install system-test-nettest testrunner python3 |
...
Note |
---|
Important! Zones must be placed to the |
You can use the installation script or do the following steps.
First configure and install template zones cz-orig, sz-orig and rz-orig, from which test zones will be created later:
Code Block |
---|
ztest@dilos:~# cat > cz-orig.cfg <<EOT create set zonepath=/zones/cz-orig set autoboot=false set ip-type=exclusive add net set physical=int1 set global-nic="vsw0" add property (name="ip",value="dhcp") add property (name="primary",value="true") end commit exit EOT ztest@dilos:~# sudo zonecfg -z cz-orig -f cz-orig.cfg && sudo zoneadm -z cz-orig install 2>&1 | /usr/bin/tee -a /var/tmp/cz-orig-bts.log ztest@dilos:~# cat > sz-orig.cfg <<EOT create set zonepath=/zones/sz-orig set autoboot=false set ip-type=exclusive add net set physical=int2 set global-nic="vsw0" add property (name="ip",value="dhcp") add property (name="primary",value="true") end commit exit EOT ztest@dilos:~# sudo zonecfg -z sz-orig -f sz-orig.cfg && sudo zoneadm -z sz-orig install ztest@dilos:~# cat > rz-orig.cfg <<EOT create set zonepath=/zones/rz-orig set autoboot=false set ip-type=exclusive add net set physical=int3 set global-nic="vsw0" add property (name="ip",value="dhcp") add property (name="primary",value="true") end commit exit EOT ztest@dilos:~# sudo zonecfg -z rz-orig -f rz-orig.cfg && sudo zoneadm -z rz-orig install |
Now configure test zones. The following is the configuration for the cz zoneYou can check that zone instillation procedure was successfully by entering the following command:
Code Block | ||
---|---|---|
| ||
ztest@dilos:~# cat > cz.cfg <<EOT create set zonepath=/zones/cz set autoboot=false set ip-type=exclusive add net set physical=int1 set grep -e 'WARNING:' -e 'warning:' -e 'W:' -e 'error:' -e 'ERROR:' /var/tmp/cz-orig-bts.log | sort -u |
Now configure test zones. The following is the configuration for the cz zone:
Code Block | ||
---|---|---|
| ||
ztest@dilos:~# cat > cz.cfg <<EOT
create
set zonepath=/zones/cz
set autoboot=false
set ip-type=exclusive
add net
set physical=int1
set global-nic="vsw0"
add property (name="ip",value="dhcp")
add property (name="primary",value="true")
end
commit
exit
EOT
ztest@dilos:~# sudo zonecfg -z cz -f cz.cfg |
...
Code Block | ||
---|---|---|
| ||
ztest@dilos:~# cat > rz.cfg <<EOT create set zonepath=/zones/rz set autoboot=false set ip-type=exclusive add net set physical=int3 set global-nic="vsw0" add property (name="ip",value="dhcp") add property (name="primary",value="true") end commit exit EOT ztest@dilos:~# sudo zonecfg -z rz -f rz.cfg |
...
Install the socat package for every template zone
The zones have not configured net, need to install it from the global zone. Download
...
the package inside 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
...
Info |
---|
Note: After downloading you can know the name of the package by the command:
|
Install it into the zones:
Code Block | ||
---|---|---|
| ||
sudo apt -y -o Dir=/zones/cz-orig/root update sudo apt -y -o Dir=/zones/cz-orig/root upgrade sudo dpkg -i --root=/zones/cz-orig/root socat_1.7.3.1-2+deb9u1+dilos2_solaris-i386.*.deb sudo apt -y -o Dir=/zones/sz-orig/root update sudo apt -y -o Dir=/zones/sz-orig/root upgrade sudo dpkg -i --root=/zones/sz-orig/root socat_1.7.3.1-2+deb9u1+dilos2_solaris-i386.*.deb sudo apt -y -o Dir=/zones/rz-orig/root update sudo apt -y -o Dir=/zones/rz-orig/root upgrade sudo dpkg -i --root=/zones/rz-orig/root socat_1.7.3.1-2+deb9u1+dilos2_solaris-i386*.deb sudo reboot |
...
4. Login by user ztest and run tests
Check that dhcp zone and server are running after reboot and run test zones and tests:
...
Expand | ||||
---|---|---|---|---|
| ||||
for example, for cz zone you can with the command:
You will get an answer like this:
First it can be empty, then with inet 0.0.0.0address for int0 interface here, and then with real received address - here it is inet 192.168.0.100. The same way you can use for sz an rz zones as well. |
...
Info |
---|
Note : You can run the test using a shell script. It can be created with any text editor or by executing the following command:
You can run the test script in a single mode, i.e. all tests will be executed once ( |
...
. It will contain information in the format that is used in Test Results. |
...