Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Important! Zones must be placed to the /zones directory like dhcp zone.

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
languagebash
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
languagebash
apt download socat

In (for the current version, the name of the downloaded file is socat_1.7.3.1-2+deb9u1+dilos2_solaris-i386.deb

...

) and install it into the zones:

Code Block
languagebash
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
titleTo understand that dynamic address is received,

for example, for cz zone you can with the command:

Code Block
sudo zlogin -l root cz ifconfig

You will get an answer like this:

Code Block
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
int0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 9000 index 2
        inet 192.168.0.100 netmask ffffff00 broadcast 192.168.0.255
        ether 2:8:20:f1:af:75 
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
        inet6 ::1/128 

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.

...