Covering Tonight
- Will not Virtualization Terms
- Will not Cover Installation
- Will not Cover Intro to Virtualization
- Will not Reasons to Virtualize
- General Ideas to get Best Performance
- Settings for best performance
I Lied - Overview

[1] http://www.virtuatopia.com
Actual HW doesn't matter. Each clientOS only sees virtual hardware.
No time for too many details today.
VirtualBox
- Great for Desktops - with the right settings
- Not so great for multiple servers - better options exist
- Add-on program; Not part of the Linux kernel
- Oracle .... whatever you think
Performance Settings
- vCPU
- RAM
- Storage
- Networking
Most can be changed later, so don't worry too much
vCPU
- Never more than you need. 1 is usually the correct answer
- Never more than you have in the physical machine
- ACPI and AHCI enabled - better sharing of resources and hot swap
RAM
- 512MB for most servers; 1GB for most desktops;
- 1GB for HostOS - Always leave the suggested amount unused
- Adjust the RAM allocated after installation to avoid swapping
Storage
- VirtIO is best, recent Linux does.
- SATA Controller for Windows (XP needs driver)
- SSD = Sparse allocation
- Spinning HDDs = Fully Pre-Allocated - most important
- Direct hardware storage or network storage for enterprises
- Allocate only what you need. No Large files! 10G-15G for Linux Desktops
Network Adapters
- Bridged or NAT?
- VirtIO is best, recent Linux does.
- Intel PRO/1000 for Vista and newer
- No matter what actual HW is; be aware of driver issues (WinXP)
- 1 to 4 NICs supported
Display Integration
- 2D/3D accel
- Enable for Windows
- Disable for Linux (initially)
- Video RAM - 128MB for desktops
- Video RAM - 9MB for servers
Guest Additions
- Windows is easy. setup.exe from a menu - next, next, next ...
- Linux a little harder - dependencies, mounting, manually run setup
- New Vbox or Kernel mean the Guest Additions need to be relinked
See
for dependency instructions.
Remote Access
- Built-in for VirtualBox
- Need a VPN for security with VNC, RDP
- ClientOS methods work (VNC, RDP, NX, ssh ...)
virt-manager - KVM and others (Xen, LXC, ...)
- Requires HW CPU support for virtualization; BIOS VT-x and VMX (check your CPU)
- Competition to VirtualBox (100% F/LOSS)
- Part of the Linux Kernel
- Better for Servers, IMHO
- Extremely Stable
- Remote Control over multiple VMs (ssh channel)
- More features including Live Migration and more control over many VM details
Performance Settings
- Similar to VirtualBox - disk, network, vCPUs.
- Use virtIO for Storage and Networking of Linux guests
- Use SATA and Intel PRO/1000 for Windows
- vCPU Advanced Settings - CPU models, specific features, pinning
- Storage Advanced Settings - disable Cache mode, always pre-allocate on spinning HDDs
- Avoid User-Mode network bridges
Desktop Integration
- VNC is built-in and most used on LAN
- Spice promises near-native performance local and over the network; Never worked for me (hint: a talk on this would be nice)
- ClientOS remote access tools work fine too
- No desktop additions to load; loose desktop integration
Remote Access
- VNC
- Need a VPN for security with VNC, RDP
- I use NX (freenx server and NoMachine NX clients ) Linux, Mac, Windows, Solaris
- FreeNX Server install has manual steps; google for your distro
- NeatX was buggy for me
Summary
- Enable ACPI and AHCI
- Spinning HDDs, pre-allocate entire virtual disk.
- SSDs, sparse is fine
- Keep large files outside VM
- Never allocate more CPUs or RAM than you should. 1 vCPU default
- Leave 1GB of RAM for the HostOS.
- Use the VirtIO drivers for Storage and Networking.
- Windows guests, use the SATA (storage) and Intel PRO/1000 (network)
- Desktop VMs - 128MB of display vRAM
- Server VMs - 9MB of display vRAM
- Avoid 2D and 3D accel settings on Linux
For more details: http://blog.jdpfu.com/2012/09/14/solution-for-slow-ubuntu-in-virtualbox
Questions?
BTW, this entire presenation was performed using a VM running on a private KVM cloud over NX.
Thanks!
Slides at: