In Amazon Web Services (AWS), Amazon Elastic Compute Cloud (EC2) instances are the central part of cloud computing platform. An instance type determines the hardware of the machine. Each instance type provides different compute and memory capabilities. Amazon Machine Image (AMI) provides the set of software for the EC2 instance including the kind of OS, applications, the services.
So Amazon EC2 facilitates the scalable deployment of desired software and applications by providing a web service for the virtual machine, called as an instance.
Amazon EC2 relies on Xen Virtualization for launching its instances.
A Xen hypervisor allows multiple instances to share a single hardware platform. A hardware on which a hypervisor is running is called a Host machine and the virtual machine is called a Guest machine.
AWS supports two different types of virtualization for EC2 instances, Para Virtualization (PV) and Hardware-assisted Virtual Machine (HVM).
In terms of Xen virtualization these are called
- Xen Para-virtualization ( PV )
- Xen Full virtualization ( HVM )
These AMIs boot with a special boot loader called PV-GRUB. The guest kernel can communicate directly with the hypervisor results in greater performance but they cannot access or use the hardware extensions such as enhanced networking, GPU etc. Network performance in a Para-virtualized instance is very low. Para-virtualized AMIs support only Linux.
b. Hardware-assisted virtual machine or (Full Virtualization)
HVM instances have a fully virtualized set of hardware and they boot by executing the master boot record (MBR) of the root block device of the image. It provides the ability to run an operating system directly on top of a virtual machine. It provides complete hardware isolation. HVM instances can use the enhanced networking and GPU processing. HVM virtualization provides guest OS to pass through instructions to specialized network and GPU devices to have access to the native hardware platform. The network performance in Hardware-assisted virtual instance is low to moderate. The hardware provides support to run independently for each Guest OS. So the HVM AMIs support both Linux and Windows.
HVM machines can take advantage of hardware extensions that provide fast access to the underlying hardware on the host system.
PV drivers are now available for HVM machines, so with these drivers the HVM machines get the better performance than para virtual machines.