Skip to content
Snippets Groups Projects
virtualization.md 15.86 KiB

Virtualization

Running virtual machines on compute nodes

Introduction

There are situations when Anselm's environment is not suitable for user needs.

  • Application requires different operating system (e.g Windows), application is not available for Linux
  • Application requires different versions of base system libraries and tools
  • Application requires specific setup (installation, configuration) of complex software stack
  • Application requires privileged access to operating system
  • ... and combinations of above cases

We offer solution for these cases - virtualization. Anselm's environment gives the possibility to run virtual machines on compute nodes. Users can create their own images of operating system with specific software stack and run instances of these images as virtual machines on compute nodes. Run of virtual machines is provided by standard mechanism of Resource Allocation and Job Execution.

Solution is based on QEMU-KVM software stack and provides hardware-assisted x86 virtualization.

Limitations

Anselm's infrastructure was not designed for virtualization. Anselm's environment is not intended primary for virtualization, compute nodes, storages and all infrastructure of Anselm is intended and optimized for running HPC jobs, this implies suboptimal configuration of virtualization and limitations.

Anselm's virtualization does not provide performance and all features of native environment. There is significant performance hit (degradation) in I/O performance (storage, network). Anselm's virtualization is not suitable for I/O (disk, network) intensive workloads.

Virtualization has also some drawbacks, it is not so easy to setup efficient solution.

Solution described in chapter HOWTO is suitable for single node tasks, does not introduce virtual machine clustering.

!!! note Please consider virtualization as last resort solution for your needs.

!!! warning Please consult use of virtualization with IT4Innovation's support.

For running Windows application (when source code and Linux native application are not available) consider use of Wine, Windows compatibility layer. Many Windows applications can be run using Wine with less effort and better performance than when using virtualization.

Licensing

IT4Innovations does not provide any licenses for operating systems and software of virtual machines. Users are ( in accordance with Acceptable use policy document) fully responsible for licensing all software running in virtual machines on Anselm. Be aware of complex conditions of licensing software in virtual environments.

!!! note Users are responsible for licensing OS e.g. MS Windows and all software running in their virtual machines.

Howto

Virtual Machine Job Workflow

We propose this job workflow:

Workflow

Our recommended solution is that job script creates distinct shared job directory, which makes a central point for data exchange between Anselm's environment, compute node (host) (e.g. HOME, SCRATCH, local scratch and other local or cluster file systems) and virtual machine (guest). Job script links or copies input data and instructions what to do (run script) for virtual machine to job directory and virtual machine process input data according instructions in job directory and store output back to job directory. We recommend, that virtual machine is running in so called snapshot mode, image is immutable - image does not change, so one image can be used for many concurrent jobs.

Procedure

  1. Prepare image of your virtual machine
  2. Optimize image of your virtual machine for Anselm's virtualization
  3. Modify your image for running jobs
  4. Create job script for executing virtual machine
  5. Run jobs

Prepare Image of Your Virtual Machine

You can either use your existing image or create new image from scratch.

QEMU currently supports these image types or formats:

  • raw
  • cloop
  • cow
  • qcow
  • qcow2
  • vmdk - VMware 3 & 4, or 6 image format, for exchanging images with that product
  • vdi - VirtualBox 1.1 compatible image format, for exchanging images with VirtualBox.

You can convert your existing image using qemu-img convert command. Supported formats of this command are: blkdebug blkverify bochs cloop cow dmg file ftp ftps host_cdrom host_device host_floppy http https nbd parallels qcow qcow2 qed raw sheepdog tftp vdi vhdx vmdk vpc vvfat.