Linux Desktop Virtual Machines

Ubuntu Desktop
Ubuntu Desktop

Several Ubuntu Linux desktop VMs support general-purpose desktop applications and our DXalarm Clocks. The following steps create the base VMs for these applications.

VM Install

The VMs are created as follows:

  • Image – Ubuntu Desktop download from here.
  • CPUs – 4
  • Memory – 4096 MB, Balloning = off
  • Network – LS Services, VLAN 10
  • Disk – 32 GB, SSD, Discard = on, Cache = Write through
  • QEMU Agent – Installed via apt install quemu-guest-agent && systemctl start qemu-guest-agent

The CPU and Memory parameters are chosen to be on the high side for most applications. This enables a quick installation and setup of the resulting VM. These parameters can be adjusted lower to match the actual workload for each provisioned VM.

Run the Ubuntu installer on the initial boot as follows:

  • US English
  • Normal Installation, Download Updates while installing
  • Erase Disk and Install Ubuntu
  • Timezone = New York, Automatic Timezone, AM/PM Time Format
  • Set computer name and login credentials

I also installed SSH access for all logins. The procedure for doing this can be found here.

Next was a few post-setup configuration steps:

  • Dark Style
  • Set Desktop Wallpaper
  • Setup Remote Desktop and VNC Sharing

Finally, we installed the following via the Ubuntu Software apps:

  • Extension Manager
  • Allow Locked Remote Desktop via Extension Manager (by name search)

E-mail Forwarding

Outbound e-mail is set up via nullmailer using the procedure outlined here.

# Run this as root
sudo bash

# Install nullmailer and mail apps
apt-get install nullmailer mailutils

# Move to the nullmailer directory
cd /etc/nullmailer

# Create configuration files
vi defaultdomain
...
anita-fred.net
:wq

vi adminaddr
...
<my-email-address>
:wq

# This file sets up TLS access to smtp2go
sudo vi /etc/remotes
...
mail.smtp2go.com smtp --port=587 --starttls --user=<my smtp2go login ID> --pass=<my stmp2go password>
:wq

# The next three steps are important!
chmod 644 defaultdomain adminaddr
chmod 600 remotes
chown mail:mail defaultdomain adminaddr remotes

# Check status of nullmailer
service nullmailer status

# Send a test e-mail
mailx -s "Test e-mail via nullmailer MTA" <email address>
...

Sound Through Remote Desktop Client

The xRDP extensions enable sound from our Ubuntu VMs via Remote Desktop. The procedure to install the necessary extensions in Ubuntu VMs can be found here.

The steps are as follows:

# Must run these commands as normal user, not root
su - fkemmerer

# Download script, unzip it, & make it exeutable
wget https://www.c-nergy.be/downloads/xRDP/xrdp-installer-1.4.3.zip
unzip xrdp-installer-1.4.3.zip
chmod +x xrdp-installer-1.4.3.sh

# Must use -s to install sound drivers
./xrdp-installer-1.4.3.sh -s

# Shutdown machine, then reboot
sudo shutdown

Applications

Installed the following applications

  • Chrome & associated apps
  • VLC Player

Install the Python IDE interface as follows:

sudo apt install idle

Template Conversion and Use

The fully set up VM has been converted to a template. The template can you used to create Ubuntu Desktop VMs using the following steps:

  • Clone (unlinked clone is preferred) the template to a VM
  • Edit /etc/hosts and /etc/hostname to set the system name for the new VM
  • Add the new VM to the Backup and HA configurations

 

Anita's and Fred's Home Lab

WordPress Appliance - Powered by TurnKey Linux