Intro To Virtualization Mohammed Morsi
What Is Virtualization ● Many of you many have encountered it w/ the JVM.... ● Expand the concept of resource abstraction to _all_ computer resources and you have Virtualization
Virtualization Terminology ● Physical Machine ● Host OS ● Hypervisor ● Virtual Machine (VM) ● Guest OS
Virtualization Terminology
Virtualization Features ● All hardware is abstract ● Multiple software stacks (right up from the OS) can be run in parallel ● Each OS is isolated, given its own complete set of virtual resources (which are managed by the hypervisor) ● Configure any complex custom resources scenario ● Complex networks w/ many nodes all on one box ● Hard drives can be file or partition based, backups / snapshots are a cinch ● Can run Linux, BSD, Windows, Mac OSX and other os's in parallel ● Can run guest os's on different architectures (limitations apply) ● Guest OS’s running via hardware virtualization on multi core systems will be running a almost* the same speed as they would natively * with little overhead due to the hypervisor
Virtualization Security
Electricity and Rack Space Savings
Virtualization Requirements ● Hardware Capabilities (the beefier the better), though... ● Software emulation is available, albeit slower ● Kernel modules / drivers, host-capable OS ● Hypervisor (many different ones available) ● Provides daemon, end user binaries, and an API to managed virtual machines
Hypervisors ● KVM ● QEMU ● Xen ● VMWare ● OpenVZ ● Libvirt
libvirt ● A toolkit to interact with the virtualization capabilities of recent versions of Linux ● Licensed under the LGPLv2 ● C API w/ many language bindings ● Supports Xen, QEMU, KVM, LXC, OpenVZ, User Mode Linux, VirtualBox, VMware, remote management, and more
libvirt ● API ● virsh (/etc/libvirt ; /var/lib/libvirt) ● Virt-manager ● oVirt
libvirt VM config syrlug 92aea033-65aa-4dae-964e-f0e73ec74c hvm destroy restart /usr/bin/qemu-kvm -->
libvirt network config mynet e7e3168b-321a-41ec-a3ef dc3
libvirt
Demo
Virtualization Use Cases ● Assign physical partition or just a flate file for VM disk access ● Or use any number of storage solutions, nfs, san, iscsi, etc ● Enforce any filesystem / disk quotas ● Migrate running or backed up system (oh noes! my server iz going down! quickly migrate my vms to another physical box) ● Easy backups / snapshots (not sure if the next few commands are going to break your vm, backup, run it, restore if necessary) ● Easy to setup and then reproduce / clone existing environments, can release custom OS images w/ your own software on it ● Many different development / testing scenarios on one box ● Multiple isolated OS's (very secure) while only needing on box
Even More Virtualization Use Cases ● Create virtual networks, connect your vms in any interesting way: ● Add any vm to any network any number of times, using as few or as many virtual and physical nics that you need ● Bridge devices, custom MAC and ip assignment, etc ● Scale up/down vm resources as necessary (http server in high demand, give that vm more resources, take some away from other servers) ● Send / receive i/o from any sink/source ● vnc and ssh access to vm from anywhere ● Autostart vm's on host machine startup ● Custom system management tools, using the virtualization APIs, ● libvirt supports remote management through which to control vms on any number of remote boxes, over any number of connection types, tcp, tls, ssh, kerberos, etc ● Assign highly detailed ACLs to who has access and what people can and cannot do on the vm
(Very brief) Into to Cloud Computing ● Extremely new field and thus very misunderstood ● (doesn't help that sales people are now trying to tie the 'cloud' to every product) ● Now that all computer h/w is abstractified we can do so really cool things when it comes to ● automation, ● resource management, and ● miniming boilerplate to getting software up and running ● Offers one click solutions to getting any software stack up an running (a LAMP or w/e other server is a click away) ● Cloud provider manages 99% of everything for you, ● All hardware resources, networks, backups, software stacks & support, etc. All you need if a few click (or commands or API calls), and then ssh into your environment
Cloud Computing * Distributed/Grid Computing * Service Oriented Architectures * Virtualization
Links ● ● ● ● Comments / Questions ?