1 / 21

VMs

VMs. Virtual Machines. VM . What is a VM V irtual M achine Software implementation of a machine running on another machine The VM may or may not resemble the host machine E.g. Linux on a Windows machine Windows on Windows MVS on VM (IBM mainframe)

nami
Télécharger la présentation

VMs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VMs Virtual Machines

  2. VM • What is a VM • Virtual Machine • Software implementation of a machine running on another machine • The VM may or may not resemble the host machine • E.g. • Linux on a Windows machine • Windows on Windows • MVS on VM (IBM mainframe) • Linux (Intel Style) on MVS (IBM Mainframe)

  3. Why VMs • Emulate software or hardware not available • Reduce costs • Reduce exposure • In a hostile environment • If machine becomes infected • Reboot (reload) VM • Test new environments • If mess up, just reboot (reload) VM • Isolate programs/environments • Adjust loads • Move/Start new VM’s to new/different servers as needed

  4. VMWare View of Benefits • Compatibility: • Virtual machines are compatible with all standard x86 computers • Isolation: • Virtual machines are isolated from each other as if physically separated • Encapsulation: • Virtual machines encapsulate a complete computing environment • Hardware independence: • Virtual machines run independently of underlying hardware

  5. VM downside • More complicated environment • Need to be aware of licensing issues • Virtual machine might not 100% emulate a physical machine • Performance • Extra cost of the VM software

  6. VM Brief History • Started on Mainframes • Late 1960’s – early 1970’s • Help develop OS for the IBM 360 and followons • Realized it could be used for “real-world” applications • Became practical on PC’s in the last 10 years

  7. VM Types • System virtual machines • Have an underlying physical machine • Runs one or more virtual machines • Each potentially running a different operating system • AKA hardware virtual machines • Hypervisor: • Software layer providing the virtualization • AKA - virtual machine monitor • Type 1 hypervisor • Runs on bare hardware • AKA - Native VM • Type 2 hypervisor • Runs on top of an operating system • AKA - Hosted VM

  8. VM directory (/scratch) Debian Image CentOS Image Simple Type 2 Example PCnn (local workstation) Debian Linux OS

  9. Practical View of use in 302 lab

  10. /scratch Debian CentOS install Original VM Creation NFS “Common Directory” (Read Only) PCnn (local workstation)

  11. Each VM • Each VM • Only exists on the targeted PC after installed • Cannot write back to the source NFS directory • Read only • How to save?

  12. Saving VMs • Every lab workstation you log onto has a network directory: network_storage • That network directory is located on the NFS server drive • That network directory will follow you to any machine in the lab you log onto • Actually follows the login ID • Copy the VM to the network directory and run? • Two problems: • Sometimes the VM won’t work properly from an NFS Drive • Changes to the VM are “permanent” • Make an error in the change  saved version now has the error • Bigger problem • VM dies when workstation removed from the lab network!

  13. Saving VMs • Solution: • Make a copy of your VMs (Debian and CentOS) to your network NFS drive • “One time” copy • Backup copy • Put in aptly name directories: • myuseridDebian • myuseridCentOS • Takes about 3-6 minutes to copy per OS • Longer if there is a lot of network traffic

  14. /scratch Debian CentOS Saving the VMs on local PC to network file NFS “network directory” Debian CentOS PCnn (local workstation)

  15. Saving VMs • “Restoring” VM to a workstation • Copy OS image of interest • From the network NFS directory • To the local /scratch directory • Takes about 5 minutes to copy down • Depends on network load • To save changes to the VM • Think carefully: do you want to save these changes? • Copy the image back to the NFS server drive

  16. /scratch Debian CentOS Copying the VMs to local PC network directory Debian CentOS PCnn (local workstation)

  17. Version management • When done testing a VM on the local PC • Decide if you want to save the image: • Yes • Copy contents back to network directory • No • Do nothing or delete entry in /scratch

  18. USB Drives • The same is true for USB drives to keep copies • Advantage: • Can take home with you • Not effected if home_directory disappears • Disadvantage • Can easily loose • May break

  19. Home directory Space • “Home” directory • On the desktop • On the local hard drive • a.k.a. your userid • Network Directory • on the NFS server • Make a copy for each OS to the Network Directory • Have about 12Gb available for your use on the NFS drive • About 2 OSs worth • The basic files: • .vmx • .vmdk • Rest contain history, changes, etc. • Not required but should copy

  20. Ground rules • The PC’s /scratch directory is temporary • Don’t rely on contents being available next time • Directories or data in /scratch may be deleted at any time • When space is needed • Clean up after yourself • Get rid of any directory you are done with • Remember to properly shut down VM before saving or logging off PC • May not save latest changes • May corrupt images

  21. Sanity Rules • NEVER run VM from network_storage directory • It will start • It will fail at the most critical time • It will corrupt your VM • Don’t run VM from USB device • It will start • It may fail • It may corrupt your VM • Start VM from its native directory • Sometimes the VMPlayer doesn’t make it clear where the image it is starting resides • Note: USB devices may be accessed by: • The workstation • A VM • BUT NOT BOTH at the same time! • If the VM uses it the workstation will loose access! •  the VM will die if you have started the VM from it!

More Related