Hypervisors

Type 1 runs on hardware; type 2 on an operating system

TYPE 1TYPE 2HardwareHardwareHypervisorruns directly on the hardwareVM 1VM 2VM 3Host operating system: Windows, macOS, LinuxHypervisor: an ordinary appVM 1VM 2VM 3A type 1 hypervisor runs on the hardware. A type 2 runs on an operating system.Type 1 is for servers: nothing sits between the virtual machines and the hardware, so it isfaster. Type 2 is for a desk: you install it like any program and keep using the computer.

Type 1: bare metal, servers. Type 2: an app on your PC.

Hypervisors · Going deeper

Type 1 and type 2 compared, and what a host needs

Type 1 (bare metal)Type 2 (hosted)Runs onThe hardware itselfA host operating systemExamplesHyper-V, VMware ESXi, KVMVirtualBox, VMware Workstation, ParallelsUsed forServers and data centresTesting and study on a desktop or laptopSpeedClose to the real hardwareSlower: the host takes its shareRequirementPlan forProcessorVirtualization support, switched on in the firmwareMemory and storageEach VM needs its own memory and a virtual disk file, often tens of gigabytesNetworkA virtual network card per VM: shared with the host, or its own addressSecurityPatch and protect every VM and the host; a VM is a full computerThe memory given to all running VMs, plus the host, must fit in the real memory.

ESXi and Hyper-V are type 1. VirtualBox is type 2.

Why virtual machines

A virtual machine is a second computer you can throw away

One physical computerSandboxopen a suspect filewhere it can do no harmTest and developmenttry an update or newcode, then roll backLegacy softwarekeep an old programon its old systemCross-platformrun a Windows appon a Mac, or Linux on a PCA virtual machine is a second computer you can throw away.It is only files, so it can be copied, saved as a snapshot, broken and restored. That iswhat makes it safe for risky work and useful for software the real machine cannot run.

Sandbox, test, legacy, cross-platform.

Why virtual machines · Going deeper

Virtual machines, containers and application virtualization

Virtual machineContainerContainsA whole operating system and the appsOne app and what it needsSharesOnly the hardware, through a hypervisorThe host's operating system kernelSizeGigabytesMegabytesStarts inAbout a minuteAbout a secondIsolationStrong: a separate systemLighter: a shared kernelGood forA different operating system; a sandboxPackaging and running many copies of an appApplication virtualization runs one program in its own bubble, not a whole desktop.It is how a legacy app keeps working on a new system, without a full virtual machine.

A container shares the kernel. A VM brings its own.

Check yourself

Jobrun twenty virtual servers in a rackMachinea new server with nothing installedWantsthe most speed for the virtual servers

Which hypervisor fits this job?

Cloud service models

IaaS, PaaS, SaaS: the provider takes over more of the stack

ApplicationDataRuntimeOperating systemVirtual machinesServers, storage, networkOn your premisesIaaSPaaSSaaSyou managethe provider managesFrom IaaS to PaaS to SaaS, the provider takes over more of the stack.IaaS rents you virtual machines. PaaS runs the code you bring. SaaS is a finished applicationyou sign in to. The more the provider runs, the less you control and the less you maintain.

IaaS: you run the OS up. PaaS: your code. SaaS: just sign in.

Cloud service models · Going deeper

Public, private, hybrid and community

ModelWho uses the hardwareExamplePublicAnyone who signs up; shared between customersAWS, Azure, Google CloudPrivateOne organization onlyA company's own virtualized data centreHybridPublic and private, joined togetherRecords kept on site, the website in a public cloudCommunitySeveral organizations with the same needsHospitals sharing a cloud built to health rulesServiceYou rentExampleIaaSVirtual machines, storage and networksA virtual serverPaaSA place to run your codeA managed database or app platformSaaSA finished applicationWeb mail, online office softwareThe deployment model says who shares the cloud. The service model says what you rent.

Hybrid joins public and private. Community is shared by peers.

Cloud characteristics

Elastic capacity follows demand, not the peak

Servers needed by a shop's website through one day00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:00owning 9 servers, to cover the peak48% of that capacity sits unusedElastic capacity follows demand. Owned capacity is sized for the peak.In a cloud you add servers when demand rises and release them when it falls, and a metercharges only for what ran. That is rapid elasticity and metered utilization.

Elasticity and metered use. Owned servers idle 48%.

Cloud characteristics · Going deeper

The cloud characteristics

CharacteristicMeaningShared resourcesMany customers draw on one pool of hardwareDedicated resourcesHardware set aside for one customer, at a higher priceMetered utilizationUse is measured and billed: hours, gigabytes, data sent outElasticityCapacity grows and shrinks with demand, in minutesAvailabilityCopies in several places keep the service up when one failsFile synchronizationThe same files, kept up to date on every deviceMultitenancyOne system serves many customers, each kept apart from the othersMultitenancy is why a public cloud is cheap, and why isolation between customers matters.

Multitenancy, availability, file synchronization.

Check yourself

Rentsfour virtual servers by the hourInstallsits own operating system and databaseProviderowns the building and the hardware

Which cloud service model is this?

Desktop virtualization

With VDI, the desktop runs on a server

Thin client or laptopa screen, a keyboard,almost nothing storedServer in the data centre or the cloudvirtualdesktop1virtualdesktop2virtualdesktop3keys and mousethe picture of the screenWith VDI the desktop runs in the data centre. Only the picture travels.Virtual desktop infrastructure keeps every desktop on a server, on premises or in a cloud.The device in front of the user holds no data, so a lost laptop loses nothing.

VDI: desktops on a server. The device holds no data.

Desktop virtualization · Going deeper

VDI on premises and in the cloud

VDI on premisesVDI in the cloudDesktops run onThe organization's own serversA provider's serversYou maintainServers, storage and the hypervisorOnly the desktop imagesCostBought up frontPaid monthly, per desktopDepends onThe office networkThe internet connectionEither way, a slow or broken network means a slow or missing desktop.VDI suits call centres, shared desks and staff who handle sensitive data.Patching is one job: update the desktop image and every user gets it.

One image to patch. Needs a good network.

Check yourself

Staffwork only through a virtual desktopDesktopruns on a server in the data centreEventa laptop is stolen from a car

What data is on the stolen laptop?

Lesson complete

You finished “Virtualization and cloud”

Answer the questions along the way to see your score here.

Open in a new tab