Best practices for building and deploying virtual appliances – from EMC World 2007

High-level guidelines for building a Virtual Appliance:

  • Start with a new VM
    • Use SCSI VMs for portability and performance
    • Split into 2GB files for size and portability
    • Allocate minimum required mem to the vm (clearly document this)
    • Disable snapshots, do not include snapshot files
    • Remove unused hardware devices
      • i.e – USB, audio, floppy, etc…
      • start devices such as floppy, cd, etc… disconnected
    • Disable “Shared Folders”
    • Avoid the use of serial and parallel ports or other specialty features
    • Chose the proper network type – Bridged is the the default but there may be a situation to use NAT
  • Install “JEOS” – Just Enough OS
    • Select the Linux distribution of your choice (pick a supported guest to make life easier on yourself – Note: if you use RHEL or SLED you will need to get permission to distribute)
      • Minimize he footprint
        • only install and run necessary services
        • only open necessary ports
        • more secure and less to patch
      • Install VMware Tools
        • Improved performance, optimized drivers for virtual hardware, etc…
        • Hooks to management tools
        • Fully redistribute able inside Linux guests
      • Include or enable users to add a second virtual disk
        • put config information: user data, logs files, etc… on second disk
        • easier to update and backup the virtual appliance
  • Install the applications stack
  • Configure the appliance for first boo
    • Console experience
      • Accept EULA
      • “Zero-Configuration”
      • Present management URL
    • Web management interface
      • Configure networking
      • Configure security
    • Monitor and manage performance of the solution
    • Test everything! Test first boot/complete execution on different machines
  • Value-Add
    • Expose logging from underlying services
    • Support SNMP
    • Provide audit hooks
    • Allow users to backup configurations and/or restore to factory default settings
  • Package the virtual appliance
    • Copy appliance to new directory
    • Remove unecessary files
      • log files, nvram file, etc..
    • Add your “Getting Started Guide” or “ReadMe”
    • Compress the entire directory
      • 7-Zip or RAR work very well
      • Use cross-platform compression technology
    • Create a web page to host your virtual appliance download
    • Certify your virtual appliance
    • Create a listing on http://vam.vmware.com
  • Provide a patch mechanism for your virtual appliance
    • leverage the default packaging technology of the OS (i.e. .deb or .rpm) or build your own packaging and update technology
    • Support direct online updates from your servers
    • support offline patching

Available tools, frameworks and services:

  • VMware Virtual Appliance Development Kit
    • under development – used as part of Ace 2.0
    • Web-based virtual appliance development tool
    • Includes rPath Linux distro
    • Includes its own patching solution
    • Service provider
    • Developing their own framework
    • Service provider