virtualisation Flashcards

1
Q

why do we use virtualisation

A

makes better use of machine resources
allows platforms to appear as completely independent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what are some of the features of virtualisation

A

base images/templates
snapshots
clone
live migration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

clone

A

copy the snapshot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

base images/templates

A

pre-canned installations that can be modified or replicated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

snapshots

A

capture and preserve the entire state of the machine which can then be resurrected or moved to a different machine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

live migration

A

stop the os and reload/resume on another machine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

type 0 virtualisation

A

e.g. mainframe
hardware support allows hardware partitioning
groups of resources can be under the control of different os

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

type 1 virtualisation

A

e.g. linux
os based virtualisation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

type 2 virtualisation

A

e.g. vmware virtual box
user space virtualisation therefore it doesnt require support from the underlying system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what are the two alternative types of virtualisation

A

containers
emulations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

containers

A

e.g. docker
replicates some of the internal data structures of an existing os and makes it appear that there are multiple instances of it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

emulations

A

e.g. qemu
emulates the underlying system and can load another os on top of it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what are some of the low level elements of a system that the os needs to control

A

processors
interrupt and timer systems
memory management system
direct access to all io subsystems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

how does unsupported virtualisation work

A

the host os runs as normal in the kernel/supervisor space, protecting components
the guest os runs in the user space so its seen as a regular application level process
all apps run in user space

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

unsupported virtualisation

A

type 2: no assistance from the underlying platform

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

how does “unsupported” virtualisation work on the x86

A

host = ring level 0
guest = ring level 1
apps = ring level 3
the apps dont impact the guest while it still has more rights than the user
the host stays the most privileged

17
Q

what are two issues with implementing “unsupported” virtualisation work on the x86 and how would we go around them

A

not portable: usually only supports user and kernel space
some instructions work differently in different levels and some dont work at all so we must either emulate what the instruction would do or dynamically rewrite the instructions to emulate what its meant to do

18
Q

para-virtualisation

A

the os understands that they could be running as the host or guest

19
Q

how does para-virtualisation work

A

if the os is running as a host then it acts as normal
if running as the guest theyll make calls to the host to carry out functions on its behalf
if the host gets events meant for the guest then itll do an up-call to it to signal that an io event has occurred instead of normal interrupt handling

20
Q

what are the dangers of para-virtualisation

A

we dont want the kernel to be overly dependant on one os
dont want different kernels
dont want the difference between the host and guest to be visible to other apps and services

21
Q

first gen model of virtualisation (os hosted vm monitor)

A

guest os is on top of the os and drivers
to access a device you go through the underlying os and the request is managed and passed to the appropriate device driver

22
Q

positive of first gen model of virtualisation

A

flexible: well established set of drivers

23
Q

negative of first gen model of virtualisation

A

inefficient: fine granularity access to drivers

24
Q

second gen model of virtualisation (standalone hypervisor)

A

guest os on top of the minimal hypervisor
guest can go into the hypervisor and make direct use of device drivers

25
Q

positive of second gen model of virtualisation

A

efficient and lightweight

26
Q

negative of second gen model of virtualisation

A

the hypervisor has its own provider therefore the device drivers arent written for it so wed usually use a generic driver
however most of the additional features and performance for devices is only available if you use the driver made for it

27
Q

third gen model of virtualisation (hybrid vmm)

A

service vm with a device driver on it which provides a host for the drivers
everything is then on top of the micro-hypervisor

28
Q

positive of third gen model of virtualisation

A

lightweight with driver support

29
Q

how do we access memory in a vm

A

request go through a mapping with the guest then another with the host
creating a 4 level nested page table

30
Q

what is the layout of a pci address

A

1st part = the bus the device is on
2 = which device on the bus
3 = which function on the device

31
Q

why do we use the pci address (+)

A

allows us to add protection domains

32
Q

how do protection domains work

A

one domain per function
each domain has its own IO-MMU page table

33
Q

how do we access memory through the shadow tables

A

the bus = page directory
the device and function number is the index in the table which stores the mapping for the address in memory

34
Q

what is the role of the IO-MMU

A

provides vm level protected dma

35
Q

how does intel VT-d IO-MMU work

A

allows a shadow copy of the page tables being used by the processors for the devices in the system
we can define the tables based on which devices are talking to which parts of memory

36
Q

how does single root io virtualisation (SR-IOV) work

A

the host os can access a devices physical function and configure the device to instaciate a number of virtual functions and each vm binds to one of the virtual interfaces

37
Q

virtual function

A

an instance of a function of a device that is individually addressable