OS Virtualization Principles
Principles
- Run multiple instances of OSes simultaneously
- Multitasking at the OS level
- Garantee isolation between OSes
- Provide controlled resources sharing
Applications of OS Virtualization
Wide range of use cases:
- Server consolidation
- Colocation of services
- Security, isolation, maintainance
- Regression tests
- ...
Virtual Machines and Hardware
Ideally virtualization is transparent to guest OSes
- Common principle in mainframe design
- Nearly impossible with i386 design
- Running unmodified i386 OS guests is horribly tricky
- Those tricks kills performances in some scenarii
4 ways to run i386 OS guests
How to circumvent the lack of virtualization support
- Emulate an ideal processor: QEmu, emulators
- Rewrite the code transparently: VMWare
- Recompile the OS for virtualization: Xen, paravirtualization
- Fix the CPU: Intel VT-X, AMD Pacifica
Paravirtualization and Xen
Xen comes from the University of Cambridge
Do not hide the virtualization from the guest OSes
- Port the OS to work with Xen
- Reuse the OS drivers, but monitor hardware access
- Linux, NetBSD. FreeBSD, OpenSolaris and Plan9 worked on.
Xen's performances
Borrowed from their paper at SOSP in 2003
Xen's performances II
Borrowed from 2005 presentation at OLS
Xen's performances III
Borrowed from 2005 presentation at OLS
Xen for Linux
Xen is been integrated in Linux upstream ... slowly
- this is a separate sub architecture of i386/x86_64/ia64
- Xen runs as the hypervisor, linux runs in ring 1 or 3
- kernel instances call the hypervisor for resources
- the hypervisor uses linux first domain for the drivers
Xen Architecture
Current state
Xen is still a work in progress:
- Not integrated upstream, kernel API design ongoing
- Large changes happen, incompatibles ones
- Basic tools exists
- Integration in OS tools has started
Features
Core functionalities are here
- Create, Reboot, Shutdown, Destroy
- Suspend, Resume in memory
- Save, Restore from disk images
- Device support: Disks, Networking, Console
- Migration of domains [*]
[*] assuming conditions are met
Xen's migration data
Borrowed from this year presentation at OLS
Still a work in progress
Virtualization in general is moving fast
- Many virtualization solutions appears
- Hardware support progresses (CPU and devices)
- Storage specific solutions, snapshots
- Consolidation of APIs
- High level tools design (dynamic placement)
Red Hat involvement
Stabilize, stabilize, stabilize ...
- Integration in Linux kernel
- Regression testing, security audit, bug fixes
- Isolation layer: libvirt
- Management tools: virt-manager
- Integration in Fedora Core and RHEL management tools
Useful Links
Fedora Xen Kickstart
Fedora Virtualization
Xen FAQ Wiki
Cambridge Lab. Xen page
XenSource
Questions ?
Come see the demo