AWS Virtualization – HVM and Paravirtualization

When launching EC2 instances into the cloud, Amazon relies on virtualization, by using a customised Xen virtualization. Built on top of x86, Xen manages to power up the largests cloud in production today, being used by Amazon Web Services,  Rackspace Public Cloud, Verizon Cloud and many others.

There are many popular virtualization solutions these days, but if you take in consideration the fact that Xen is open-source and para-virtualised, it’s competitors – VMware, Sphere, VirtualBox, KVM, … – are just fading away. This allows Xen to provide higher performance and close to that of the real servers and it supports two virtualization types:

  • Xen Para-virtualization ( PV )
  • Xen Full virtualization ( HVM )

Also, Amazon Web Services supports these two virtualization types and you need to choose wisely between them, based on your requirements:

Para-virtualization ( PV )

  • An OS or Kernel called Hypervisor is installed on the hardware.
  • Dom0 is called the “privilged domain” which can issue commands to the hypervisor.

PRO

  • Stability/Performance is close to the real servers and hardware virtualization.
  • Overhead is very low

CONS

  • Implementation is tough.
  • Both the host & guest kernels has to be patched.
  • Supports Linux only
  • can’t change the OS options during install.
  • Can’t compile and install a custom kernel

HVM

Stands for Hardware-assisted virtual machine. It provides complete hardware isolation. The hardware provides support to run independently for each OS

PROS

  • Can run Linux and Windows
  • Complete secure hardware isolation
  • Resembles close to a physical server.
  • Greater stability

CONS

  • Low performance, because of the overheads at the hardware level

Your take away,

  • Windows EC2 instances can only be HVM as PV does not support windows.
  • Linux/Unix EC2 instances can be either HVM and PV.
  • If you want a good performance for Linux/Unix then use PV