SlideShare a Scribd company logo
Ravello Labs
Virtualizing the cloud
Alex Fishman, 05.27.13
http://www.ravellosystems.com
Challenge
How to build a truly
elastic private cloud?
Strategies for building a private cloud
➜ Build a data center to accommodate peaks
› Expensive to build and maintain
› Not efficient because of resource under-utilization
› Not truly elastic
➜ VPC on a public cloud (Amazon VPC, Rackspace private
cloud)
› Can’t run original VM images
› Network configuration is limited
› Lock in to a specific provider
› Perceptually less secure
➜ Build a hybrid cloud
› Mostly a hype at this moment
3
How to achieve elasticity
4
The only way to build a truly elastic
private cloud is to utilize public
cloud infrastructure
Challenges of using public cloud
➜ Incompatible APIs
› EC2, OpenStack flavors, Azure
➜ Different virtualization technologies
› PV vs HVM
› Virtual HW exposed to VM
➜ Network topology
› Vary from provider to provider
› Often rigid and inflexible
➜ Storage
› Incompatible solutions
5
Imagine an OpenStack managing a private cloud built
on top of public cloud infrastructure…
➜ Building blocks of our
OpenStack private cloud
› OpenStack compute nodes
on public cloud VMs
› Quantum L2 overlay on
top of a cloud provider’s
network
› Abstraction for Cinder,
Glance and Swift
6
Sounds easy… But how do you run an OpenStack
compute node on top of a VM?
Public Cloud A Public Cloud B
Compute nodes Compute nodes
Network and Storage
The answer: nested virtualization
➜ HVX is a high performance
nested hypervisor
› Can run on top of any hypervisor
› Runs unmodified guest VMs
› Supports PV and HVM for bottom
virtualization layer
➜ Implements its own set of
virtual hardware
› Compatible with KVM, ESX, XEN
HVX architecture
7
Unmodified guest
VM
Guest VM
hardware
HVX hypervisor
Linux
Cloud VM
hardware
Cloud VM
HVX highlights
➜ High performance
› Benchmarks were run
with Phoronix test
suite
➜ Advanced memory
management
› Allows cpu/memory
overcommit by
utilizing KSM (page
sharing) and swap
8
HVX implementation details
➜ Employs binary translation technique
› Translates guest binary code into platform
compatible code
› 32bit guest into 64 bit host
› Replaces privileged instructions
› CPU registers are shadowed
➜ Performance optimizations
› Translated code is cached and chained
› Fast shadow MMU implementation
› Direct execution or user space code (Ring 3)
› PV device implementation for fast IO
› Fast context switching between guest and host kernel
› Uses Linux for guest CPU scheduling and memory
management
➜ Memory protection and data isolation
› Each guest runs in its own context and cannot access
hvx or host memory
› Guest resource usage (CPU/IO) can be throttled if
needed
9
..
9
Instruction
Instruction
Instruction
….
Jump to next
Tc Instruction
Tc Instruction
Tc Instruction
….
Jump to HVX
Original guest code Translated guest code
Next:
Instruction
Instruction
Instruction
….
Instruction
Next TC:
Tc Instruction
Tc Instruction
Tc Instruction
….
Jump to HVX
HVX compiles next
code section
• HVX reads and compiles a guest
code section. It then gets executed.
• At the end of each translated code
section there is a jump back to HVX
and the process repeats
Combining OpenStack with HVX
10
Build a fully elastic “virtual” private
cloud built on top of any public
cloud provider
Added bonus: get a truly hybrid cloud by adding
compute nodes that run on top of “real” hardware in a
private data center
Use cases
➜ Cost savings for existing cloud users
› EC2 cr1.8xlarge: 244GB, 32 vcpus – $3.5 per hour. When
running 100 VMs: 0.035$ per VM per hour.
➜ Dev/Test
› Deploy and provision a “virtual” private data center in a
matter of minutes
➜ DR
› Migrate easily between clouds
➜ Cloud burst:
› Add a new hardware when demand for computing
capacity spikes
11
OpenStack demo
➜ Configuration:
› EC2 VM running a management node
› EC2 VM (m3.4xlarge, 4 cpus, 16GB ram) as a compute
node 1
› HPCloud VM (4 cpus, 16 Gb RAM) as a compute node 2
➜ Live migration of a guest VM running on HPCloud
compute node to EC2 compute node
12

More Related Content

Alex Fishman - Virtualizing the Cloud

  • 1. Ravello Labs Virtualizing the cloud Alex Fishman, 05.27.13 http://www.ravellosystems.com
  • 2. Challenge How to build a truly elastic private cloud?
  • 3. Strategies for building a private cloud ➜ Build a data center to accommodate peaks › Expensive to build and maintain › Not efficient because of resource under-utilization › Not truly elastic ➜ VPC on a public cloud (Amazon VPC, Rackspace private cloud) › Can’t run original VM images › Network configuration is limited › Lock in to a specific provider › Perceptually less secure ➜ Build a hybrid cloud › Mostly a hype at this moment 3
  • 4. How to achieve elasticity 4 The only way to build a truly elastic private cloud is to utilize public cloud infrastructure
  • 5. Challenges of using public cloud ➜ Incompatible APIs › EC2, OpenStack flavors, Azure ➜ Different virtualization technologies › PV vs HVM › Virtual HW exposed to VM ➜ Network topology › Vary from provider to provider › Often rigid and inflexible ➜ Storage › Incompatible solutions 5
  • 6. Imagine an OpenStack managing a private cloud built on top of public cloud infrastructure… ➜ Building blocks of our OpenStack private cloud › OpenStack compute nodes on public cloud VMs › Quantum L2 overlay on top of a cloud provider’s network › Abstraction for Cinder, Glance and Swift 6 Sounds easy… But how do you run an OpenStack compute node on top of a VM? Public Cloud A Public Cloud B Compute nodes Compute nodes Network and Storage
  • 7. The answer: nested virtualization ➜ HVX is a high performance nested hypervisor › Can run on top of any hypervisor › Runs unmodified guest VMs › Supports PV and HVM for bottom virtualization layer ➜ Implements its own set of virtual hardware › Compatible with KVM, ESX, XEN HVX architecture 7 Unmodified guest VM Guest VM hardware HVX hypervisor Linux Cloud VM hardware Cloud VM
  • 8. HVX highlights ➜ High performance › Benchmarks were run with Phoronix test suite ➜ Advanced memory management › Allows cpu/memory overcommit by utilizing KSM (page sharing) and swap 8
  • 9. HVX implementation details ➜ Employs binary translation technique › Translates guest binary code into platform compatible code › 32bit guest into 64 bit host › Replaces privileged instructions › CPU registers are shadowed ➜ Performance optimizations › Translated code is cached and chained › Fast shadow MMU implementation › Direct execution or user space code (Ring 3) › PV device implementation for fast IO › Fast context switching between guest and host kernel › Uses Linux for guest CPU scheduling and memory management ➜ Memory protection and data isolation › Each guest runs in its own context and cannot access hvx or host memory › Guest resource usage (CPU/IO) can be throttled if needed 9 .. 9 Instruction Instruction Instruction …. Jump to next Tc Instruction Tc Instruction Tc Instruction …. Jump to HVX Original guest code Translated guest code Next: Instruction Instruction Instruction …. Instruction Next TC: Tc Instruction Tc Instruction Tc Instruction …. Jump to HVX HVX compiles next code section • HVX reads and compiles a guest code section. It then gets executed. • At the end of each translated code section there is a jump back to HVX and the process repeats
  • 10. Combining OpenStack with HVX 10 Build a fully elastic “virtual” private cloud built on top of any public cloud provider Added bonus: get a truly hybrid cloud by adding compute nodes that run on top of “real” hardware in a private data center
  • 11. Use cases ➜ Cost savings for existing cloud users › EC2 cr1.8xlarge: 244GB, 32 vcpus – $3.5 per hour. When running 100 VMs: 0.035$ per VM per hour. ➜ Dev/Test › Deploy and provision a “virtual” private data center in a matter of minutes ➜ DR › Migrate easily between clouds ➜ Cloud burst: › Add a new hardware when demand for computing capacity spikes 11
  • 12. OpenStack demo ➜ Configuration: › EC2 VM running a management node › EC2 VM (m3.4xlarge, 4 cpus, 16GB ram) as a compute node 1 › HPCloud VM (4 cpus, 16 Gb RAM) as a compute node 2 ➜ Live migration of a guest VM running on HPCloud compute node to EC2 compute node 12