Go to the table of contents Go to the previous page Go to the next page View or print as PDF
Scripts
The VM installation involves 2 scripts:
*
*
The first script (lastline-virt) is configured to be executed as a service upon first boot. The main purpose of this script is to kick off the installation script and detach it from the execution shell, ensuring the OS does not kill the installation service when enforcing the Linux time limit for starting services.
After the child script is detached, the parent removes itself from the list of services so it does not run again in the future. Then, it finishes execution and exits with a success code to let the OS know everything went well, while the actual installation of the VM is still in progress running in the background.
The second script (lastline-virt-install) performs the actual creation/installation of the VM.
Installation steps
The lastline-virt-install script creates the VM, installs the Lastline Manager software, configures DHCP in the host system, and updates the VM configuration. It executes as follows:
1.
The lastline-virt-install script runs the virt-install tool as a detached command (notice the parentheses and the '& disown' at the end) to create the VM and install the Lastline software in a single step as described below:
(virt-install --virt-type=kvm --name tmp_lastline --ram 49152 --vcpus=12 --os-variant=ubuntu14.04 --hvm --network=bridge=virbr0,model=virtio --graphics vnc --disk path=/data/lastline.raw,size=4096,bus=ide,format=raw,cache=none,io=native --cdrom=/data/ISO/branded_lastline-manager-725~6-6547-39c4616.iso --wait=60 --noautoconsole >> ${LOGFILE} 2>&1 & disown)
The installation process takes approximately 20 minutes to complete. No output is generated since all activity is happening inside the guest VM.
NOTE: We use the IDE driver for the virtual disk because the guest system cannot detect disks running with the high performance virtual driver (virtio). Ubuntu's 14.04 installation scripts cannot see drives that are named vda as required by the virtio driver. Only sda and hda are supported by the scripts. We update the VM configuration to use the right driver (virtio) in step 4 below, after the installation is complete.
2.
3.
4.
5.
6.

Go to the table of contents Go to the previous page Go to the next page View or print as PDF
Copyright 2019 Forcepoint. All rights reserved.