ndantam / mines-cs-vm

Virtual machine management for cs.mines.edu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Virtual machine management for cs.mines.edu.

Using the Virtual Machine

  1. Install a hypervisor (see options below)

  2. Download the virtual disk (You need to replace USER below with your Mines username).

    On Microsoft Windows, you can obtain scp and xz from Cygwin or another scp (pscp) from Putty.

    From ON campus, copy via scp:

    scp 'USER@isengard.mines.edu:~ndantam/mines-cs-vm.vmdk.xz' .
    

    From OFF campus, copy via scp through jumpbox:

    scp -o ProxyJump=USER@jumpbox.mines.edu 'USER@isengard:~ndantam/mines-cs-vm.vmdk.xz' .
    
  3. Decompress the disk image:

    unxz -v mines-cs-vm.vmdk.xz
    
  4. Start your hypervisor and import the virtual disk.

  5. Login with the default account:

    Username: blaster
    Password: password
    

    Note: You may need to change the session type in the display manager to System Default.

Hypervisors

VirtualBox

Free, open-source, and cross-platform virtualization application.

VMWare Workstation

Commercial virtualization application that is available in some Mines computer labs. VMWare Workstation player is also free-of-charge for noncommercial use.

Kernel-based Virtual Machine

A hypervisor built into the Linux kernel.

To run a disk image:

qemu-system-x86_64 --enable-kvm -m 1024 -hda mines-cs-vm.vmdk

Rebuilding the VM

The virtual machine is constructed by first building a Docker image and then extracting the filesystem from that image onto a separate virtual disk. Part of the build process chroots into the virtual disk filesystem, so the build will only work on Linux.

Instructions

  1. Install/Setup docker

  2. Install virtualbox, qemu-utils, and parted (used for disk image setup):

    apt-get install virtualbox qemu-utils parted
    
  3. Load the NBD Module:

    sudo modprobe nbd max_part=8
    

    WARNING: ensure that nothing else is using /dev/nbd0 or the build will clobber it

  4. Create the docker image:

    sudo make docker-image.stamp
    
  5. Create the virtual disk:

    sudo make img/mines-cs-vm.vmdk
    

Quirks

  • lightdm does not work correctly. Use gdm3 instead:

     dpkg-reconfigure gdm3
    

About

Virtual machine management for cs.mines.edu


Languages

Language:Makefile 95.4%Language:Shell 4.6%