Virtual Machine (VM)
Virtual Machine (VM)
IT provision for the unit is based on the assumption you work in the lab. using UoB-managed and thus supported equipment. If you need or prefer to use your own equipment, however, unsupported alternatives include the use of a bespoke VM which aims to replicate a lab. workstation as closely as possible:
-
Read over some sort of tutorial material if need be.
-
Install various pre-requisites, i.e.,
- VirtualBox including any extension packs necessary, e.g., for USB device support, and
-
Vagrant, plus associated plug-ins, as need be, e.g., by executing
vagrant plugin install vagrant-vbguest vagrant plugin install vagrant-disksize vagrant plugin install vagrant-reload
Note that:
- using a recent version of VirtualBox is strongly recommended: currently this is 6.x, whereas you may get 5.x when using some package managers,
- you may also need to install an X server in order to support forwarded X11 client interfaces: examples include Xming or Cygwin/X for Windows, and XQuartz for MacOS,
-
some features of the VM (e.g., access to USB devices) may demand you are a member of the
vboxusersgroup; you can ensure this by executingsudo usermod --append --groups vboxusers ${USER}
-
Launch the VM using either of the following approaches:
-
Self-provisioned:
-
execute
mkdir ./COMS10015 cd ./COMS10015 wget --quiet https://assets.phoo.org/COMS10015_2025_TB-4/csdsp/vm/vm.tar.gz tar --gzip --extract --file='vm.tar.gz' cd ./vmto download a
Vagrantfilethat references an un-provisioned base box, -
edit the resulting
Vagrantfileto suit any specific requirements, -
execute
vagrant upafter which the VM boots, and the provisioning step executes: this may take some time.
-
-
Pre-provisioned:
-
execute
mkdir ./COMS10015 cd ./COMS10015 mkdir ./vm cd ./vm vagrant init danpage/COMS10015to generate a
Vagrantfilethat references a pre-provisioned base box, -
edit the resulting
Vagrantfileto suit any specific requirements, -
execute
vagrant upafter which the VM boots: this may take some time.
-
-
-
Access the VM:
-
check the SSH configuration matches what you expect by executing
vagrant ssh-config -
automatically use SSH to access the VM, e.g., by executing
vagrant ssh -
manually use SSH to access the VM, e.g., by executing
ssh vagrant@localhost -p 2222 -i .vagrant/machines/default/virtualbox/private_key -Xwhere
-pspecifies a port (onlocalhost) matching the SSH configuration,-ispecifies an identity whereby the private key forvagrantis used, and-Xenables X11 forwarding, i.e., display of GUI applications on the host desktop.
Note that
/home/vagrant/sharerepresents a shared folder accessible from both the host and guest VM. We recommend using this for transfer of data only, however, rather than as a “live”, working file system: it seems the VirtualBox implementation of this feature is imperfect, meaning that the latter can result in somewhat cryptic errors which are difficult to resolve. -