How to Prepare VM for Testing in SPB Labs (UEFI)

Step1. VM Settings

  1. The virtual machine with the following parameters is required for testing purposes:

  • 4 CPUs

  • 8Gb memory

  • 30Gb hdd (and 3x8Gb for zfs tests)

In SPB Labs you can access VMs here.

2. You can select a free IP address for your VM on this page - https://dilos-dev.atlassian.net/wiki/spaces/AL/pages/1936326753, for example:

As you see, on this page addresses 127 and 138 are free. They will look like this: 10.20.50.127 and 10.20.50.138 respectively. Store this address and write your machine name on the right of the address.

3. On the vSphere page open the menu of you machine and change it’s settings (Edit Settings… item):

Select please an ISO-file (the Datastore ISO file menu item) to install DilOS:

Select version with UEFI support you would like to set as a base version - for example, the last one:

Set the Connected At Power On checkbox to connect ISO-file automatically on power on:

As you see ISO-file emulates CD-ROM on VM, and you need to boot from CD-ROM. To do this the BIOS screen should be loaded first on power on. In the Firmware select please EFI. To emulate running of EFI you have to select the During the next boot, force entry into the setup screen checkbox on the VM Options page in Boot Options :

Step 2. Run VM

  1. Run your VM by clicking the Power | Power On menu item:

2. On start open Web Console and inside the BIOS screen select please CD-ROM Drive as the first boot device. Then save this setting and exit.

3. Then on the Boot Manager page select (using +/- for moving up/down) EFI Vmware Virtual IDE CDROM Drive item and press ENTER.

Step 3. DilOS Installation

After booting from the selected ISO-file the GRUB menu is opened. Select please the Boot Multi User item and press Enter

Then follow the instruction on the screen - login as root with 123 password.

In this case you have to remove the tnf driver. You can know the package name by issuing the command:

dpkg -l | grep tnf

Then remove it by:

apt remove --purge system-tnf

The DilOS installer is running by the screen command:

screen

Then follow the instructions on the screen. The system detects available network links, choose a number of link that you want to use as the primary interface of the system and hit Enter/Return key

Select the static method Using static IPv4:

and enter the IP-address that has been taken on Step 1 item 2 (for example, 10.20.50.117), a netmask 255.255.255.0 and the gateway address (in SPB Labs it is 10.20.50.199) and confirm your settings. You can change everything later if you’d like.

In some cases (on a big storage platforms, for example) we need to change MTU (Maximum Transmission Unit), in this screen you can do it. But don't change it if you don't know what you are doing! Just skip this step.

Now you should setup a password for the root user.

Root is the system administrator, this user can do everything, install/update/remove packages, edit configuration files and many other actions. Be careful using this account and don't forget the password!

Don't worry if you mistyped, the system will ask you again. Now create your own account (for example, og). You can work with it under ssh as well - enter your login and password please:

Now choose a node (host) name. Enter it if you need something special (it can make a little bit easier you work with tests further if you put the same name as a name of the machine in vSphere), otherwise leave it as is by pressing Enter and confirm your choice:

You can now enter any domain name if you plan to connect your VM to any domain. Otherwise leave it as is just by pressing Enter:

The nameserver address in SPB Labs is 8.8.8.8 and the second one is 8.8.4.4. These addresses will be used by default, so you can just leave them as is. The Search list can be empty as well. You can change it later if needed.

Then the installer detects of connected storage devices (hard drives). The list can be very long or it can have the only device. Just choose a device where you want to to install the system to. For 4-HDDs configuration (for zfs tests) select the biggest device.

Then select please the UEFI boot method:

Confirm you settings finally:

Then installation process goes on. It may take a time. During the process you will see many logs. And on the final screen just Enter for reboot.

Step 4. Booting of Just Installed System.

After reboot the newly installed system will be loaded by default.

After this you will be able to login to your VM not only by Web Console, but via SSH with your account that has been created on installation (in our example it is og).

Step 5. Apt Settings, BEs Creation and Open VM Tools Installation

All other actions require a root access. So, login under the root account:

Now you have to create a backup BE with an image of the already installed system to use as a system source, in other words you will be able to skip all steps of this instruction from the beginning to the current point:

just execute the following commands:

After reboot the original system installed previously from the ISO file will be loaded.

Then update apt settings:

After this the system is ready to install Open VM Tools. Login as root and enter please the command:

Run Open VM Tools after successful installation:

Reboot VM:

You should see your IP addresses in vSphere for your VM if everything is OK.

Note : While there is no any new tested stable version, you can use this BE as a base BE. In other words you can skip all steps from the beginning of this instruction to the current point. To do this execute the following command like you did it for dilos_ISO_orig:

beadm create dilos_BASE

When you later will boot from this BE type the following commands:

beadm activate dilos_BASE

reboot

execute please the beadm list command:

Step 6. Prepare VM for Tests Running

Prepare your VM for tests running (again all commands should be run under the root account). To login as root you can use su command:

  1. Install a DilOS version that you plan to test. To do this please put repositories addresses for apt like you did it before. Put the following rules to the /etc/apt/sources.list file for RELEASE versions:

You can do it with any text editor or by executing the following command:

 For DEBUG versions they are:

or:

Then run system upgrade:

os-upgrade tool is intended for the new BE creation, that will contain the latest DilOS version from repositories whose addresses are placed to the/etc/apt/sources.list file.

Command format:

When running without any option this tool tries to create the new BE with a version name from a repository. For example, dilos_2.0.2.96 or dilos_2.0.3.8-20221221-1-0+int2. So, if you try to upgrade to a version that has been previously installed to this VM, you can force to remove this version and to install the new one over it:

Or you can leave existing BE as is, but name the new one with another name. For example, if dilos_2.0.2.96 already exists:

To reboot after upgrade just use the -r option:

 

After reboot login again under the root account.

If the test version is not loaded by any reason you can see its file like it is described here.

Check that upgrade was successful by entering the following command:

2. Now you can use a script or do the following steps. Create user ztest:

with the DEBUG version install certificates please:

and reboot to the new BE:

After reboot login again to the root account.

3. Configure NAT according the How to configure NET on Virtual Machine for global zone with etherstub instruction until zone creation.

Step 7. Test Zones Creation

For steps 1-3 you can run the script or do steps 1-3 with checks.

  1. Create the mountpoint to mount all zones:

2. First create and run dhcp zone:

You can check that zone was installed successfully by entering the following command:

3. Login to the zone, check addresses and install and run dhcp-server:

4. Now create the client zone if you need it (here is just an example of the client zone - most likely you need any other zone or even multiple zones):

If everything is OK, your VM is ready to run tests. Enjoy!