# Virtualization
Virtualization in the department has a long history, dating back to [Xen](https://en.wikipedia.org/wiki/Xen).  
Since then, through different technologies, such as [OpenNebula](https://en.wikipedia.org/wiki/OpenNebula), we landed on [Proxmox](https://pve.proxmox.com/wiki/Main_Page), which is based on [Qemu](https://en.wikipedia.org/wiki/QEMU)/[KVM](https://linux-kvm.org/page/Main_Page).  

We still have a mixture, though the majority of virtual machines and services running are within the Proxmox umbrella.  
However, a few are still running within OpenNebula, [NEBULA.cms](http://nebula.cms.caltech.edu:9869), because it becomes either technically difficult or too slow to migrate the VMs.  
A good example is the CMS ticket system, [RT](https://requesttracker.com), is very heavily Perl based, and runs on a highly customized unique VM which is difficult to recreate.  In order to migrate RT to live under Proxmox, it needs to be re-installed, rather than simply migrated.  

### Existing Legacy VMs
Existing VMs running on OpenNebula ([NEBULA](http://nebula.cms.caltech.edu:9869)):
| VM | VM IP Address | Physical Host |
| -- | ------------- | ------------- |
| RT | `131.215.140.77` | `RINZLER.cms.caltech.edu` |
| PrivacyIDEA | `131.215.140.74` | `HERACLIUS.cms.caltech.edu` |
| GGlab | `131.215.140.50` | `CASTOR.cms.caltech.edu` |

Having said that, we'll detail here how Proxmox is implemented in the department, given that is where new systems will be created and run.  

### Existing Proxmox VMs
Promox cluster consists of physical hosts:
 - `CLU.cms`
 - `FLYNN.cms`
 - `QUORRA.cms`
 - `TRON.cms`  

Connecting via HTTPS to any one of these provides cluster-wide access.  

{{Figure
|caption=Proxmox
|align=left
|width=60%
![](https://info-4.cms.caltech.edu/Sysadmin/Virtualization/Screenshot%20Proxmox.png)
}}

Under Proxmox, entities are either physical hosts,  LXC Containers, or Virtual Machines, which are indicated with different icons in the cluster tree.  
LXC Containers are lighter on resources in each physical host, making them easier to migrate from physical host to host, however live migration is not possible as the container needs to be stopped before migrating.  
The advantage of LXC containers over Virtual Machines is that the physical host has access to the filesystem shared with the LXC, whereas VMs have only isolated filesystems (the VM is a filesystem) making it difficult to share data directly.  
The engineering decision whether to use LXCs or VMs can fall into a bit of philosophy, but the important bit to understand is: *isolation*.  
LXCs are very similar to Docker containers in that they do not require their own operating system, filesystem, etc.  
So, in a kernel panic, an LXC can cause the physical host to crash, but a VM would allow the physical host to survive.  
If the goal is to implement a Docker container, it is much easier to do so inside a VM.  
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9