Transcription
PAC097VMware Workstation andGSX Server Architecture andInternals: The EvolutionScott DevineFounder, Principal EngineerVMware
This presentation may contain VMwareconfidential information.Copyright 2005 VMware, Inc. All rights reserved. All othermarks and names mentioned herein may be trademarks of their respectivecompanies.
Outline Basic Architecture Virtual Machine State Networking
Conventional Computer SystemApplicationApplicationApplicationOperating SystemHardware Operating Systems provide Hardware management / device drivers Application programmers interface (APIs)
Traditional Virtual Machine nOperating SystemOperating SystemVirtual MachineVirtual MachineVirtual Machine MonitorHardware Virtual machines provide Encapsulation Isolation Hardware Independence
VMware Workstation Goals Provide the traditional benefits ofvirtual machines Virtualize x86 PCs Run like an application Run with good performance
VMware as an Application Installs like an application on anexisting computer system All virtual machine data stored onexisting file system No disk partitioning Native applications can runsimultaneously to virtual machines Use existing device drivers
VMware as an ApplicationAppAppGuest OSVirtual MachineNativeApplicationVMware WorkstationHost OSHardware
VMware Virtual Machine Monitor Virtualization techniques require Access to privileged CPU state Complete control of the Memory Management Unit(MMU) The Host OS gets in our wayNeed to both run as an application andas a privileged virtual machine monitor
3-Component ModelAppNativeApplicationAppGuest OSVMware WorkstationVirtual MachineVMMHost OSHardware Switch to privileged VMM to run virtualmachine VMM takes complete control of CPU and MMU Host OS state is saved / restored on “World” switch
Resources The application only switches to the VMMwhen it’s running VMM switches back on interrupts Host OS sees the application as running during thistime The application allocates all memory used bythe virtual machine All resources used by the virtual machineare charged to the application
DevicesAppNativeApplicationAppGuest OSVMware WorkstationVirtual MachineVMMHost OSHardware Device I/O is routed through theapplication Use standard OS system call interfaces
CPU / Memory Virtualization Traditional virtualization techniqueDirect Execution Run OS at an unprivileged CPU level CPU traps to VMM on privileged instructions VMM emulates privileged instruction However, x86 is not strictlyvirtualizable
Binary Translation Inspects each instruction before itsexecuted Replaces “dangerous” instructionswith calls to emulation code Stores sequences of translatedinstructions in a translation cache Fast, but slower than direct execution
Dual Virtualization Method Use traditional direct execution whenpossible Well behaved user-level programs Use binary translation when not Operating system Real mode programs (old 16 bit DOS apps) User-level programs with special privileges (Xserver on Linux)
Dual Virtualization MethodDirect ExecutionReturn toVMDirectExec.OK?Binary TranslationCPUStateEmulationPrivilegedInstruction
Goals Met 3-Component model Acts like an application Use raw hardware for best performance Device I/O through application Reuse device drivers on host OS Dual virtualization Virtual x86 with binary translation Get good performance with direct execution
Outline Basic Architecture Virtual Machine State Networking
Virtual Machine State Virtual machine encapsulation: All thestate of the virtual machine is stored ona few files on the host file system
Disks All disk state is stored inhost files Disk read/writecommands from theguest are translated intofile read/write systemcallsAppAppGuest OSVMDiskHostFile
Delta DisksBaseDiskVM ADiskDeltaDisk Only stores differences between original andchild Dependent on original disk not changing
Checkpoints Virtual machine’s runningstate captured to a hostfile CPU state Memory Device state TimeAppAppGuest OSVMCheckpointFile
Undoable Disks – Workstation 1.0VM’sDiskDiskFile Put disk in Undoable mode
Undoable Disks – Workstation 1.0VM’sDisk.REDODiskFile Put disk in Undoable mode All writes would go to a .REDO deltadisk
Undoable Disks – Workstation 1.0.REDOVM’sDiskDiskFile Put disk in Undoable mode All writes would go to a .REDO deltadisk Commit or discard at power off
Undoable Disks – Workstation 1.0.REDOVM’sDiskDiskFile Put disk in Undoable mode All writes would go to a .REDO deltadisk Commit or discard at power off
Suspend/Resume – Workstation 2.0 Use a checkpoint to suspend executionof virtual machine to disk All running state of the virtual machine issaved in checkpoint Disk state is already on in a file Resume will continue execution Checkpoint file is removed Can only resume from a suspend once
Snapshots – Workstation 4.0AppBaseDiskAppGuest OSVM “Undoableness” for the whole virtualmachine Take a snapshot at any point Revert to a snapshot many times
Snapshots – Workstation t OSVM Undoableness for the whole virtualmachine Take a snapshot at any point Revert to a snapshot many times
Multiple Snapshots –Workstation 5.0 Creates a timeline of snapshots Going back in time does not deletefuture snapshots Creates a tree of snapshots All snapshots are kept with the virtualmachine
Clones – Workstation 5.0BaseDiskVM ADiskDeltaDiskDeltaDiskVM BDisk Creates a copy of the virtual machine
Outline Basic Architecture Virtual Machine State Networking
Basic NetworkingAppAppAppAppGuest OSGuest OSVirtual MachineVirtual MachineNativeApplicationHost OSVmnet 1 Vmnets acts as virtual switches
Bridged – Workstation 1.0AppAppGuest OSVirtual MachineHostNetworkStackBridgeVmnet 0 Makes Vmnet look like an extension of the realEthernet
Host File Access – Workstation 2.0AppAppDHCPServerGuest OSVirtual MachineHostNetwork StackVmnet 1HostIf Extra setup on Linux to share host file system onnew network interface
NAT – Workstation 3.0AppNATProcessAppGuest OSVirtual MachineHostHostNetwork StackVmnet 8 NAT process does the address translation for allvirtual machines on Vmnet 8
Teams – Workstation 5.0AppAppAppAppAppAppGuest OSGuest OSGuest OSClient VMFirewall VMServer VMHostTeam PrivateVmnet ATeam PrivateVmnet B Team: A group of networked virtualmachines with the network topology
Team Network Properties Team Private Vmnets have knobs Bandwidth Packet Loss Rate Can simulate modems, DSL, T1, LANs
VMware GSX Server Goals Enhance the VMware virtualizationplatform for enterprise servers Remote management Scripting
Remote Management in uest OSVirtual MachineVMMHost OSHardware Web-based remote management Serverd manages all running virtualmachines
Remote st OSVirtual MachineVMMHost OSHardware Remote Console connections go direct tothe virtual machines
VirtualCenter Guest OSVirtual MachineVMMHost OSHardware GSX Server can be managed byVirutalCenter VirtualCenter connects direct to serverd
Conclusion Basic virtualization techniques have stoodthe test of time Extended I/O functionality Extended remote managementcapabilities
VMware GSX Server Goals Enhance the VMware virtualization platform for enterprise servers Remote management Scripting. Remote Management in GSX Server Web-based remote management Serverd manages all running virtual machines Hardware Host OS Virtual