NoHype : Virtualized Cloud Infrastructure without the Virtualization

33
NoHype: Virtualized Cloud Infrastructure without the Virtualization Eric Keller, Jakub Szefer, Jennifer Rexford, Ruby Lee IBM Cloud Computing Student Workshop (ISCA 2010 + Ongoing work) Princeton University

description

NoHype : Virtualized Cloud Infrastructure without the Virtualization. Eric Keller , Jakub Szefer , Jennifer Rexford, Ruby Lee. Princeton University. IBM Cloud Computing Student Workshop (ISCA 2010 + Ongoing work). Virtualized Cloud Infrastructure. - PowerPoint PPT Presentation

Transcript of NoHype : Virtualized Cloud Infrastructure without the Virtualization

Page 1: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

NoHype: Virtualized Cloud Infrastructure

without the Virtualization

Eric Keller, Jakub Szefer, Jennifer Rexford, Ruby Lee

IBM Cloud Computing Student Workshop(ISCA 2010 + Ongoing work)

Princeton University

Page 2: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

Virtualized Cloud Infrastructure• Run virtual machines on a hosted infrastructure

• Benefits…– Economies of scale– Dynamically scale (pay for what you use)

Page 3: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

3

Without the Virtualization• Virtualization used to share servers

– Software layer running under each virtual machine

Physical Hardware

Hypervisor

OS OS

Apps Apps

Guest VM1 Guest VM2

servers

Page 4: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

4

Without the Virtualization• Virtualization used to share servers

– Software layer running under each virtual machine

• Malicious software can run on the same server– Attack hypervisor– Access/Obstruct other VMs

Physical Hardware

Hypervisor

OS OS

Apps Apps

Guest VM1 Guest VM2

servers

Page 5: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

5

Are these vulnerabilities imagined?• No headlines… doesn’t mean it’s not real

– Not enticing enough to hackers yet?(small market size, lack of confidential data)

• Virtualization layer huge and growing– 100 Thousand lines of code in hypervisor– 1 Million lines in privileged virtual machine

• Derived from existing operating systems – Which have security holes

Page 6: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

6

NoHype• NoHype removes the hypervisor

– There’s nothing to attack– Complete systems solution– Still retains the needs of a virtualized cloud infrastructure

Physical Hardware

OS OS

Apps Apps

Guest VM1 Guest VM2

No hypervisor

Page 7: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

7

Virtualization in the Cloud• Why does a cloud infrastructure use virtualization?

– To support dynamically starting/stopping VMs– To allow servers to be shared (multi-tenancy)

• Do not need full power of modern hypervisors– Emulating diverse (potentially older) hardware– Maximizing server consolidation

Page 8: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

8

Roles of the Hypervisor• Isolating/Emulating resources

– CPU: Scheduling virtual machines– Memory: Managing memory– I/O: Emulating I/O devices

• Networking• Managing virtual machines

Push to HW /Pre-allocation

Remove

Push to side

NoHype has a double meaning… “no hype”

Page 9: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

9

Scheduling Virtual Machines• Scheduler called each time hypervisor runs

(periodically, I/O events, etc.)– Chooses what to run next on given core– Balances load across cores

hypervisor

timer

switc

h

I/O

switc

h

timer

switc

h

VMs

time

Today

Page 10: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

10

Dedicate a core to a single VM• Ride the multi-core trend

– 1 core on 128-core device is ~0.8% of the processor

• Cloud computing is pay-per-use– During high demand, spawn more VMs– During low demand, kill some VMs– Customer maximizing each VMs work,

which minimizes opportunity for over-subscription

NoHype

Page 11: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

11

Managing Memory• Goal: system-wide optimal usage

– i.e., maximize server consolidation

• Hypervisor controls allocation of physical memory0

100

200

300

400

500

600

VM/app 3 (max 400)VM/app 2 (max 300)VM/app 1 (max 400)

Today

Page 12: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

12

Pre-allocate Memory• In cloud computing: charged per unit

– e.g., VM with 2GB memory

• Pre-allocate a fixed amount of memory– Memory is fixed and guaranteed– Guest VM manages its own physical memory

(deciding what pages to swap to disk)

• Processor support for enforcing:– allocation and bus utilization

NoHype

Page 13: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

13

Emulate I/O Devices• Guest sees virtual devices

– Access to a device’s memory range traps to hypervisor– Hypervisor handles interrupts– Privileged VM emulates devices and performs I/O

Physical Hardware

Hypervisor

OS OS

Apps Apps

Guest VM1 Guest VM2

RealDrivers

Priv. VMDevice

Emulation

traptraphypercall

Today

Page 14: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

14

• Guest sees virtual devices– Access to a device’s memory range traps to hypervisor– Hypervisor handles interrupts– Privileged VM emulates devices and performs I/O

Emulate I/O Devices

Physical Hardware

Hypervisor

OS OS

Apps Apps

Guest VM1 Guest VM2

RealDrivers

Priv. VMDevice

Emulation

traptraphypercall

Today

Page 15: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

15

Dedicate Devices to a VM• In cloud computing, only networking and storage• Static memory partitioning for enforcing access

– Processor (for to device), IOMMU (for from device)

Physical Hardware

OS OS

Apps Apps

Guest VM1 Guest VM2

NoHype

Page 16: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

16

Virtualize the Devices• Per-VM physical device doesn’t scale• Multiple queues on device

– Multiple memory ranges mapping to different queues

Processor Chipset

MemoryC

lass

ifyM

UX M

AC

/PH

Y

Network Card

Peripheralbus

NoHype

Page 17: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

17

• Ethernet switches connect servers

Networking

server server

Today

Page 18: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

18

• Software Ethernet switches connect VMs

Networking (in virtualized server)

Virtual server Virtual server

Software Virtual switch

Today

Page 19: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

19

• Software Ethernet switches connect VMs

Networking (in virtualized server)

OS

Apps

Guest VM1

Hypervisor

OS

Apps

Guest VM2

hypervisor

Today

Page 20: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

20

• Software Ethernet switches connect VMs

Networking (in virtualized server)

OS

Apps

Guest VM1

Hypervisor

OS

Apps

Guest VM2

SoftwareSwitch

Priv. VM

Today

Page 21: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

21

Do Networking in the Network• Co-located VMs communicate through software

– Performance penalty for not co-located VMs– Special case in cloud computing– Artifact of going through hypervisor anyway

• Instead: utilize hardware switches in the network– Modification to support hairpin turnaround

NoHype

Page 22: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

22

Removing the Hypervisor Summary• Scheduling virtual machines

– One VM per core

• Managing memory– Pre-allocate memory with processor support

• Emulating I/O devices– Direct access to virtualized devices

• Networking– Utilize hardware Ethernet switches

• Managing virtual machines– Decouple the management from operation

Page 23: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

23

NoHype Double Meaning• Means no hypervisor, also means “no hype”

• Multi-core processors• Extended Page Tables• SR-IOV and Directed I/O (VT-d)• Virtual Ethernet Port Aggregator (VEPA)

Page 24: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

24

NoHype Double Meaning• Means no hypervisor, also means “no hype”

• Multi-core processors• Extended Page Tables• SR-IOV and Directed I/O (VT-d)• Virtual Ethernet Port Aggregator (VEPA)

Current Work: Implement it on today’s HW

Page 25: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

25

Xen as a Starting Point

• Management tools• Pre-allocate resources

– i.e., configure virtualized hardware

• Launch VM

Xen

Guest VM1Priv. VM

xm

Pre fill EPT mapping to partition memorycore core

Page 26: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

26

Network Boot

• gPXE in Hvmloader – Added support for igbvf (Intel 82576)

• Allows us to remove disk– Which are not virtualized yet

Xen

Guest VM1Priv. VM

xm

core core

hvmloader

DHCP/gPXE

servers

Page 27: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

27

Allow Legacy Bootup Functionality

• Known good kernel + initrd (our code)– PCI reads return “no device” except for NIC– HPET reads to determine clock freq.

Xen

Guest VM1Priv. VM

xm

core core

kernel

DHCPgPXE

servers

Page 28: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

28

Use Device Level Virtualization

• Pass through Virtualized NIC• Pass through Local APIC (for timer)

Xen

Guest VM1Priv. VM

xm

core core

kernel

DHCPgPXE

servers

Page 29: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

29

Block All Hypervisor Access

• Mount iSCSI drive for user disk• Before jumping to user code, switch off hypervisor

– Any VM Exit causes a Kill VM– User can load kernel modules, any applications

Xen

Guest VM1Priv. VM

xm

core core

kernel

DHCPgPXE

servers

Kill VMiSCSI

servers

Page 30: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

30

Timeline

time

hvmloaderSet up Kernel(device disc.)

Customer code

GuestVMspace

VMX Root

Page 31: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

31

Next Steps• Assess needs for future processors

• Assess OS modifications– to eliminate need for golden image

(e.g., push configuration instead of discovery)

Page 32: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

32

Conclusions• Trend towards hosted and shared infrastructures• Significant security issue threatens adoption• NoHype solves this by removing the hypervisor• Performance improvement is a side benefit

Page 33: NoHype :  Virtualized Cloud Infrastructure without the Virtualization

33

Questions?

Contact info:

[email protected]

http://www.princeton.edu/~ekeller

[email protected]

http://www.princeton.edu/~szefer