MindWorks UK


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

MindWorks UK

  1. 1. MindWorks UK Joe Doupnik Mindworks and Oxford University jrd@cc.usu.edu
  2. 2. MindWorks UK XEN v1.0, 2003. Today XEN is at v3.01 ©MindworksUK 2006
  3. 3. MindWorks UK ©MindworksUK 2006
  4. 4. MindWorks UK All virtualisation tools need to recast certain systems calls, by either Emulator traps via the hardware (classical) Dynamic patching of guest code, pointing to emulator handler (VMware, VPC) Static rewriting of guest code to call emulator handler (XEN, hypervisors ) ©MindworksUK 2006
  5. 5. MindWorks UK Emulation may offer a BIOS and thus boot almost any system VMware and VPC do so XEN does not, and installation becomes difficult Emulators could have employed existing native file systems for use by virtual machines. None does to boot machines. Complete PC emulation, with speed, is not available today VMware & VPC come close XEN is the fastest <incomplete> virtualizer ©MindworksUK 2006
  6. 6. MindWorks UK ©MindworksUK 2006
  7. 7. MindWorks UK Starting fresh, blundering ahead Hmmm, this is a bit curious. Let s choose Run an OS installation pgm because we have neither existing virtual nor real machine on disk. ©MindworksUK 2006
  8. 8. MindWorks UK Following my nose: use YaST to setup a XEN virtual machine ©MindworksUK 2006
  9. 9. MindWorks UK Kind of installation source With VNC console ©MindworksUK 2006
  10. 10. MindWorks UK The fine print I have a .iso file for NetWare, but this menu is confusing ©MindworksUK 2006
  11. 11. MindWorks UK The fine print was correct Oh dear, not what the system wanted ©MindworksUK 2006
  12. 12. MindWorks UK XEN activates/boots only XEN-enabled kernels No BIOS, no general cold boot loader, only special loader [Only VT/Pacifica hardware assisted XEN has boot facilities] YaST assists writing of configuration file, optionally building a bootable o/s ------------- No removable devices, manual labor is required to rehook a device after a change File i/o is overly buffered, unsequenced, ruins journaling approach ©MindworksUK 2006
  13. 13. MindWorks UK http://www.novell.com/documentation/vmserver/index.html ©MindworksUK 2006
  14. 14. MindWorks UK Fully virtual or full virtualization refers to a virtual machine mode that completely emulates all hardware devices. Paravirtual or paravirtualized refers to a virtual machine mode that requires the VM s operating system to be optimized to run in a Xen VM Server environment. Operating systems that can run in paravirtual mode do not require hardware simulation, but instead use an API to interact with the host virtualization platform. Paravirtual mode delivers better performance than fully virtual mode and does not require special virtualiation technology hardware. Paravirtualized operating system refers to an operating system that is capable of running in paravirtual mode. It is also called a VM-aware, xen-enabled, modified, or optimized guest. Native operating system refers to the typical operating system that is not optimized for the virtual machine environment and must run in full virtualization mode. It cannot run in paravirtual mode. This type of operating system is also called shrink-wrapped, out-of-the-box, unmodified, or fully virtualized guest. Virtualization technology (VT) computer refers to a computer that supports virtualization technology, such as Intel* VT or AMD* Virtualization. VT computers work with Xen software to simulate the complete hardware environment, allowing an operating system to run without being optimized for the VM platform. A VT computer is required for an operating system to run in fully virtual mode. Standard computer refers to a computer that does not include special support for virtualization technology and cannot run operating systems that require full virtualization mode. Virtual machine monitor (VMM) and hypervisor refer to the software layer developed and maintained by the Xen open source community. This layer provides much of the Xen VM Server functionality. http://www.novell.com/documentation/vmserver/index.html ©MindworksUK 2006
  15. 15. MindWorks UK ©MindworksUK 2006
  16. 16. MindWorks UK Emulation method, para/regular Full virtualization requires specialized hardware ©MindworksUK 2006
  17. 17. MindWorks UK ©MindworksUK 2006
  18. 18. MindWorks UK YaST helps create VM configuration text file YaST creates large empty file as VM s disk drive YaST mounts that file(system) to an existing directory YaST install into directory uses host SUSE to build a new operating system into that directory Finally, unmount the file from the directory Later XEN is told to activate a new VM, using the kernel and modules found in that file to start it ©MindworksUK 2006
  19. 19. MindWorks UK SUSE installation text window ©MindworksUK 2006
  20. 20. MindWorks UK Installed, any more VM tweaks? ©MindworksUK 2006
  21. 21. MindWorks UK ©MindworksUK 2006
  22. 22. MindWorks UK # cd /etc/xen/vm # ls vm1 # more vm1 disk = [ 'file:/var/lib/xen/images/vm1/hda,hda,w', 'file:/home/extra/SLES-10-AMD64-EM64T-DVD1.iso,hdb,r' ] memory = 512 vcpus = 2 builder = 'linux' name = 'vm1' vif = [ 'mac=00:16:3e:bb:81:01' ] localtime = 0 on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart' extra = ' TERM=xterm' bootloader = '/usr/lib/xen/boot/domUloader.py' bootentry = 'hda2:/boot/vmlinuz-xen,/boot/initrd-xen' Note requirement to name kernel boot files YaST s menus help construct this text file ©MindworksUK 2006
  23. 23. MindWorks UK # xm Usage: xm <subcommand> [args] Control, list, and manipulate Xen guest instances xm common subcommands: console <DomId> Attach to domain DomId's console. create [-c] <ConfigFile> [Name=Value].. Create a domain based on Config File destroy <DomId> Terminate a domain immediately help Display this message list [--long] [DomId, ...] List information about domains mem-set <DomId> <Mem> Adjust the current memory usage for a domain migrate <DomId> <Host> Migrate a domain to another machine pause <DomId> Pause execution of a domain reboot <DomId> [-w][-a] Reboot a domain restore <File> Create a domain from a saved state file save <DomId> <File> Save domain state (and config) to file shutdown <DomId> [-w][-a][-R|-H] Shutdown a domain top Monitor system and domains in real-time unpause <DomId> Unpause a paused domain vcpu-set <DomId> <VCPUs> Set the number of VCPUs for a domain <DomName> can be substituted for <DomId> in xm subcommands. For a complete list of subcommands run 'xm help --long' For more help on xm see the xm(1) man page For more help on xm create, see the xmdomain.cfg(5) man page ©MindworksUK 2006
  24. 24. MindWorks UK SuSE 10 guest, XEN-ised, text mode login screen connected to a host tty SuSE 10 host, XEN-ified ©MindworksUK 2006
  25. 25. MindWorks UK GUI to guest requires VNC or web equiv ©MindworksUK 2006
  26. 26. MindWorks UK Dual CPU hardware for both host and guest o/s $ uname -a Linux netlab4 #1 SMP Tue Sep 19 07:26:15 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux ©MindworksUK 2006
  27. 27. MindWorks UK Bridged, NAT, routed provided DHCP server is not provided Documentation is sparse (at best) Activation of XEN moves host machine (Dom0) into a forwarded IP role, normal direct comms vanish Renaming of Ethernet interfaces is just plain confusing, and seemingly unnecessary Time is not adjustable (no NTP), fixed by host, not well done ©MindworksUK 2006
  28. 28. MindWorks UK Host Guest ©MindworksUK 2006
  29. 29. MindWorks UK host Linux and VM community making a mess of time keeping. They should know better: through- reference the underlying single time source, that of one host cpu guest Guest hardware clock locked to XEN, not adjustable, do not run NTP in guest, learn to expect silly time offsets ©MindworksUK 2006
  30. 30. MindWorks UK Two identical VMs, shared disk storage Issue xen command on host xm migrate --live vm1 vm2 Updates memory pages over the net Stops active machine Enables fallback machine Network outage time is ~0.16 sec Need to deal with ARP caches ©MindworksUK 2006
  31. 31. MindWorks UK http://www.cl.cam.ac.uk/research/srg/netos/papers/2005-migration-nsdi-pre.pdf ©MindworksUK 2006
  32. 32. MindWorks UK Currently, only single processor Linux OS kernels can run on fully virtual VMs. If you load an SMP- enabled kernel on a fully virtual VM, it will not run. We are working to allow fully virtual VMs to run SMP-enabled kernels in a future SLES 10 update. VMs running PAE must be allocated less than 2 GB of memory http://www.novell.com/documentation/vmserver/index.html?page=/documentation/vmserver/vm_server_admin/data/b5q74jb.html ©MindworksUK 2006
  33. 33. MindWorks UK guest host ©MindworksUK 2006
  34. 34. MindWorks UK About Paravirtual CD Readers A paravirtual VM accesses CD or DVD media by attaching a CD reader as a fixed block device, not as a removable media device. For this reason, typical commands associated with CD readers, such as eject or autorun, do not work. Writing to the CD is not possible from a paravirtualized VM (even if you specify the block device as -w). Accessing and ejecting the CD is still possible, but must be done using the VM Server terminal commands attach and detach. For example, instead of using the eject command (or simply pressing the eject button on the reader) to eject the CD from the reader, you must detach the CD reader from the VM using the detach command. After the CD reader detaches, the CD can then be safely removed from the CD reader. To read another CD, you must insert the CD and reattach the CD reader. Some applications running are programmed to specifically recognize the CD reader. This type of application might not be able to access the CD media, even though it is attached as a block device. I have spared us the command syntax for this lovely change operation ©MindworksUK 2006
  35. 35. MindWorks UK How does Xen compare to similar VMs such as VMWare and user-mode Linux? Some VMWare users will find it beneficial, but others will not. VMWare provides a full virtualized machine that looks, smells, and tastes like a "real" PC it even has a BIOS. Xen is paravirtualized, hence the necessary changes. (Paravirtualized means you have to do some porting and can't just run an existing OS unmodified.) Xen [is] more likely to be a replacement for people using user-mode Linux now. http://www.redhat.com/magazine/004feb05/features/virtualization/ ©MindworksUK 2006
  36. 36. MindWorks UK Partly developed Scattered fragmentary documentation Runs only kernels rewritten for XEN Messy network, unsophisticated disk i/o Removable device support is lacking Primitive management interfaces Fuller virtualisation possible only with newest CPUs (VT/Pacifica), the code is not stable SMP and memory constraints with full virtualisation, details are changing with time But XEN is free and open (and therefore good ) ©MindworksUK 2006
  37. 37. MindWorks UK What has happened is the XEN project has spurred other vendors to use similar techniques for improved throughput and possibly security. XEN s influence extends well beyond its current software. Virtualization has been with us for over 40 years. So has multitasking. PC virtualization is arising now that PC hardware is ahead of software. http://www.dharma-media.org/media/general/dwnld/thanka/deity_wrathful/wheel_of_life.jpg ©MindworksUK 2006
  38. 38. MindWorks UK MindWorks Inc. Ltd 210 Burnley Road Weir Bacup OL13 8QE UK Telephone: +44 (0) 170 687 1900 Fax: +44 (0) 170 687 8203 Web: www.mindworksuk.com Email: training@mindworksuk.com ©MindworksUK 2006