{"id":1115,"date":"2024-04-02T12:44:21","date_gmt":"2024-04-02T12:44:21","guid":{"rendered":"https:\/\/learnlearn.uk\/ibcs\/?page_id=1115"},"modified":"2025-04-06T16:24:55","modified_gmt":"2025-04-06T16:24:55","slug":"virtual-machines","status":"publish","type":"page","link":"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/","title":{"rendered":"Virtual Machines"},"content":{"rendered":"<div class=\"responsive-tabs\">\n<h2 class=\"tabtitle\">Intro<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Introduction to Virtual Machines<\/h3>\n<p>A Virtual Machine (VM) is software that emulates a physical computer, allowing multiple operating systems to run on a single hardware platform.<\/p>\n<p>Each VM operates as if it were a real, standalone machine, with its own virtual CPU, memory, storage, and network interfaces \u2014 all managed by the host system.<\/p>\n<p>VMs are widely used for testing, development, server consolidation, and cloud computing.<\/p>\n\n<\/div><h2 class=\"tabtitle\">How VMs Work<\/h2>\n<div class=\"tabcontent\">\n\n<h3>How Virtual Machines Work<\/h3>\n<p>Virtual machines are created and managed by a layer of software called a <strong>hypervisor<\/strong>, which sits between the host hardware and the virtual machines.<\/p>\n<p>There are two types of hypervisors:<\/p>\n<ul>\n<li><strong>Type 1 (Bare-metal)<\/strong> \u2013 runs directly on hardware (e.g., VMware ESXi, Microsoft Hyper-V)<\/li>\n<li><strong>Type 2 (Hosted)<\/strong> \u2013 runs on top of an existing OS (e.g., VirtualBox, VMware Workstation)<\/li>\n<\/ul>\n<p>The hypervisor allocates physical resources like CPU cycles and memory to each VM and ensures isolation between them.<\/p>\n\n<\/div><h2 class=\"tabtitle\">Resources<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Resource Allocation<\/h3>\n<p>Each VM gets a share of the physical system\u2019s resources, which are abstracted and presented virtually.<\/p>\n<p>Key resources include:<\/p>\n<ul>\n<li><strong>CPU<\/strong> \u2013 virtual CPUs (vCPUs) share the host\u2019s physical cores<\/li>\n<li><strong>RAM<\/strong> \u2013 each VM is allocated its own memory space<\/li>\n<li><strong>Storage<\/strong> \u2013 virtual hard disks (VHDs or VMDKs) simulate real drives<\/li>\n<li><strong>Networking<\/strong> \u2013 virtual network interfaces connect VMs internally or externally<\/li>\n<\/ul>\n<p>The hypervisor monitors usage to ensure fair allocation and performance stability.<\/p>\n\n<\/div><h2 class=\"tabtitle\">Benefits<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Benefits of Virtual Machines<\/h3>\n<p>VMs offer flexibility, efficiency, and security \u2014 making them ideal for a wide range of applications.<\/p>\n<p>Major benefits include:<\/p>\n<ul>\n<li><strong>Isolation<\/strong> \u2013 each VM runs independently, preventing one from affecting others<\/li>\n<li><strong>Portability<\/strong> \u2013 VMs can be easily copied, moved, or cloned<\/li>\n<li><strong>Resource Optimization<\/strong> \u2013 multiple VMs can run on a single physical server<\/li>\n<li><strong>Snapshot &amp; Rollback<\/strong> \u2013 easily save and restore system states<\/li>\n<\/ul>\n\n<\/div><h2 class=\"tabtitle\">Use Cases<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Common Use Cases<\/h3>\n<p>Virtual machines are used across industries and IT environments for a wide variety of purposes.<\/p>\n<p>Examples include:<\/p>\n<ul>\n<li><strong>Software Testing<\/strong> \u2013 test apps on different OS configurations without new hardware<\/li>\n<li><strong>Server Consolidation<\/strong> \u2013 replace multiple physical servers with fewer hosts<\/li>\n<li><strong>Disaster Recovery<\/strong> \u2013 create backups of entire systems as virtual images<\/li>\n<li><strong>Cloud Computing<\/strong> \u2013 power cloud services like AWS EC2, Azure VMs, and Google Compute Engine<\/li>\n<\/ul>\n\n<\/div><h2 class=\"tabtitle\">Limitations<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Limitations of VMs<\/h3>\n<p>While VMs are powerful, they do come with some trade-offs.<\/p>\n<p>Challenges include:<\/p>\n<ul>\n<li><strong>Performance Overhead<\/strong> \u2013 some latency due to virtualization<\/li>\n<li><strong>Resource Contention<\/strong> \u2013 if too many VMs run simultaneously, performance can suffer<\/li>\n<li><strong>Complex Management<\/strong> \u2013 large VM environments require sophisticated monitoring and tools<\/li>\n<li><strong>Licensing Costs<\/strong> \u2013 especially for commercial hypervisors or operating systems<\/li>\n<\/ul>\n\n<\/div><h2 class=\"tabtitle\">VMs vs Containers<\/h2>\n<div class=\"tabcontent\">\n\n<h3>VMs vs Containers<\/h3>\n<p>Virtual machines and containers are both used for isolation, but they work differently.<\/p>\n<ul>\n<li><strong>VMs<\/strong> include a full OS and virtualized hardware \u2014 more isolated but heavier<\/li>\n<li><strong>Containers<\/strong> share the host OS kernel \u2014 lighter and faster but less isolated<\/li>\n<\/ul>\n<p>Use VMs when full OS-level separation is required. Use containers for speed and efficiency in microservices or CI\/CD pipelines.<\/p>\n\n<\/div><h2 class=\"tabtitle\">Resources<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Resources<\/h3>\n<div class=\"nv-iframe-embed\">\n<div class=\"container-lazyload preview-lazyload container-youtube js-lazyload--not-loaded\"><a href=\"https:\/\/www.youtube.com\/watch?v=mQP0wqNT_DI\" class=\"lazy-load-youtube preview-lazyload preview-youtube\" data-video-title=\"Virtual Machines explained in 15 Mins\" title=\"Play video &quot;Virtual Machines explained in 15 Mins&quot;\">https:\/\/www.youtube.com\/watch?v=mQP0wqNT_DI<\/a><noscript>Video can&#8217;t be loaded because JavaScript is disabled: <a href=\"https:\/\/www.youtube.com\/watch?v=mQP0wqNT_DI\" title=\"Virtual Machines explained in 15 Mins\">Virtual Machines explained in 15 Mins (https:\/\/www.youtube.com\/watch?v=mQP0wqNT_DI)<\/a><\/noscript><\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction to Virtual Machines A Virtual Machine (VM) is software that emulates a physical computer, allowing multiple operating systems to run on a single hardware platform. Each VM operates as if it were a real, standalone machine, with its own virtual CPU, memory, storage, and network interfaces \u2014 all managed by the host system. VMs&hellip;&nbsp;<a href=\"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Virtual Machines<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"off","neve_meta_content_width":100,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Virtual Machines - IB Computer Science<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Virtual Machines - IB Computer Science\" \/>\n<meta property=\"og:description\" content=\"Introduction to Virtual Machines A Virtual Machine (VM) is software that emulates a physical computer, allowing multiple operating systems to run on a single hardware platform. Each VM operates as if it were a real, standalone machine, with its own virtual CPU, memory, storage, and network interfaces \u2014 all managed by the host system. VMs&hellip;&nbsp;Read More &raquo;Virtual Machines\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/\" \/>\n<meta property=\"og:site_name\" content=\"IB Computer Science\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-06T16:24:55+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/\",\"url\":\"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/\",\"name\":\"Virtual Machines - IB Computer Science\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/#website\"},\"datePublished\":\"2024-04-02T12:44:21+00:00\",\"dateModified\":\"2025-04-06T16:24:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"IB Computer Science\",\"item\":\"https:\/\/learnlearn.uk\/ibcs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Virtual Machines\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/#website\",\"url\":\"https:\/\/learnlearn.uk\/ibcs\/\",\"name\":\"IB Computer Science\",\"description\":\"- learnlearn..uk\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/ibcs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/#organization\",\"name\":\"IB Computer Science\",\"url\":\"https:\/\/learnlearn.uk\/ibcs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/09\/LearnLearnLogowhite-300x41.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/09\/LearnLearnLogowhite-300x41.png\",\"width\":300,\"height\":41,\"caption\":\"IB Computer Science\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Virtual Machines - IB Computer Science","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/","og_locale":"en_GB","og_type":"article","og_title":"Virtual Machines - IB Computer Science","og_description":"Introduction to Virtual Machines A Virtual Machine (VM) is software that emulates a physical computer, allowing multiple operating systems to run on a single hardware platform. Each VM operates as if it were a real, standalone machine, with its own virtual CPU, memory, storage, and network interfaces \u2014 all managed by the host system. VMs&hellip;&nbsp;Read More &raquo;Virtual Machines","og_url":"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/","og_site_name":"IB Computer Science","article_modified_time":"2025-04-06T16:24:55+00:00","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/","url":"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/","name":"Virtual Machines - IB Computer Science","isPartOf":{"@id":"https:\/\/learnlearn.uk\/ibcs\/#website"},"datePublished":"2024-04-02T12:44:21+00:00","dateModified":"2025-04-06T16:24:55+00:00","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/ibcs\/virtual-machines\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"IB Computer Science","item":"https:\/\/learnlearn.uk\/ibcs\/"},{"@type":"ListItem","position":2,"name":"Virtual Machines"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/ibcs\/#website","url":"https:\/\/learnlearn.uk\/ibcs\/","name":"IB Computer Science","description":"- learnlearn..uk","publisher":{"@id":"https:\/\/learnlearn.uk\/ibcs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/ibcs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/ibcs\/#organization","name":"IB Computer Science","url":"https:\/\/learnlearn.uk\/ibcs\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/ibcs\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/09\/LearnLearnLogowhite-300x41.png","contentUrl":"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/09\/LearnLearnLogowhite-300x41.png","width":300,"height":41,"caption":"IB Computer Science"},"image":{"@id":"https:\/\/learnlearn.uk\/ibcs\/#\/schema\/logo\/image\/"}}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/ibcs\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Introduction to Virtual Machines A Virtual Machine (VM) is software that emulates a physical computer, allowing multiple operating systems to run on a single hardware platform. Each VM operates as if it were a real, standalone machine, with its own virtual CPU, memory, storage, and network interfaces \u2014 all managed by the host system. VMs&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/pages\/1115"}],"collection":[{"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/comments?post=1115"}],"version-history":[{"count":3,"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/pages\/1115\/revisions"}],"predecessor-version":[{"id":1251,"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/pages\/1115\/revisions\/1251"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/media?parent=1115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}