strangerRidingCaml

Virtualization 본문

Advanced operating system

Virtualization

woddlwoddl 2024. 5. 15. 11:43
728x90
Virtualization

Virtualization

Virtual machines vs. containers

Virtual machines (VMs) emulate a complete hardware environment, allowing the execution of multiple operating systems on a single physical machine. Containers virtualize the operating system environment rather than emulating hardware, sharing the host operating system's kernel and resources.

Hypervisors and virtualization techniques

Hypervisors are software layers enabling the creation and management of virtual machines. There are two types: Type 1 hypervisors run directly on the host hardware, while Type 2 hypervisors run as applications within a host operating system.

Virtualization techniques include full virtualization, where the hypervisor simulates complete hardware to guest operating systems, and paravirtualization, where guest operating systems are modified for direct interaction with the hypervisor.

Resource management and isolation

Virtualization platforms provide features for resource management to allocate and manage CPU, memory, storage, and network bandwidth among virtual machines. Isolation mechanisms such as memory protection, network segmentation, and access control policies enforced by the hypervisor ensure security between virtual machines.

Lab Activities

Virtual Machines Lab Activity


        // Sample code for creating a virtual machine using a hypervisor (e.g., VMware)
        vm.create({
            name: 'MyVM',
            os: 'Ubuntu',
            memory: '4GB',
            storage: '50GB',
            network: 'bridged'
        });
    

Containers Lab Activity


        # Sample Dockerfile for creating a containerized application
        FROM ubuntu:latest
        RUN apt-get update && apt-get install -y python3
        CMD ["python3", "-m", "http.server", "80"]
    

Hypervisors Lab Activity


        // Sample code for managing virtual machines using a Type 1 hypervisor (e.g., Xen)
        hypervisor.startVM('MyVM');
        hypervisor.pauseVM('MyVM');
        hypervisor.stopVM('MyVM');
    

Virtualization Techniques Lab Activity


        // Sample code demonstrating full virtualization using QEMU
        qemu-system-x86_64 -m 1024 -hda mydisk.img -cdrom mycdrom.iso
    

Resource Management Lab Activity


        // Sample code for setting resource limits for a virtual machine
        vm.setResourceLimits('MyVM', {
            cpu: '50%',
            memory: '2GB',
            storage: '30GB',
            network: '10Mbps'
        });
    

Isolation Lab Activity


        // Sample code for configuring network isolation between virtual machines
        hypervisor.configureNetworkIsolation('VM1', 'VM2', 'deny');
    

'Advanced operating system' 카테고리의 다른 글

Kernel Module Development for Linux  (0) 2024.05.15
File Systems  (0) 2024.05.15
Distributed Systems  (0) 2024.05.15
Kernel Architecture  (0) 2024.05.15
Introduction to Advanced Operating Systems  (0) 2024.05.15