Skip to content

Create an LTSP19 testing environment in VirtualBox

Rudy Gevaert edited this page Aug 22, 2020 · 12 revisions

Goal

Set up a virtual machine to test/explore an LTSP setup on an Ubuntu 18.04 computer. These instruction are specific to using VirtualBox as the VM software, Ubuntu 18.04 Desktop as both the host and guest operating systems and using the "2-NIC" ie "dual-NIC" approach. [There are 2 common networking approaches to run LTSP in a classroom, this 2-NIC setup allows for the classroom clients to be isolated from the building's network (the WAN) yet still access its resources.]

Overview

Directions are provided below this "Overview" section. Basically you will:

  1. Install/Setup VirtualBox software
  2. Create the initial virtual machine (VM)
  3. Install Ubuntu Desktop [you may want to start to download current iso now]
  4. Update VM settings
  5. Transform the basic Desktop to be the LTSP server.
  6. Create a second VM to serve as a client
  7. Test client

Instructions

1. Setting up VirtualBox

You can install via the Ubuntu repositories, adequate for the purposes of this testing:

sudo apt update
sudo apt install virtualbox virtualbox-ext-pack

There are plenty of good pages out there with ample explanatory text on installing VirtualBox.

2. Create (virtual) Teacher Computer

  1. Launch VirtualBox (eg with the command: 'virtualbox' or use a launcher)
  2. Click "New" and follow the steps to create the "virtual computer" on which you'll install Ubuntu Desktop 64 -- the teacher computer (which will server as the LTSP server).
  3. While you use various settings on this VM,
  • Use at least 2 GB of RAM
  • Set a single network connector to "NAT" (allowing the VM to access the network resources of the host machine).

3. Install Ubuntu on the virtual Teacher Computer

  1. Download current iso of 64 bit Ubuntu 18.04, Desktop.
  2. Install Ubuntu from the .iso on your 'new computer' (i.e. virtual machine (VM), aka "teacher computer" or "LTSP server").
  3. You may want to add ssh capability to this server at this point: sudo apt install openssh-server.
  4. Note you will not be able to ssh to the VM directly from the host computer but instead from other computers on the local network. However, by first ssh'ing into another computer, one can then ssh back into the VM.
  5. Run updates: sudo apt update && sudo apt dist-upgrade
  6. Shut down the VM so as to adjust the VirtualBox settings.

4. Update the VM's VirtualBox settings & then update the VM's settings

  1. Add another network adapter to this VM: select "Adapter 2" and checked the "enable network adapter.
  2. Attach it to "Internal Network", NOT bridged, otherwise it will offer pxe booting to the external network.
  3. Start the VM. Open Network Manager, find the new NIC, click on the IPv4 tab and adjust it to the following configuration: DHCP to Manual with Address to 192.168.67.1, Netmask to 255.255.255.0 and leave the Gateway empty. (Entering 0.0.0.0 will not work.)
  4. You may want to reboot the VM. It is now ready to install the LTSP software.

In the past there were issues with GNOME desktop (gdk3) and Epoptes, you may want to install and select lightdm:

sudo apt install lightdm
(During installation there's a config question, select, "OK", then select, "lightdm".)

5. Transform basic Ubuntu install --> LTSP server

  1. Follow the installation directions on the LTSP19 Installation page.

  2. Note, for "Network Configuration" follow the directions for the dual NIC approach (ltsp dnsmasq --proxy-dhcp=0). This setting prevents peers on the LAN from booting via ltsp19!

  3. Copy the example ltsp.conf: cp /usr/share/ltsp/common/ltsp/ltsp.conf /etc/ltsp/ and make sure it has NAT=1 under the [server] section.

  4. Likewise, as this is a chrootless installation (previously known as: "LTSP-pnp") you'll use this command: ltsp image /

6. Create a second VM to serve as a Client machine to boot from server

  1. Create a new VM. This will be a client computer to boot from the LTSP-server.
  2. This client needs no storage i.e. no hard drive.
  3. Set a single network adapter to "Internal Network" (NOT bridged otherwise it will attempt to boot from the WAN instead of the server that we just set up).
  4. Enable "Network" in "Settings > System > Motherboard > Boot Order" and move it to the top of the list.

If VirtualBox fails to boot, try mounting the iPXE ISO as an optical medium, as described in Netboot Clients .

7. Test new LTSP setup

  1. Start the client computer, and it should just work.
  2. Log in with an account located on the LTSP server.
  3. Test internet access and it should work.