Chapter 14 - Virtual Machines

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/29

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

What is a hypervisor?

The software for virtualization. It acts as a layer between the hardware and the VMs to act as a resource broker. It allows multiple VMs to safely coexist on a single physical host.

2
New cards

Consolidation Ratio

Number of VMs that can run on a host

3
New cards

Reasons for virtualization

-Legacy Hardware
-Rapid Deployment
-Versatility
-Consolidation
-Aggregating
-Dynamics
-Ease of Management
-Increased Availability

4
New cards

___ physical host can support ____ VMs

One; Many

5
New cards

How do privileged instructions work in a VM?

must be caught and handled by the hypervisor. This creates some performance loss, though improvements have minimalized this overhead

6
New cards

VM as files

VM instance is defined in files.

- configuration file defines the number of virtual processors (vCPUs), amount of memory, I/O device access, and network connectivity

- storage the VM sees may just be files in the physical file system

- When the VM is booted, additional files for logging, paging, and other functions are created

7
New cards

Hypervisor Functuons

Execution Management of VMS

Devices emulation and access control

Execution of privileged operations

Management of VMs (lifecycle management)

Administration

8
New cards

Type 1 Hypervisor

•Hypervisor runs directly on host hardware much like an OS would run.
•Directly controls host resources.
•Examples: VMware ESXi, Microsoft Hyper-V, Xen variants.

BARE METAL

<p>•Hypervisor runs directly on host hardware much like an OS would run.<br>•Directly controls host resources.<br>•Examples: VMware ESXi, Microsoft Hyper-V, Xen variants.<br><br>BARE METAL</p>
9
New cards

Type 2 Hypervisor

•Hypervisor runs on host's OS.
•Relies on host OS for hardware interactions.
•Examples: VMware Workstation, Oracle VM Virtual Box

HOSTED

<p>•Hypervisor runs on host's OS.<br>•Relies on host OS for hardware interactions.<br>•Examples: VMware Workstation, Oracle VM Virtual Box<br><br>HOSTED</p>
10
New cards

Type 1 vs Type 2

•Type 1 typically performs better.
•Type 1 is typically more secure.
•Type 2 can run on a system being used for other things, such as a user's workstation.

11
New cards

Paravirtualization

The OS is modified so that calls to the hardware are replaced with calls to the hypervisor. This is faster with less overhead, but requires a modified OS

<p>The OS is modified so that calls to the hardware are replaced with calls to the hypervisor. This is faster with less overhead, but requires a modified OS</p>
12
New cards

Hardware-assisted virtualization

•Both AMD and Intel processors provide support for hypervisors.
•Called AMD-V and Intel VT-X, they provide hardware-assisted virtualization extensions for the hypervisor to use.
•Intel processors offer extra instructions called VMX (Virtual Machine Extensions).
•Hypervisors can use these instructions rather than performing these functions in code.
•The OS does not require modification in this case.

13
New cards

Virtual appliance

appliance consists of applications and an operating system distributed as a virtual machine image.

14
New cards

Why would you use a virtual appliance?

Deploying a virtual appliance is far easier than installing an OS, installing the applications, configuring, setting it up. It is independent of hypervisor or processor architecture, and can run on type 1 or 2 hypervisor.

15
New cards

Container Virtualization

•Another approach to virtualization is container virtualization.
•Software running on top of the host OS kernel provides an isolated execution environment.
•Unlike hypervisor VMs, containers do not aim to emulate physical servers.
•Instead, all containerized applications on a host share a common OS kernel.
•This eliminates the need for each VM to run its own OS and greatly reduces overhead.

<p>•Another approach to virtualization is container virtualization.<br>•Software running on top of the host OS kernel provides an isolated execution environment.<br>•Unlike hypervisor VMs, containers do not aim to emulate physical servers.<br>•Instead, all containerized applications on a host share a common OS kernel.<br>•This eliminates the need for each VM to run its own OS and greatly reduces overhead.</p>
16
New cards

Kernel Control Groups

•Normally all processes are descendants of the init process forming a single process hierarchy.
•Control groups allow for multiple process hierarchies in a single OS.
•The hierarchy is associated with system resources at configuration time.

17
New cards

What do control groups provide?

•Resource limiting: limit how much memory is usable.
•Prioritization: some groups can get a larger share of CPU or disk I/O .
•Accounting: can be used for billings purposes.
•Control: groups of processes can be frozen or stopped and restarted.

18
New cards

Container lifecycle

•Setup: enabling the Linux kernel containers, installation of tools and utilities to create the container environment.
•Configuration: specify IP address, root file system, and allowed devices.
•Management: startup, shutdown, migration.

19
New cards

Container I/O

•In a VM environment, a process executes inside a guest virtual machine.
•An I/O request is sent to the guest OS to an emulated device the guest OS sees.
•The hypervisor sends it through to the host OS which sends it to the physical device.
•By contrast, an I/O request in a container environment is routed through kernel control group indirection to the physical device.

20
New cards

Advantages of a container

By sharing the OS kernel, a system may run many containers compared to the limited number of VMs and guest OSs of a hypervisor environment.

Application performance is close to native system performance.

21
New cards

Container Disadvantages

•Container applications are only portable across systems with the same OS kernel and virtualization support features.

•An app for a different OS than the host is not supported.

•May be less secure if there are vulnerabilities in the host OS.

22
New cards

Container file system

•Each container sees its own isolated file system.
•OS files and many common applications are symbolically linked into each container.
•Using this approach, considerable space savings is achieved with only locally created files actually existing in the container's file system.

23
New cards

What is a microservice?

Microservices is an architectural style in which an application is decomposed into loosely coupled self-contained services. Containers are a natural fit for microservices.

Instead of having a monolithic application design, each service is broken out as an individual part.

24
New cards

Advantages of microservice

- smaller deployable unit than the whole application, making it easier and quicker to push out updates or add features. This helps to support a continuous delivery practice.

- part of a much larger application, and there can be multiple instances to share the load for each part versus doing so for the entire application.

25
New cards

What is Docker and why is used?

•Docker provides a simpler and more standardized way to run containers.
•Docker makes it easy to load the container image in a simple and quick manner.
•Docker containers are stored in the cloud as images which can be pulled and executed when needed.

26
New cards

Two ways to provide processor resources

- Emulation

- Schedule time on physical CPUs

27
New cards

Emulation

Emulated chip and software.
Examples: QEMU And Android Emulator.

•Advantages: emulation software may run on different platforms
•Disadvantages: not very efficient

28
New cards

Page Sharing

•To save physical memory, the hypervisor can maintain one copy of a block in physical memory and map each VM's request to it.
•This typically results in a savings from 10% to 40% of physical memory.

29
New cards

Memory Overcommit

•The hypervisor may temporarily borrow memory from one VM to satisfy the needs of another.
•The mechanism used is called a balloon driver.
•The balloon driver requests memory (inflates) in the guest OS which causes the guest OS to free up pages no longer needed.
•The balloon driver can now deflate and these freed pages can be used for some other VM that is short on memory.

30
New cards

Advantages of I/O Virtualization

•It enables hardware independence since the VM sees a more general device.
•This helps with VM migration, since the new host may not have the exact same device.