Sie sind auf Seite 1von 29

Virtualisation

in Debian -
Present and
future
Jan Lübbe

Overview
Why virtualize?
Different approaches
Virtualisation in Debian - Present and
Projects
QEMU
future
VirtualBox
Xen
Xen, KVM, VirtualBox, VMWare, QEmu
KVM
VServer / OpenVZ
libvirt

Debian Jan Lübbe

Debian

2008-08-15
DebConf 8
Virtualisation
in Debian -
Present and
future
Contents
Jan Lübbe

Overview
Why virtualize?
1 Overview
Different approaches
Why virtualize?
Projects
QEMU
Different approaches
VirtualBox
Xen
KVM
VServer / OpenVZ 2 Projects
libvirt
QEMU
Debian
VirtualBox
Xen
KVM
VServer / OpenVZ
libvirt

3 Debian
Virtualisation
in Debian -
Present and
future
Contents
Jan Lübbe

Overview
Why virtualize?
1 Overview
Different approaches
Why virtualize?
Projects
QEMU
Different approaches
VirtualBox
Xen
KVM
VServer / OpenVZ 2 Projects
libvirt
QEMU
Debian
VirtualBox
Xen
KVM
VServer / OpenVZ
libvirt

3 Debian
Virtualisation
in Debian -
Present and
future
Why virtualize?
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects • using applications written for a different OS


QEMU
VirtualBox • testing (software and networking)
Xen
KVM
VServer / OpenVZ
• security
libvirt
• consolidation
Debian
• increasing availability/redundancy
• “cloud computing“ infrastructure
• “follow the sun“
• something else?
Virtualisation
in Debian -
Present and
future
Different approaches
Jan Lübbe

Overview
Why virtualize?
Different approaches
• Full System Virtualization
Projects
QEMU
• VMWare, VirtualBox, KVM, ...
VirtualBox
Xen • Paravirtualization
KVM
VServer / OpenVZ • Xen, lguest, UML, ...
libvirt

Debian
• Container Virtualization
• linux-vserver, Virtuzzo/OpenVZ, ...
• API Translation
• Wine, ...
• System Emulation
• QEMU, PearPC, DOSBox, Hercules, ...
Virtualisation
in Debian -
Present and
future
Emulation
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU • The host emulates a different architecture with all
VirtualBox
Xen necessary hardware
KVM
VServer / OpenVZ
libvirt
• Pro: supports unmodified guests on a wide range of
Debian hardware
• Con: very large overhead
• In some cases it may be faster than the real hardware
despite the overhead (i.e. arm on fast amd64 machine)
Virtualisation
in Debian -
Present and
future
Full System Virtualization
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU • The guest runs unmodified on emulated hardware (on
VirtualBox
Xen the same architecture as the host)
KVM
VServer / OpenVZ
libvirt
• Most code is executed directly, only priviledged
Debian instructions need to be emulated
• Pro: supports unmodified guests
• Con: higher complexity, some guests may have
problems
Virtualisation
in Debian -
Present and
future
Paravirtualization
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU
VirtualBox
Xen • The guest is aware of the virtualization and uses
KVM
VServer / OpenVZ special drivers to access the host
libvirt

Debian
• Pro: lower overhead compared to
Full-System-Virtualization
• Con: guest needs to be modified
Virtualisation
in Debian -
Present and
future
Container Virtualization
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU
VirtualBox
Xen
KVM
• The host provides isolated “containers“ which are
VServer / OpenVZ
libvirt
unaware of each other
Debian • Pro: minimal overhead, better resource sharing
• Con: same kernel for all guests, less isolation
Virtualisation
in Debian -
Present and
future
API Translation
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU
VirtualBox
Xen
KVM
• Applications for a different OS can be run without
VServer / OpenVZ
libvirt
modification
Debian • Pro: no need to run an additional OS, low overhead
• Con: very complex, not all applications are supported
Virtualisation
in Debian -
Present and
future
Contents
Jan Lübbe

Overview
Why virtualize?
1 Overview
Different approaches
Why virtualize?
Projects
QEMU
Different approaches
VirtualBox
Xen
KVM
VServer / OpenVZ 2 Projects
libvirt
QEMU
Debian
VirtualBox
Xen
KVM
VServer / OpenVZ
libvirt

3 Debian
Virtualisation
in Debian -
Present and
future
QEMU - Approach
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU • Supports many host and guest architectures and
VirtualBox
Xen operating systems
KVM
VServer / OpenVZ
libvirt
• Has a large library of emulated devices and is easy to
Debian extend
• Uses dynamic binary translation (which is faster than
CPU emulation)
• QEMU is used by Xen and KVM for device emulation
Virtualisation
in Debian -
Present and
future
QEMU - Features
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU
VirtualBox
Xen
• VM snapshots
KVM
VServer / OpenVZ • USB passthrough
libvirt

Debian • For x86 on x86 and amd64 on amd64 KQEMU gives a


large speedup
• Management with Qemulator (a lightweight GUI)
Virtualisation
in Debian -
Present and
future
VirtualBox - Overview
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU
VirtualBox
• Started by Innotek, now developed by Sun
Xen
KVM • VirtualBox OSE is free software, core of the
VServer / OpenVZ
libvirt commercial product
Debian
• Uses parts of QEMU and dynamic guest patching
• Good GUI, supports seamless windows
• No USB passthrough in the OSE variant
Virtualisation
in Debian -
Present and
future
Xen - Overview
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects • Supports x86, amd64 and IA64


QEMU
VirtualBox
Xen
• Started as paravirtualization for Linux, now supports
KVM
VServer / OpenVZ
full-system-virtualization on modern CPUs
libvirt
• Xen is a small hypervisor which starts a modified host
Debian
system (Dom0)
• The guests run parallel to the host (as a DomU) with
emulated devices in Dom0
• RedHat pushes the mainline merge
Virtualisation
in Debian -
Present and
future
Xen - Features
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU
VirtualBox
Xen
• Mature implementation
KVM
VServer / OpenVZ • Several management tools available
libvirt

Debian
• Live migration (interruption < 0.5 seconds)
• PCI passthrough
• Management via xenman, xen-tools, xen-shell, ganeti
Virtualisation
in Debian -
Present and
future
Xen - Problems
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU
• Missing support for current kernels as Dom0 and only
VirtualBox
Xen
basic support for DomU
KVM • Only DomU kernel support in lenny, 2.6.28 will probably
VServer / OpenVZ
libvirt support Dom0
Debian
• Hypervisor does not support suspend/powersaving,
problematic on notebooks, 3d acceleration on the host
difficult
• Code duplication between hypervisor and Linux kernel
Virtualisation
in Debian -
Present and
future
KVM - Overview
Jan Lübbe

Overview
Why virtualize? • Supports x86 and amd64 (IA64, PowerPC 44x and
Different approaches

Projects
S390 currenly in development)
QEMU
VirtualBox • Started as a full-system-virtualization feature to the
Xen
KVM Linux kernel
VServer / OpenVZ
libvirt • Hardware support (Intel VT or AMD-V) is necessary,
Debian
support for paravirt-ops (the Linux paravirtualization
interface) can speed up I/O
• The guests run as process on the host
• Uses QEMU to emulate hardware
• Is the base for Qumranet’s product Solid ICE
• Ubuntu uses KVM as the default hypervisor
Virtualisation
in Debian -
Present and
future
KVM - Features
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects • No external hypervisor necessary, smaller code size


QEMU
VirtualBox than Xen
Xen
KVM
VServer / OpenVZ
• All features available on the host (power saving,
libvirt
suspend, 3d grapics, realtime)
Debian
• Experimental support for Xen guests via Xenner
• Can be used as an unprivileged user
• Live migration
• Guest swapping
Virtualisation
in Debian -
Present and
future
KVM - Problems
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU
VirtualBox
Xen
KVM
VServer / OpenVZ
• Still under heavy development, regressions happen
libvirt
sometimes (stability and performance)
Debian
• No integrated management tools
Virtualisation
in Debian -
Present and
future
VServer / OpenVZ - Approach
Jan Lübbe

Overview
Why virtualize?
Different approaches
• Virtualizes the Linux kernel, each container has its own
Projects view of the system
QEMU
VirtualBox • Linux-VServer is a community project, OpenVZ was
Xen
KVM released by Parallels and is the base for their
VServer / OpenVZ
libvirt commercial product
Debian
• OpenVZ is working on merging their code into mainline
Linux
• Provides isolation for: filesystems, users, processes,
network, devices
• CPU, memory and bandwidth is shared according to
quotas
Virtualisation
in Debian -
Present and
future
VServer / OpenVZ - Features
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU
VirtualBox
Xen • The host can directly access all files and processes of
KVM
VServer / OpenVZ the guests (which simplifies administration)
libvirt

Debian
• Memory and disk caches can be shared more efficiently
• OpenVZ supports checkpointing and live migration
(although not as seamless as Xen/KVM)
Virtualisation
in Debian -
Present and
future
VServer / OpenVZ - Problems
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU
VirtualBox
Xen • VServer is not released for the latest kernels,
KVM
VServer / OpenVZ experimental patch available since two days ago
libvirt

Debian • The isolation is weaker than with


full-system-virtualization, especially disk bandwidth and
kernel resources
Virtualisation
in Debian -
Present and
future
libvirt - Overview
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU • Toolkit to interact with many virtualization systems
VirtualBox
Xen • Supports Xen, QEMU, KVM, LXC, OpenVZ
KVM
VServer / OpenVZ • Sponsored by RedHat
libvirt

Debian
• Management of virtual machines, virtual networks and
storage
• Access via DBus/PolicyKit or SSH/Kerberos/x509
• Zero-conf discovery using Avahi multicast-DNS
Virtualisation
in Debian -
Present and
future
Contents
Jan Lübbe

Overview
Why virtualize?
1 Overview
Different approaches
Why virtualize?
Projects
QEMU
Different approaches
VirtualBox
Xen
KVM
VServer / OpenVZ 2 Projects
libvirt
QEMU
Debian
VirtualBox
Xen
KVM
VServer / OpenVZ
libvirt

3 Debian
Virtualisation
in Debian -
Present and
future
Current state
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects • Xen has no kernel support for Dom0, all other tools are
QEMU
VirtualBox
in lenny
Xen
KVM
• For Lenny you may to use the Etch Dom0 kernel until
VServer / OpenVZ Lenny+Half
libvirt

Debian • VServer is supported in etch, not yet in lenny


• OpenVZ will be added in lenny
• QEMU, VirtualBox OSE, KVM, OpenVZ, libvirt will be in
lenny
• Most are easy to install and use
Virtualisation
in Debian -
Present and
future
Future
Jan Lübbe

Overview
Why virtualize?
Different approaches
• Xen will probably have Dom0 support in mainline with
Projects
QEMU
2.6.28
VirtualBox
Xen • OpenVZ may be merged into mainline
KVM
VServer / OpenVZ
libvirt
• libvirt will make management easier and more
Debian consistent
• QEMU?
• Long term: OSs become more aware of virtualization
• Better resource sharing, performance
• Pass-through for 3D graphics
• ...?
Virtualisation
in Debian -
Present and
future
Help needed!
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU
VirtualBox
• How can Debian improve regarding virtualization?
Xen
KVM
• Testing needed for many different ...
VServer / OpenVZ
libvirt
• processors (Core Duo, Core 2 Duo, Xeon *, AMD, ...)
Debian • architectures (i386, amd64, ppc, ia64, s390, arm)
• guest systems
• Hard to do on porter machines (root access, kernel
patches)
Virtualisation
in Debian -
Present and
future
Jan Lübbe

Overview
Why virtualize?
Different approaches

Projects
QEMU
VirtualBox
Thanks for listening!
Xen
KVM
VServer / OpenVZ
libvirt

Debian http://wiki.debian.org/SystemVirtualization