Cloud Resource Virtualization PDF - SRM Institute

Document Details

StainlessCreativity2466

Uploaded by StainlessCreativity2466

SRM Institute of Science & Technology

Dan. C. Marinescu

Tags

cloud computing virtualization virtual machines hypervisors

Summary

This document is a slideshow about cloud resource virtualization from SRM Institute of Science & Technology. It covers topics such as virtualization, layering, virtual machines, hypervisors and the benefits of virtualization. The slides also explain the different types of hypervisors and full versus paravirtualization.

Full Transcript

UNIT-II CLOUD RESOURCE VIRTUALIZATION Syllabus-Unit-II ▪ Virtualization ▪ Layering and Virtualization ▪ Virtual Machine Monitors ▪ Virtual Machines ▪ Performance isolation ▪ Full virtualization and para-Virtualization ▪ Hardware Support for virtualization Cloud Computing – Theory and Prac...

UNIT-II CLOUD RESOURCE VIRTUALIZATION Syllabus-Unit-II ▪ Virtualization ▪ Layering and Virtualization ▪ Virtual Machine Monitors ▪ Virtual Machines ▪ Performance isolation ▪ Full virtualization and para-Virtualization ▪ Hardware Support for virtualization Cloud Computing – Theory and Practice - Dan. C. Marinescu Chapter 10 - Cloud Resource Virtualization What is virtualization? TRADITIONAL WAY VIRTUALIZATION  Using virtualization, all the three physical servers are consolidated with their applications and corresponding operating systems into one physical server in a virtual environment. VIRTUALIZATION HYPERVISOR/ Virtual Machine Monitor (VMM) TYPES OF HYPERVISOR TYPE-I HYPERVISOR-Steps  A server case is taken  Hardware such as motherboard, CPU, RAM and storage devices are installed.  Next, install a Type-1 hypervisor.  Eg. VMWare EXSI  Installed hypervisor is used to create the virtual machine. TYPE-I HYPERVISOR-Steps TYPE-II HYPERVISOR BENEFITS OF VIRTUALIZATION PORTABILITY  If the current machine that is running the virtual machine is old and outdated, or if its running out of space, those VMs can be easily transferred to a more powerful machine very rapidly Full computing capability  Todays, computers and servers are so powerful. However, most of the time, their full potential is not being utilized.  But with virtualization, virtual machines are created. These VMs can take full advantage of the machine’s capability. DISASTER AND RECOVERY  Virtual machines are just software files, and can be backed up and uploaded to multiple physical machines. Layering in Virtualization 7-Layer Model 7-Layer Model  Access Virtualization: Allows applications to work with remote client devices. Can be used to access client from any far location Eg. XenDesktop from Citrix  Application Virtualization: Allows applications written for one OS version or OS to execute in another environment; this environment can be a new OS version or an entirely different OS. This type of software would make it possible for an application written for Windows XP to work just fine on Windows 7 or Windows 8. Eg. App-V from Microsoft 7-Layer Model  Processing Virtualization: Allows one system to support workloads as if it was many systems. Eg. Citrix XenServer, Microsoft Hyper-V  Network Virtualization: Allows systems to work with other systems safely and securely, without having to care too much about the details of the underlying network. This is called network virtualization.  Storage Virtualization: Allows workloads to access storage without having to know where the data is stored, what type of device is storing the data. Eg. VMware VSAN 7-Layer Model  Security for Virtual Environment: Monitors and protects all of the other layers of virtualization so that only authorized use can be made of the resources. Eg. Bitdefender, Kaspersky, TrendMicro, McAfee  Management of Virtual Environment: Allows IT administrators and operators to easily monitor and manage virtual environments across boundaries. The boundaries can include the physical location of systems. Virtual Machines Virtual Machine is like a virtual computer with the ability to run applications and store data just like a physical computer. (or) Virtual machines are software-based emulations of physical computers. They operate in an isolated environment and can run their own operating systems and applications as if they were separate physical machines. What are VMs used for? Building and deploying apps to the cloud. Trying out a new operating system (OS), including beta releases. Spinning up a new environment to make it simpler and quicker for developers to run dev-test scenarios. Backing up your existing OS. Accessing virus-infected data or running an old application by installing an older OS. Running software or apps on operating systems that they weren't originally intended for. Virtual Machines ◼VM - isolated environment that appears to be a whole computer, but actually only has access to a portion of the computer resources. ◼Process VM - a virtual platform created for an individual process and destroyed once the process terminates. ◼System VM - supports an operating system together with many user processes. ◼Traditional VM - supports multiple virtual machines and runs directly on the hardware. ◼Hybrid VM - shares the hardware with a host operating system and supports multiple virtual machines. ◼Hosted VM - runs under a host operating system. Virtual Machines Benefits of using VM Cost savings—running multiple virtual environments from one piece of infrastructure means that you can drastically reduce your physical infrastructure footprint. This boosts your bottom line—decreasing the need to maintain nearly as many servers and saving on maintenance costs and electricity. Agility and speed—Spinning up a VM is relatively easy and quick and is much simpler than provisioning an entire new environment for your developers. Virtualization makes the process of running dev-test scenarios a lot quicker. Lowered downtime—VMs are so portable and easy to move from one hypervisor to another on a different machine—this means that they are a great solution for backup, in the event the host goes down unexpectedly. Scalability—VMs allow you to more easily scale your apps by adding more physical or virtual servers to distribute the workload across multiple VMs. As a result you can increase the availability and performance of your apps. Security benefits— Because virtual machines run in multiple operating systems, using a guest operating system on a VM allows you to run apps of questionable security and protects your host operating system. VMs also allow for better security forensics, and are often used to safely study computer viruses, isolating the viruses to avoid risking their host computer. (Source : https://azure.microsoft.com/en-us/resources/cloud-computing-dictionary/what-is-a-virtual-machine) Performance Isolation in Virtualization  Resource Allocation: Virtualization platforms use resource allocation techniques to divide the physical resources of the host machine among the virtual machines. Each VM is allocated a portion of the CPU, memory, disk space, and network bandwidth. This allocation can be done statically or dynamically based on the requirements and policies configured by the administrator.  Resource Scheduling: The virtualization platform schedules the execution of VMs' workloads on the physical hardware. This scheduling ensures that each VM gets its allocated resources when needed, preventing resource contention among VMs.  Resource Monitoring: The virtualization platform continuously monitors the resource usage of each VM and the overall system performance. If a VM starts to consume more resources than its allocation or if there are performance bottlenecks, the platform can take corrective actions such as reallocating resources or migrating VMs to other physical hosts with more capacity. Performance Isolation in Virtualization  Quality of Service (QoS): Some virtualization platforms support QoS policies, allowing administrators to prioritize certain VMs or types of workloads over others. For example, critical production VMs may be given higher priority in resource allocation compared to less critical development or testing VMs.  Isolation Mechanisms: Virtualization platforms implement isolation mechanisms to prevent VMs from interfering with each other's performance. This includes techniques such as CPU scheduling algorithms (e.g., time-sharing, fair scheduling), memory protection mechanisms (e.g., memory overcommitment, memory ballooning), and network traffic shaping.  Performance Guarantees: Virtualization platforms may offer performance guarantees or Service Level Agreements (SLAs) to ensure that VMs receive a minimum level of performance. These guarantees may be specified in terms of CPU utilization, memory latency, disk I/O throughput, or network bandwidth. Essentials of Cloud Computing - K. Chandrasekaran Chapter 6 6.3.1 Approaches in Virtualization 6.3.1.1 Full Virtualization 6.3.1.2 Paravirtualization 6.3.1.3 Hardware-Assisted Virtualization Full Virtualization Full virtualization, also known as hardware virtualization, is a type of virtualization technology that enables the creation and operation of virtual machines (VMs) that mimic the functionality of physical computers. In full virtualization, the guest OS is completely abstracted from the underlying infrastructure. The virtualization layer or virtual machine manager (VMM) fully decouples the guest OS from the underlying infrastructure. The guest OS is not aware that it is virtualized and thinks it is running on the real hardware. The OS cannot communicate to the physical infrastructure directly. It requires the help of hypervisors to communicate with the underlying infrastructure. This approach uses binary translation and direct execution techniques. Binary translation is used to translate nonvirtualized guest OS instructions with new sequences of instructions that have the same intended effect on the virtual infrastructure. On the other hand, direct execution is used for user application requests where the applications can directly access the physical resources without modifying the instructions. Full Virtualization Full Virtualization Key features: Hypervisor layer: Full virtualization uses a special kind of software called a hypervisor. The hypervisor interacts directly with the physical server’s hardware resources, such as the CPU and storage space, and acts as a platform for the virtual server’s OSs. Complete Isolation: Each virtual machine operates independently of others, providing a high degree of isolation. Multiple Operating Systems: Each guest server or the virtual machine (VM) is able to run its own OS. That means one virtual server could be running on Linux and the other one could be running on Windows Guest OS Interaction:the guest OS is unaware of the underlying hardware infrastructure. That means the guest OS is not aware of the fact that it is running on a virtualized platform and of the feeling that it is running on the real hardware. Hardware Abstraction: In this case, the guest OS cannot communicate directly to the underlying physical infrastructure. The OS needs the help of virtualization software hypervisors to communicate with the underlying infrastructure. Resource Allocation: The hypervisor manages and allocates physical resources, such as CPU, memory, and storage, to each virtual machine. This allocation is controlled and can be adjusted based on workload requirements. Full Virtualization Advantages: Best isolation among the various VMs Isolation between the VMs and the hypervisor Different OSs can run simultaneously. The virtual guest OS can be easily migrated to work in native hardware. It is easy to install and use and does not require any change in the guest OS. Disadvantage: Binary translation is an additional, overhead, and it reduces the overall system performance. There is a need for correct combination of hardware and software Examples : VMWare ESX and VirtualBox Paravirtualization Paravirtualization is a virtualization technique that involves modifying the guest operating system (OS) to be aware of the virtualization layer, often referred to as a hypervisor. This approach is also known as partial virtualization or OS-assisted virtualization and provides partial simulation of the underlying infrastructure. The main difference between the full virtualization and paravirtualization is the guest OS knows that it is running in virtualized environment in paravirtualization. But in full virtualization, this information is not known to the guest OS. Another difference is that the paravirtualization replaces the translation of nonvirtualized OS requests with hypercalls. Hypercalls are similar to system calls and used for the direct communication between OS and hypervisor. This direct communication between the guest OS and hypervisor improves performance and efficiency. In full virtualization, the guest OS will be used without any modification. But in paravirtualization, the guest OS needs to be modified to replace nonvirtualizable instructions with the hypercalls. As the guest OS is at privileged position, it can communicate directly to the virtualization layer without any translation by means of hypercalls. Like in full virtualization, the user applications are allowed to access the underlying infrastructure directly Paravirtualization Paravirtualization Key features: Hypervisor Layer: Similar to full virtualization, paravirtualization also employs a hypervisor, but here, the guest operating systems are aware of it. The hypervisor provides a set of APIs that guest OSes must use to communicate with the underlying hardware. Guest OS Modifications: Guest operating systems must be modified to replace certain hardware-related instructions with hypercalls, which are calls to the hypervisor. These hypercalls allow the guest OS to request services from the hypervisor, such as memory management or CPU scheduling. Improved Performance: Because the guest OS is aware of the virtualization layer, there is less overhead in terms of virtualization-related operations. Collaborative Approach: Paravirtualization requires collaboration between the guest OS and the hypervisor. The hypervisor provides a set of APIs (Application Programming Interfaces) that the modified guest OS uses for optimized interactions with the virtualized hardware. Paravirtualization Advantages: It eliminates the additional overhead of binary translation and hence improves the overall system efficiency and performance. It is easier to implement than full virtualization as there is no need for special hardware. Disadvantage: There is an overhead of guest OS kernel modification. The modified guest OS cannot be migrated to run on physical hardware. VMs suffer from lack of backward compatibility and are difficult to migrate to other hosts. Examples : Xen and VMWare ESX server. Comparison Aspect Full Virtualization Para Virtualization Requires modifications to use Guest OS Modification Not required; runs unmodified hypercalls Better performance due to direct Performance Slightly lower due to emulation interaction Isolation with awareness of other Isolation Strong isolation between VMs VMs Guest OS Flexibility Supports various OS types Works best with compatible OSes Requires hardware support for para Hardware Compatibility Compatible with most hardware virtualization Hypervisor manages virtual hardware Hypervisor provides APIs for Hypervisor Layer independently communication Uses hypercalls to request hardware Interaction with Hardware Emulates complete hardware services Examples VMware, Hyper-V, VirtualBox Xen, KVM, QEMU Lower resource overhead for the Resource Overhead Slightly higher resource overhead hypervisor Hardware Support for Virtualization Hardware support for virtualization is crucial for optimizing the performance and efficiency of virtualized environments. Several hardware features and technologies have been developed to enhance the capabilities of virtualization platforms. In this type of virtualization, hardware products supporting the virtualization are used. Hardware vendors like Intel and AMD have developed processors supporting the virtualization through the hardware extension. Intel has released its processor with its virtualization technology VT-x AMD have released its processor with its virtualization technology AMD-v to support the virtualization. Pros It reduces the additional overhead of binary translation in full virtualization. It eliminates the guest OS modification in paravirtualization. Cons Only new-generation processors have these capabilities. All x86/x86_64 processors do not support hardware- assisted virtualization features. More number of VM traps result in high CPU overhead, limited scalability, and less efficiency in server consolidation. Hardware Support for Virtualization Hardware Support for Virtualization Key Aspects : Virtualization Extensions: Intel VT (Virtualization Technology): Introduced by Intel, VT provides hardware-assisted virtualization support. It includes features such as VT-x (for x86 processors) and VT-d (for I/O virtualization). AMD-V (AMD Virtualization): Similar to Intel VT, AMD-V is the virtualization extension for AMD processors. It includes features like AMD-Vi for I/O virtualization. Memory Management: Virtualization also requires efficient memory management. The hardware needs to support features that allow the virtual machines to access and use memory effectively. This includes features like hardware-assisted paging (Eg. Extended Page Table (EPT) ), which helps in translating virtual memory addresses to physical memory addresses efficiently. Input/Output Virtualization: Your computer's hardware interfaces with various devices like network cards, USB ports, and storage devices. It enables virtual machines to interact with these devices without conflicts or performance bottlenecks. It uses DMA. Direct memory access (DMA) is a method that allows an input/output (I/O) device to send or receive data directly to or from the main memory, bypassing the CPU to speed up memory operations. DMA is performed using VT-d (Virtualization Technology for directed IO) Hardware Support for Virtualization Cntd: Nested Virtualization: Some advanced virtualization setups require running virtual machines within virtual machines (nested virtualization). Hardware support for this feature ensures smooth operation and performance even in such complex scenarios. Security Features: Modern CPUs come with security features that are crucial for virtualization. These features help in isolating and protecting virtual machines from each other and from potential security threats. Sharable Network: Network connectivity is provided using VT-c (Virtualization technology for connectivity)