OS installation procedure consists of the following steps:
- The system generates the values for parameters and macros for the OS template. Learn more in OS template macros.
- Installs the operating system on the server.
- Copies and starts the recipes on the server via SSH.
OS installation steps for Linux, Windows and FreeBSD are described below:
Linux
The OS installation process includes the following steps:
- VMmanager configures a virtual machine to start the installation script. Every template has a number of reboots that can be made before the system will consider the operating system to be installed.
- Starts the virtual machine.
- The installation script receives values of OS template macros from VMmanager.
- The system adds the counter of remaining reboots before the OS installation completes, into the vm table of the database.
- The virtual machine is suspended so that it won't stop during reboot.
- The script installs an operating system.
- The script reboots and suspends the virtual machine.
- vmwatch-node on the cluster nodes retrieves the information that the virtual machine was suspended from libvirtd and sends the corresponding notification to vmwatch-master.
- vmwatch-master processes the information and calls the API function vm.event. The function parameters contains the cluster node ID, the VM name, type and subtype of the event..
- VMmanager executes the function vm.event and analyses the received data. If the OS installation mark is specified in the VM database, VMmanager performs the following operations:
- Decreases the reboot counter.
- If the reboot counter is 0: it will change the configuration of the virtual machine so that the next reboot will be performed from the main disk; deletes the indication of OS installation for the virtual machine.
- Starts the virtual machine.
- If the reboot counter is not 0: the system will repeat the steps starting from Step 4.
Windows
The OS installation process includes the following steps:
- Deploys the ready image of the installed operating system. The script C:\vmmgr\firstrun.cmd will run during the auto-start.
- The system starts the virtual machine.
- Mounts the 1 MB virtual disk that contains the configuration script.
- Starts the firstrun script and using the dd utility reads the configuration script from the mounted virtual disk.
- The configuration script starts and configured the virtual machine.
- Reboots the virtual machine.
FreeBSD
The OS installation process includes the following steps:
- Deploys the modified image of the installation disk bootonly.iso.
- Starts the virtual machine.
- Adds the first start script into the auto-boot file /etc/rc.local.
- Mounts the 1 MB virtual disk that contains the configuration shell-script.
- The first start sctipt reads the configuration of the mounted virtual disk and saves it into /tmp/install.sh.
- The configuration script starts and configured the virtual machine.
- Reboots the virtual machine.