View - VMworld.com: Virtualization: Virtual Conference

21
Workshop progetto CyberSAR, december 4/6 th 2007 Using VMware Windows virtual machines in a CERN GRID environment at CyberSAR (Sardinia, Italy) michelangelo puliga ([email protected] ) dipartimento di Matematica ed Informatica,Università di Cagliari

description

 

Transcript of View - VMworld.com: Virtualization: Virtual Conference

  • 1. Workshop progetto CyberSAR, december 4/6 th 2007
    • Using VMware Windows virtual machines in a CERN GRID environment at CyberSAR (Sardinia, Italy)
  • michelangelo puliga( [email_address] )
  • dipartimento di Matematica ed Informatica,Universit di Cagliari

2. Workshop progetto CyberSAR, december 4/6 th 2007

  • Summary
  • Virtualization technologies
  • Task automation on Windows
  • VMware on the CERN grid of CyberSAR infrastructure
  • Conclusions

3. Workshop progetto CyberSAR, december 4/6 th 2007

  • Virtualization technology
  • Definitions
  • Logical rings: (hardware = ring 0wrapped by kernel (ring 1) wrapped byshell (ring 2)
  • Hypervisor: (virtual machine monitor process):
  • the main process that control the operations from and to the virtual machine
  • A brief History:
  • First tools running directly on a special hardware(IBM s/370)
  • First running example of software virtualization in a x86 env: VMware virtual platform (1999)
  • ParaVirtualization XEN (first example of virtualization with hypervisor running at kernel level (ring 1)
  • New perspectives with VT (Intel) and Pacifica (Amd) virtual machine software dedicated processor technology

4. Workshop progetto CyberSAR, december 4/6 th 2007

  • VMware, Xen, VirtualBox solutions
  • Paravirtualization: XEN.
  • Advantages: Performances. Open Source, Optimal support to Live migration
  • Disadvantages: Needs a modified Linux kernel, support for 64 bit architectures is currently poor.
  • VMware
  • Advantages: Reliability, easy management. Desktop products with nice and powerful interfaces.Development kit
  • Disadvantages: Almost completely closed source. Networking not flexible in basic products
  • VirtualBox
  • Advantages :Open Source, simple and powerful networking structure. Desktop ready
  • Disadvantages: No high level API

5. Workshop progetto CyberSAR, december 4/6 th 2007

  • Task automation on Unix and Windows
  • Unix automation.
  • Operating system built for automation(The power is in the shell)
  • Several languages for system management and automation (perl and, more recently, python)
  • Example problem:
  • How to rename thousands of files adding to each file name the date string and a progressive index ?
  • PERL orSHELL solution:
  • 10 lines of code, and 2 minutes to write the code
  • Windows native solution: is there one ?
  • DOS (#!>%&)NO
  • consider the infamous jscript or vbscript or 3 rdpart software

#!/usr/bin/perl # @list_files = ` ls `; $date = ` date+"%m%d%Y"`; $num_files = @list_files; for ($i = 0; $i < $num_files; $i++) { $fname = $list_files[$i]; $fdest = $fname.$date.$i; ` mv$fname $fdest` } 6. Workshop progetto CyberSAR, december 4/6 th 2007

  • Task automation on Windows.
  • Until2008 (longhorn) no completepowershell :in all Windows operating systems some administrative tasks are possible only from the graphic interface
  • On WinXP and Vista is present thewindows scripting host(WSH) tool, with Jscript or VB syntax.
  • Advantages: WSH can explore and interact with the entire OS with little restrictions (i.e.manipulating windows registry keys).
  • Disadvantages: security issues. Wsh is the ideal tool for virus coders.

7. Software automation on Windows. High level software automation with COM, OLE and ActiveX Modern tools:DCOMand .NET Advantages: Very powerful graphic interfaces, excellent development tools (Visual studio etc.)Perfect integration with MS software (like Excel, Word). Disadvantages:Not practical for simple tasks, documentation too detailed (at windows dev center) and not to the point. Open source alternatives: Consider Unix tools in windows (python or Perl, natives or running in unix-like env:CygWin) Workshop progetto CyberSAR, december 4/6 th 2007 8. Workshop progetto CyberSAR, december 4/6 th 2007

  • Basic examples:
  • Visual Basic Script (WSH)
  • Aim:Controlling the presence of a Drive
  • (network or disk) attached to the computer
    • Set WshShell =WScript . CreateObject ("WScript.Shell")
    • Set WshNetwork =WScript . CreateObject ("WScript.Network")
    • Set AllDrives = WshNetwork. EnumNetworkDrives ()
    • DriveLetter = "N:"'must be capitalized
    • RemotePath = "avec"
    • AlreadyConnected = False
    • Fori = 0 To AllDrives. Count- 1 Step2
    • IfAllDrives. Item (i) = DriveLetterThenAlreadyConnected = True0
    • Next
    • IfAlreadyConnected = Falsethen
    • WShNetwork. MapNetworkDriveDriveLetter, RemotePath
    • WshShell. PopUp"Drive " & DriveLetter & " connected successfully."
    • Else
    • WShNetwork. RemoveNetworkDriveDriveLetter
    • WshShell. PopUp"Drive " & DriveLetter & " disconnected."
    • End if

9. Workshop progetto CyberSAR, december 4/6 th 2007

  • Basic examples (cont.):
  • MATLAB automation with Perl ( note the possibility
  • to run this code on different OS )
  • AIM:executing a matlab script

#!c:erlinperl.exe useMath::Matlab::Local; $matlab = Math:: Matlab :: Local -> new ({ cmd=> 'C:MATLAB6p5inmatlab.bat -nosplash ', root_mwd => 'C:ScriptS' }); $fin = 'C:ScriptSEqsim.m'; open (IP,"