1 00-VirtualMachines

1.1 A virtual sandbox for big-kids

… for you to play around and make mistakes in.

1.2 Hypervisors and Virtual Machines




1.2.1 Type-1, native or bare-metal hypervisors


Qubes (Builds on top of Xen):

1.2.2 Type-2 or hosted hypervisors

Type-2 hypervisors run on/in a conventional operating system (OS)w
just as other computer programs do.
A guest operating system runs as a process on the host OS.
Type-2 hypervisors abstract guest operating systems from the host operating system.




1.3 Benefits: why virtualize?

1.4 Setting up your virtual machine

1.4.1 Preparation

This comes in three options: Campus machines

If you want to use campus computers (Windows CLC),
then open AppsAnywhere, and launch VirtualBox.
Everything should be ready to go.
Use the S-DRIVE (recommended) or your own USB drive (slower) as your install location,
to store your virtual disk image,
not the C: drive (which forgets your install upon reboot)!
When using the S drive,
you can launch the VM by double-clicking on the virtual box file,
where you stored it, and VirtualBox will automatically open. Bare metal on your own machine

  1. If you are already running Linux on your own machine, see the ../../../SyllabusGeneral for more details. Virtualbox on your own machine

If you want to run VirtualBox on your own computer:
If you do not have a Mac, and are running Windows, then open your BIOS (Mac virtualization is usually enabled by default).
F2, F8, or other function keys, and/or “Advanced Startup” from within Windows may help.
Use your favorite search engine to find out how for your particular laptop.
Once you have figured out how to enter your BIOS,
then enable any features that sound like:
virtualization, vt-x, vt-d, AMD-v, AMD-vi, NPT, RVI, etc.
Make sure you have >=20 Gb of free hard drive space, and >=4Gb of RAM.
Download VirtualBox: https://www.virtualbox.org/wiki/Downloads
If you are running MacOS, then you want VirtualBox version 6.0, not version 6.1 (VM’s crash).
Install VirtualBox:
Launch and click through all, accepting the defaults (Mac and Windows).
VirtualBox kernel modules require a restart,
even in Unix-based operating systems (Mac, Linux, BSD, etc).
You could use KVM or Xen instead if you’re on Linux,
and want to be adventurous.

1.4.2 Installation

Choose an operating system: 01-02-LinuxBash.html
Then, get your virtual machine installed, either:

  1. From-scratch install in VirtualBox
    Typically, you just need the default install options.

  2. From-scratch install on a USB drive.
    Choose a second USB sick or external hard drive as the install location.
    This is useful for network hacking, forensics, file-recovery, password bypassing, etc.
    Though it may be slow to boot, after booting,
    this option should be generally faster than a VM,
    and so is useful if your computer is slow.


1.5 Usability

Host and guest additions
Extension pack is not required, and really only needed for things like fancy USB-3 peripherals.
Guest additions: helpful for shared folder, for example.

Shared clipboard
Menu: Devices > Shared Clipboard > bidirectional

Shared folders: Platform-dependent (DataStructures will go over in lab)
In host: in VirtualBox GUI settings for your VM, enable a shared folder
Choose location in host to share.
Check auto mount and permanent.

1.6 VM hygiene (keep it clean)

Just after installation, but before using your VM for anything, shut down, and create a snapshot!

1.7 Using your VM

1.8 More

If you’re still curious about virtualization, keep on reading:

Next: 01-02-LinuxBash.html