Linux Containers and Virtualization: Utilizing Rust for Linux Containers [2 ed.] 9781484297681, 9781484297674, 1484297679

This book is a practical, comprehensive guide to creating secure and efficient Linux containers using the Rust programmi

121 30 2MB

English Pages xi, 208 Year 2023

Report DMCA / Copyright

DOWNLOAD EPUB FILE

Table of contents :
Table of Contents
About the Author
About the Technical Reviewer
Chapter 1: Virtualization Basics
History of Virtualization
What Is Virtualization?
VM-Based Virtualization
Container-Based Virtualization
Hypervisors
Virtual Machine Monitor
Device Model
Memory Virtualization
Shadow Page Tables
Nested Page Tables with Hardware Support
CPU Virtualization
Binary Translation in the Case of Full Virtualization
Paravirtualization in the Case of XEN with Hypercalls
IO Virtualization
Full Virtualization
Paravirtualization
Summary
Chapter 2: Hypervisors
The Intel Vt-x Instruction Set
The Quick Emulator
Creating a VM Using the KVM Module
Vhost-Based Data Communication
What Is an eventfd?
Alternative Virtualization Mechanisms
Unikernels
Project Dune
novm
Summary of Alternative Virtualization Approaches
Summary
Chapter 3: Namespaces
Namespace Types
UTS
PID
Mount
Network
IPC
Cgroup
Time
Data Structures for Linux Namespaces
Adding a Device to a Namespace
Summary
Chapter 4: Cgroups
Creating a Sample Cgroup
Cgroup Types
CPU Cgroup
Block I/O Cgroups
Understanding Fairness
Understanding Throttling
Summary
Chapter 5: Layered File Systems
A File System Primer
Brief Overview of Pseudo File Systems
Understanding layered File Systems
The Union File System
OverlayFS
Summary
Chapter 6: Creating a Simple Container Framework
The UTS Namespace
Golang Installation
Building a Container with a Namespace
Adding More Namespaces
Launching a Shell Program Within the Container
Providing the Root File System
The Mount Proc File System
Enabling the Network for the Container
Virtual Networking: A Brief Primer
Enabling Cgroups for the Container
Summary
Chapter 7: Why Choose Rust
Introduction
Rust Installation
Variables
Data Types
Primitive Data Types
Compound Data Types
Structs
Enums
Unions
Functions
Defining Functions
Calling Functions
Function Arguments
Function Return Values
Function Scope and Lifetime
Function Overloading
Generics
Conditional Logic
If/Else Statements
Loops
Match Expressions
Exception Handling
Rust Security Features
Ownership System
Lifetimes
Pattern Matching
Closures
Traits
Summary
Chapter 8: Containers in Rust
Refreshing Linux Namespaces?
Creating a PID Namespace
Creating a Network Namespace
Creating a Mount Namespace
Writing Complete Container Code
Summary
Index

Linux Containers and Virtualization: Utilizing Rust for Linux Containers [2 ed.]
 9781484297681, 9781484297674, 1484297679

  • Commentary
  • Publisher ePUB | Published: 31 October 2023
  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
Recommend Papers