How to Prepare VM for Testing in SPB Labs
Step1. VM Settings
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
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:
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. To run the BIOS screen on the VM Options tab select please the Boot Options | During the next boot, force entry into the setup screen check box:
Step 2. Run VM
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.
Step 3. DilOS Installation
After booting from the selected ISO-file the GRUB menu is opened. Select please the Install dilos item
Then follow the instruction on the screen - login as root with 123 password.
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, 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. 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.
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.
First of all you have to boot from the hard drive where the new system is installed (as you remember now the first device is CD-ROM). To do this go to the VM Options tab and select please the Boot Options | During the next boot, force entry into the setup screen check box if it is cleared as you did it on the Step 1.
Reboot your VM with Power | Reset menu item, launch Web Console and put the Hard Drive item to the first position like this:
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.
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:
Next you have to set the latest tested stable version as a base DilOS version, over which all other (test) versions will be installed further. You have to make settings for apt. To do this a /etc/apt/sources.list
file should be updated.
You should put there an address where the latest tested stable versions of DilOS are placed:
You can do it with any text editor or by executing the following command:
Then update apt settings:
Update os-upgrade package and run os upgrade:
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
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:
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 again:
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:
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.
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!