Desktop Virtualization with VirtualBox
JD P
JDPfu Systems, LLC
http://jdpfu.com
About Me
 -  Realist - FLOSS solutions do not always make sense
 
 -  20+ Years Professional Experience
 
 -  Real-time GN&C Developer (HAL/S + 20 other languages)
 
 -  Cross-Platform C/C++ Developer
 
 -  Systems Administrator since '96
 
 -  Consulting Enterprise Architect for the last decade
 
 -  Virtualization - Lots of Virtualization
 
 
About You
 -  Smarter than me
 
 -  Know things about virtualization that I don't
 
 -  Many ways to accomplish the same thing.
 
 -  VirtualBox is under active development and many things are still changing especially where virtio drivers and graphics are concerned.
 
There was a new version released last week.
 
For Tonight
-  See VirtualBox Installed on an MS-Windows system, then install a Linux VM
 
-  Reasons for desktop virtualization
 
-  Key considerations for virtualization
 
-  Common Uses and Limitations
 
 
Some Terms - pt1
 -  VM = Virtual Machine
 
 -  Hypervisor = the program / OS that runs directly on the physical hardware
 
 -  Host OS = OS that runs on the physical hardware
 
 -  Dom0 = same as Host OS (Xen usage)
 
 
Some Terms - pt2
 -  Client OS = OS that runs as a Guest to the Host OS
 
 -  Guest OS = Same as Client OS
 
 -  DomU = same as Client OS (Xen usage)
 
 -  Virtual Appliance = Usually a self contained client OS with a pre-configured application often used for demos or trials
 
 
Main Virtualization Types
-  Desktop Virtualization - GUI expected
 
-  Server Virtualization - No GUI; usually services, not desktops
 
-  API Emulation or Layers - WINE
 
-  Storage Virtualization 
 
-  Network Virtualization 
 
There are others.
 
Windows Desktop Installation
Steps:
-  VBox Setup.exe
 
-  Administrator Access - allow unsigned drivers
 
-  Accept the driver warnings for Sun / Oracle
 
-  Setup a new VM for an ISO-based boot or Live CD
 
No reboot needed.
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Windows Installation
 
Guest Additions
-  Install especially for GUI systems.
 
-  Support graphics acceleration
 
-  VirtualIO subsystems
 
-  "Seamless modes" for client applications
 
-  Helps synchronize system clocks (security)
 
-  Must remove when migrating between VM technologies - otherwise, it will be bad
 
 
Graphics Performance
If your machine is fast enough, you can use Hulu, Youtube, and others.
-  Hulu - probably just run the native Hulu Desktop app
 
-  Netflix - unknown
 
-  Youtube - works native and in a VM
 
-  Silverlight inside a WinXP VM
 
-  Others
 
However, until you try it with your hardware and your VM settings, you will never know if it will work acceptably.
 
Desktop - Reasons for VMs - Part 1
-  Older Games (16-bit, DOS, etc)
 
-  proprietary VPNs for work (Cisco VPN)
 
-  proprietary software where 100% conpatibility is required (MS-Office, Visio, etc)
 
 
Desktop - Reasons for VMs - Part 2
-  Testing Teams - build a VM library for different test OSes and setups
 
-  Development Teams - setup a master VM, then share it with the entire team
 
-  Desktop Setup (I need about a week to setup my WinXP desktop)
 
-  Complete VM backup that is 100% everything - apps, settings, patches )
 
-  Disaster Recovery
 
 
Desktop - Reasons for VMs - Part 3
-  Try new desktops without risk or more hardware
 
-  Remove application setup time 
 
-  Security - LiveCDs don't save anything to disk 
 
-  Specialized Distros, especially for security professionals
 
 
Desktop - Reasons for VMs - Part 4
 
 -  Hardware Virtualization; OS installs are hardware agnostic
 
 -  Hardware Consolidation - Less hardware needed to run many more applications
 
 -  Snapshots for testing - test on the exact install used in production
 
 -  Lower overall power, cooling, noise, network connections, SAN connections, overall system utilization
 
 
Main Limitiations for Virtualization
 -  RAM! - more is better. Don't expect to share RAM (though this is coming)
 
 -  Network I/O
 
 -  Disk I/O
 
 -  CPU - IO APIC + Nested Paging
 
 -  Graphics Card - some installs (XBMC) require direct access to OpenGL-capable hardware
 
 -  Direct Hardware Access - VMs only see virtual devices
 
 -  Complexity
 
 -  License Costs
 
 -  VM Sprawl
 
 
Desktop - Hardware Choices
 -  CPU (VT-x or AMD-V ; egrep 'vmx|svm' /proc/cpuinfo )
 enable in BIOS
 -  RAM (Enough for the HostOS and Clients)
 
 ** 1GB can work for playing, but 8GB lets you never worry
 -  Storage (Faster is better; 10GB for each Linux and 20-60GB for each Windows VM)
 
 ** WD "black" drives suggested if you can't afford Raptors
 -  Networking (wired; GigE if you plan to actively use 3+ VMs concurrently)
 
As always, whatever you have will work, just slower, based on your workload.
 
Desktop Virtualization Tools
 GUI, generally good for 1-2 VMs
 -  VirtualBox
 
 -  VMware Player
 
 -  VMware Workstation (paid)
 
 -  VMware Server (out of date - formerly GSX)
 
 -  VMware Fusion (paid - Mac)
 
 -  Parallels (Mac)
 
 -  KVM (Linux only)
 
 -  Others
 
None are perfect.
 
Server Virtualization Tools 
 no GUI necessary; management tools for multiple to hundreds of systems; 
-  VMware ESX
 
-  VMware ESXi
 
-  VMware Server
 
-  VirtualBox
 
-  KVM - built into Linux Kernel
 
-  Xen
 
-  Others
 
None are perfect.
 
VirtualBox (Oracle) Desktop Virtualization
-  HVM type of virtualization
 
-  Very reasonable performance for common tasks; desktop apps
 
-  Not recommended for current-gen games - don't expect Crysis to run
 
-  HostOS can vary - Linux, Windows, 32-bit, 64-bit (need VT-x), OpenSolaris, Mac, others?
 
-  ClientOS can vary - Linux, Windows, 32/64 bit 
 
-  Almost all hardware is virtualized  - like WiFi adapters ;)
 
-  Whole Desktop Virtualization; client hardware is just used to remote into the real desktop; mainly for IT support concerns, but can also be important for security
 
 
VirtualBox Licenses
3 license versions
-  Commercial - PAID
 
-  FOSS (no USB or RDP ; source code)
 
-  PUEL (Personal Use and Evaluation License)
 
With Oracle involved ... the future is **unknown** for the free versions.
Regardless of what you hear, using the PUEL version in a corporate environment for more than just 
evaluation is not allowed. If you 
deploy to more than a few machines, then you need a commercial license.
However, if you stay with the OSE license (GPLv2), then you can use it on as many machines as you like without concern.  Just be aware that the Guest Additions are not GPLv2 licensed, so your company may get into licensing problems.
 
VirtualBox Program Names
VirtualBox Program Names change by license
-  FOSS - vboxmanage (lowercase)
 
-  PUEL - VBoxManage (mixed case)
 
On Windows, these name changes aren't important, but on case-sensitive file systems, it matters.
 
Storage Considerations - Pt 1
   - 	local or LAN (remote)
 
   -  Full, Sparse, LVM, Compressed
 
   -  Use VirtIO drivers, whenever possible
 
   -  Use SATA drivers, not IDE, unless the client OS doesn't support it
 
 
Storage Considerations - Pt 2
-  Host OS (Windows + Apps - 30-60GB)
 
-  VM Image files are not all compatible (VMDK, Raw-img, VDI, QCOW, QCOW2, VHD)
 
-  ISO installation file for clients
 
-  Encrypted File systems on the Host OS 
 
 
Network Considerations
-  NAT
 
-  Bridged
 
-  Internal
 
-  Host-only
 
-  disconnected
 
 
Performance Considerations
-  Faster hardware gives better preformance
 
-  Use Virtio Drivers when possible 
 
-  Use Intel PRO/1000 network card in a VM 
 
-  Use SATA disks, not IDE
 
-  Use Fully Allocated Disk Storage
 
-  Do NOT specify more RAM than needed
 
-  Do NOT specify more vCPUs than needed 
 
 
Other Considerations
-  Encryption - if the storage that the VM sits on is encrypted ....
 
-  Total RAM Available - hostOS needs enough to be unconstrained; changing the client RAM amounts can be performend between reboots
 
-  Backups
 
-  Daily Use; I run a Linux VM under Win7 x64 and honestly forget that it is a VM
 
 
Review
  
 You saw
-  VBox installed on Windows
 
-  Linux Client OS setup 
 
-  Key considerations for a VM
 
Questions?
   
Contact 
- email: N/A
 - company website: http://algoloma.com
 
- personal website: http://jdpfu.com
 
- hang out in the Ubuntu Virtualization Forums - http://art.ubuntuforums.org/forumdisplay.php?f=308