virtual machine (VM)¶
A Virtual Machine (VM) is a virtual environment that functions as a virtual computer system within a physical host server.^[400-devops__06-Kubernetes__k8s-ithelp__Day2__README.md] It is created by virtualization technology, which partitions a single physical server into multiple isolated virtual environments.^[400-devops__06-Kubernetes__k8s-ithelp__Day2__README.md]
Architecture and Isolation¶
Each VM operates as a distinct entity with its own complete operating system.^[400-devops__06-Kubernetes__k8s-ithelp__Day2__README.md] Unlike [[containers]] which share the host operating system, a VM includes a full OS stack. This architecture ensures that applications running in different VMs are safely isolated from one another, meaning a process or failure in one VM does not affect the others.^[400-devops__06-Kubernetes__k8s-ithelp__Day2__README.md]
Deployment and Trade-offs¶
The Virtualization Deployment Era emerged to address resource allocation issues inherent in traditional physical server deployments.^[400-devops__06-Kubernetes__k8s-ithelp__Day2__README.md] VMs allow for better utilization of physical server resources and improved scalability compared to running single applications on dedicated hardware.^[400-devops__06-Kubernetes__k8s-ithelp__Day2__README.md]
However, this approach has specific resource requirements. Because every VM requires a complete operating system environment to be established before it can run, it necessitates more system resources (such as disk space and memory) than strictly necessary for the application itself.^[400-devops__06-Kubernetes__k8s-ithelp__Day2__README.md] This can lead to resource waste, as the running service may not utilize the full capacity of the underlying OS included in the VM.^[400-devops__06-Kubernetes__k8s-ithelp__Day2__README.md]
Comparison with Containers¶
While VMs and [[containers]] share similarities in providing isolation, they differ in efficiency. Containers are described as being similar to VMs but with "more relaxed isolation properties."^[400-devops__06-Kubernetes__k8s-ithelp__Day2__README.md]
The primary distinction lies in resource usage: * VMs: Contain a full guest OS, resulting in heavier weight and potential resource redundancy.^[400-devops__06-Kubernetes__k8s-ithelp__Day2__README.md] * Containers: Share the host operating system and only package the necessary application dependencies, making them more lightweight and efficient.^[400-devops__06-Kubernetes__k8s-ithelp__Day2__README.md]
Related Concepts¶
- Container
- Kubernetes
- [[Virtualization]]