Difference between revisions of "Create WeBWorK Virtual Machine (.OVA) File"

From WeBWorK_wiki
Jump to navigation Jump to search
Line 22: Line 22:
 
# Computer name: wwserver
 
# Computer name: wwserver
   
===Do not install VMWare tools===
 
  +
   
 
====Workstation Player====
 
====Workstation Player====
 
'''When you see REBOOT, Do not reboot the system''' Close the window and pick power off
 
'''When you see REBOOT, Do not reboot the system''' Close the window and pick power off
Open VMWare player, select (right click) guest and select settings. And remove all the autoinst CD and floppy.
+
Open VMWare player, select (right click) guest and select settings. And remove all the autoinst CD and floppy (check if this is the correct thing to do).
 
Then boot and login (wwadmin/wwadmin)
 
Then boot and login (wwadmin/wwadmin)
   
Line 44: Line 44:
 
sudo apt install openssh-server
 
sudo apt install openssh-server
   
Now on the host set up port forwarding. Find the ip address of your guest
+
Find the ip address of your guest
 
The Guest IP is the IP address your guest WeBWorK server is using. You can find it (after you login) by entering the command
 
The Guest IP is the IP address your guest WeBWorK server is using. You can find it (after you login) by entering the command
 
$ ip address show
 
$ ip address show
 
and looking at the output, something like "inet 10.0.2.15/24 ..." (not the LOOPBACK inet 127.0.0.1/8 address). Here the ip address is 10.0.2.15.
 
and looking at the output, something like "inet 10.0.2.15/24 ..." (not the LOOPBACK inet 127.0.0.1/8 address). Here the ip address is 10.0.2.15.
 
====Workstation Player====
 
Find or download the vmnetcfg.exe program. This does not come with Workstation Player but it does come with Workstation Pro. Download Workstation Pro (Do not install it) and
 
look for this program where you installed things.
 
Run the command as administrator in a Windows powershell
 
vmnetcfg.exe
 
and configure NAT for port forwarding. Say localhost:2222 to e.g. 10.0.2.15:22
 
 
====Workstation Pro====
 
 
   
   

Revision as of 07:23, 14 May 2020

Instructions for creating a WeBWorK Virtual Machine (.OVA) Image

Note that the resulting .ova image can be used to create a virtual machine

Build the server on VMWare Workstation (Player or Pro)

  1. 8 GBk disk (single file)
  2. 1 GB memory
  3. 1 cpu

The above resources are very minimal and (except for disk space) correspond to a AWS t2-micro level machine which is free.


  1. Download the ubuntu live CD (server version)
  1. Install following the standard directions with the following options
  1. Don't partition disks separately
  2. User name: wwadmin
  3. login: wwadmin
  4. password: wwadmin
  5. Computer name: wwserver


Workstation Player

When you see REBOOT, Do not reboot the system Close the window and pick power off Open VMWare player, select (right click) guest and select settings. And remove all the autoinst CD and floppy (check if this is the correct thing to do). Then boot and login (wwadmin/wwadmin)

Check if tools are installed

vmware-toolbox-cmd -v

and if so, remove them

sudo  apt remove open-vm-tools
sudo apt autoremove


After system boots check that openssh-server is installed run

sudo lsof -i -P -n | grep LISTEN

to check if it is listening on port 22 If not install openssh-server

sudo apt install openssh-server

Find the ip address of your guest The Guest IP is the IP address your guest WeBWorK server is using. You can find it (after you login) by entering the command

$ ip address show

and looking at the output, something like "inet 10.0.2.15/24 ..." (not the LOOPBACK inet 127.0.0.1/8 address). Here the ip address is 10.0.2.15.


Login from Terminal program

At this point you can login to your server from your host machine using SSH (non secure telnet and FTP are not allowed but secure SSH and SFTP are) using your favourite terminal emulator program. E.g. set your terminal to connect to localhost:2222

You can do all of the remaining installation from a terminal emulator on your host. The advantage of doing this is that you can copy commands from these instructions (with copy from the Edit menu or ^C) and paste them into a terminal window (with paste from the Edit menu list or <Shift> <Ctrl> <V> or <Shift> <Insert> depending on your application).

  1. set password for webworkWrite (wwadmin)
  2. add practice users and jsmith/jsmith to myTestCourse
  3. add the standard sets to myTestCourse
  4. implement all options A-E except C (run WW through SSL)


Remove openssh-server

sudo apt remove openssh-sftp-server 

Export to an .ova file.

Workstation Player

Find the path to your VM Open a command prompt as administrator cd D:\program files\vmware\vmware OVF_Tool Enter type ovftool “C:\the path to your VM\your VMname.vmx” c:\new directory\name.ova