More Related Content
Similar to Using oracle vm virtual box as your development platform (20)
Using oracle vm virtual box as your development platform
- 2. Using Oracle VM VirtualBox
as Your Development
Platform
CON8355
Jeff Savit
Senior Technical Product Manager
Oracle VM Product Management
October 2, 2014
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
- 3. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
3
- 4. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Oracle VM VirtualBox Introduction
Product Features
VirtualBox for developers
Example use case
Where to get more information
1
2
3
4
5
4
- 5. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle VM VirtualBox
Product Introduction
5
- 6. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle VM VirtualBox
Host Platforms
Guest Platforms
Oracle VM VirtualBox
Desktop Virtualization
• For Windows, Linux, Solaris and Mac
Hosts
• Huge Guest Coverage
• Easy to install and use
• Fast and powerful
• Free for Personal Use
Cross-Platform Virtualization
- 7. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
• BYOD
• Desktop migration
• Legacy protection
• Solution delivery mechanism
• Software development
• Mobile demonstration units
Solutions
Cross Platform Virtualization Software
- 8. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Product Features
8
- 9. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Simplicity
VirtualBox Manager
- 10. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle VM VirtualBox
Cross Platform Virtualization Software
- 11. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Simplicity
Shared Folder Automounting
11
- 12. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Performance
• Processor: 1-32 vCPUs per guest; 32-bit and 64-bit guests; PAE support; with or without VT-x/AMD-V
(EPT/Nested Paging, VPID supported)
• RAM: up to 1TB per guest
• Storage: SATA, SAS, SCSI or IDE controllers; >100 disks; integrated iSCSI initiator
• Network: up to 8 NICs per guest; Intel gigabit; virt-io; PCnet
• Virtual USB Controller: USB 1.1 and 2.0 (3.0 planned for next major release); pass-through and virtual
devices
• Audio: Intel High Definition Audio
• Full ACPI Support: guests show real power status
• Virtual CD/DVD: pass-through for CD/DVD writing, multiple concurrent
• Display Adaptor: multi-monitor capable with graphics acceleration: OpenGL for Windows, Linux, Solaris
Guests; Direct3D for Windows; 2D Video acceleration, built-in RDP Server
• Page Fusion: memory sharing with hints (Windows guests)
High Performance Virtual Hardware
- 13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Host Platform
en0: 129.156.4.212
Built-in DHCP server for guests
Gateway: 10.0.2.2
VirtualBox NAT Networking
• Guests sit on own private LAN
• VirtualBox acts as a DHCP Server
• VirtualBox NAT engine translates
addresses
• Destination servers see traffic originating
from VirtualBox host
• No configuration needed on Host or
Guest
• Great when guests are clients
• Not good for guests as servers
• IPv4 only
Zero Guest Configuration
Guest Platform
vm1: 10.0.2.15
Guest Platform
vm2: 10.0.2.15
Guest Platform
vm3: 10.0.2.15
- 14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Host Platform
en0: 129.156.4.212
Built-in DHCP server for guests
Gateway: 10.0.2.2
VirtualBox Port Forwarding with NAT
• Guests connect out via NAT as usual
• Clients on the network can connect to
host:port and be mapped to a guest:port
• No guest reconfiguration required when
host moves across networks
For Mobile Server-based Guests
Guest Platform
vm1: 10.0.2.15
Guest Platform
vm2: 10.0.2.15
Guest Platform
vm3: 10.0.2.15
- 15. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Internal Networking
• Guests can see other guests on same
internal network
• IPv4 or IPv6
• Host cannot see internal network
• Network configuration needed
• Functions even when Host
disconnected.
• Can be used in conjunction with
Bridged
• Good for multi-tier solutions
Totally Isolated Network
Host Platform
en0: 129.156.4.212
Guest Platform
vm1: 10.0.2.1
Guest Platform
vm2: 10.0.2.2
Guest Platform
vm3: 10.0.2.3
intnet
New
- 16. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Host-only Networking
• VirtualBox creates a private
internal network for guests and
host
• Host sees a new software NIC
• IPv4 or IPv6
• VirtualBox provides a DHCP server
• Guests cannot see outside world
• Guests function even when host
disconnected
• Great for development
Convenient Internal Networking
Built-in DHCP server for guests
en0: 192.168.56.1
en0: 129.156.4.212
Guest Platform
vm1: 192.168.56.101
Guest Platform
vm2: 192.168.56.102
Guest Platform
vm3: 192.168.56.103
VBoxNet0
- 17. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox NAT Network
• Guests can see other guests on same
internal network
• Guests connect out via NAT
• Optional DHCP service
• IPv4 or IPv6
• Host cannot see internal network
• Port-forwarding supported
• Functions even when Host
disconnected.
• Good for multi-tier solutions
• This new NAT engine is more flexible
and will replace the older one in a
future release
Private Network with NAT services
Host Platform
en0: 129.156.4.212
Guest Platform
vm1: 10.0.2.1
Guest Platform
vm2: 10.0.2.2
Guest Platform
vm3: 10.0.2.3
VBoxNet0
New in
4.3
- 18. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Bridged Networking
• VirtualBox bridges to Host Network
• Good for clients or server guests
• IPv4 or IPv6
• Consumes IP addresses
• May involve configuration of guest
• Best for production environments
Guests are Full Network Citizens
Guest Platform
vm1: 129.156.4.10
Host Platform
en0: 129.156.4.212
Guest Platform
vm2: 129.156.4.11
Guest Platform
vm3: 129.156.4.12
New
- 19. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox
Storage
Client
Server
VirtualBox
Storage
VirtualBox
Storage
iSCSI
RDP
Powerful Deployment Options
Client-side, Assisted Client-side, Server-side
- 20. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Guest
Hypervisor
vRDP Server
Guest Guest Guest
Standalone
RDP Client
(e.g. Microsoft RDC,
rDesktop)
Browser-based
Flash RDP
Client
VirtualBox Remote Display
• High performance Remote Display
Server
• Microsoft RDP compatible
• Sits “beneath” guests
• No RDP requirement on guest
• Delivers boot-time display of VM
consoles
• Companion Flash RDP client
Built-in access to virtual machine console
- 21. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Power
Export and Import appliances in OVF and OVA formats
- 22. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Session Recording
• Records the screen contents
• 1 or more screens
• WebM video format
• Configurable quality
• Easy to start/stop for recording
portions of sessions
Record movies of VM sessions
- 23. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Manager
Start
– Starts from any state (boot or resume)
– Start headless (<Shift> Start)
Show (bring to front)
Pause
Reset
Close
– Save state
– Send Shutdown signal
– Poweroff
Discard saved state
Show in filesystem
Sort
Groups Operations
VBoxManage list groups
VBoxManage createvm --name <name>
[--groups <group>, ...]
VBoxManage modifyvm <uuid|name>
[--groups <group>, ...]
- 24. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Power
Online Snapshot creation AND deletion
- 25. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Virtual Machine Clones
• Full Clones
– Full copy
– Disk UUIDs automatically made unique
– Optionally MAC addresses made unique
– VirtualBox Manager and CLI
• Linked clones
– VM config is copied
– A snapshot is taken at source
– The clone uses a child differencing disk with
source snapshot as parent
Easily duplicate virtual machines
Virtual Machine A
VM Configuration
Virtual Disks and
Snapshots
Clone of Virtual Machine
Copy of VM
Configuration
Copy of Virtual
Disks and
Snapshots
Virtual Machine A Clone of Virtual Machine
VM Configuration
Virtual Disks and
Snapshots
Copy of VM
Configuration
Differencing disk
- 26. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
User Mode
• Web Service interfaces
• COM/XPCOM interfaces
• Python interfaces and interactive shell
• Command line interface VBoxManage
• Pluggable Virtual Device architecture and APIs
Kernel Mode
VirtualBox Hypervisor
Windows, Linux, OS X, Solaris, FreeBSD
VirtualBox API layer
language neutral programming interface
Teleportation
Web Services API
Portability
Layer
cross platform
abstraction
layer
Command line interfaceVirtualBox Console GUI
Virtual
Devices
binary compatible
interface,
3rd Party plug-in
Resource Monitor VRDP Server
Powerful
Software Development Kit (SDK)
- 27. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Power
• Powerful command line
tools
# VBoxManage …
• Python shell
# python vboxshell.py
Command Line Interface
- 28. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Power
• CPU throttle (can be useful but take care to ensure guest receives enough service)
VBoxManage controlvm "Windows 7 (x64)" cpuexecutioncap 50
• Disk I/O limiter
VBoxManage bandwidthctl "VM name" --name Limit --add disk --limit 20
VBoxManage storageattach "VM name" --controller "SATA" --port 0 --device
0 --type hdd --medium disk1.vdi --bandwidthgroup Limit
• Dynamic adjustments
Controllable Power
- 29. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Power
Create folders and copy files into the guest filesystem
VBoxManage copyto|cp <vmname>|<uuid> <source on host> <destination on
guest> --username <name> --password <password> [--dryrun] [--follow] [--
recursive] [--verbose]
Execute commands inside the guest from the host
VBoxManage guestcontrol exec[ute] <vmname>|<uuid> <path to program> --
username <name> --password <password> [--arguments "<arguments>"] [--
environment "<NAME>=<VALUE> [<NAME>=<VALUE>]"] [--flags <flags>] [--timeout
<msec>][--verbose] [--wait-for exit,stdout,stderr||]
Guest Automation
- 30. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Power
Guest Automation
- 31. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox for developers
31
- 32. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Developer challenges
• “Write once, run anywhere” still not reality
– Need to build for and test on multiple platform combinations
– Multi-platform products can require a lot of hardware to create, test, ship, support
• Test / experiment sandboxes
– Takes time, human effort, physical resources to set one up on bare metal
• Or preserve an old environment that a customer is still running
– Hard to snapshot an entire environment or revert it to a known-good point
• If it’s hard for me to fall back to a known point, I might be less adventurous trying things out
• Platform deployment challenges
– Different kernel, library, compiler, product installer versions to build on and test to
32
- 33. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
How developers can use VirtualBox
• Stand up virtual machines for each build/test case
– Script VM creation using VBoxManage to reduce effort, get reproducible VMs
– Create families of VMs for complex apps (eg: database, app, and access VMs)
• “Build system” VMs to create binaries for different target systems
– Different operating systems (eg: Linux, Solaris, Windows)
– Different variants of the same OS (eg: Oracle Linux, Red Hat Linux, Ubuntu, SuSE, etc)
– Different generations of the same variant (eg: Solaris 10, Solaris 11)
– Different language environments (eg: different JVM, gcc versions, libraries)
33
- 34. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
How developers can benefit from VirtualBox
• Test/regression/support VMs
– Same patterns as OS and software environment, plus ability to test
• Different network topologies
• Different memory (including stress states like “low memory”), disk, CPU configurations
• Different security policies
– Run many tests in parallel to limit of capacity
• Be able to reproduce customer environment (within reason)
• Other uses:
– Training, demos, new hire onboarding in a safe place
– Document team workspaces
34
- 35. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
How developers can use VirtualBox
• Safe experimentation:
– Import VMs from a library of “ready to run” VM appliances for each supported flavor
– Take a VM snapshot before and after making an “interesting” change
– Clone VMs for parallel test runs
– Revert to a VM snapshot or clone at a given snapshot level
– Export VM appliances for reuse
– Use for:
• Program changes
• Multi-host simulation
• “What if” scenarios
35
- 36. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Example VirtualBox developer use cases
36
- 37. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle VM under VirtualBox
Screen capture of (from left to right, top to
bottom)
• Console of Oracle Linux VM running under
Oracle VM Server (itself a VM)
•Console of Oracle Linux VM running Oracle
VM Manager
•Console of two Oracle VM Server VMs
Notes:
•3rd level guests must be PVM guests, and
don’t get virtual network connectivity
•iSCSI, NFS both work
•Live migration of 3rd level VMs between
OVM servers works
37
- 38. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox for Virtual Machines
Oracle VM, and Oracle Virtual Compute Appliance
• Oracle VM Compute Appliance is Oracle’s Engineered System for Oracle VM
– Converged Infrastructure combining compute, networking, and storage with the
Oracle VM virtualization product pre-installed
• Two management nodes for orchestration and administration
• Two or more Oracle VM Servers (“compute nodes”)
• ZFS storage appliance
• Oracle Virtual Networking and datacenter switches
• Virtual Compute Appliance “orchestrator” discovers and provisions servers
• Wouldn’t it be nice to have a simulated environment for demo, test, etc?
• VCA simulator uses VirtualBox to host VMs that run the management,
compute, storage and network components (and their iLOMs)
38
- 39. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Virtual Compute Appliance under VirtualBox
Screen capture of host system running
VirtualBox and showing:
•VirtualBox management panel
•Simulated iLOM
•Terminal windows driving scripts
39
- 40. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Virtual Compute Appliance under VirtualBox
Shows provisioning process (including PXE
boot) VCA uses to populate Oracle VM
Server
Different networks map to “real” VCA
networks for storage, management, iLOM,
VM access, live migration
40
- 41. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Virtual Compute Appliance under VirtualBox
Screen capture of host system running
VirtualBox and showing:
•VirtualBox management panel
•Simulated iLOM
•Compute node being provisioned over
(virtual) network with Oracle VM Server
•Terminal windows driving scripts
41
- 42. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Virtual Compute Appliance under VirtualBox
Screen capture of host system running
VirtualBox and showing:
•VirtualBox management panel
•Simulated iLOM
•Terminal windows driving scripts
42
- 43. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Summary
43
- 44. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox for Developers
• Powerful platform to run multiple VMs on the same host system
• Features attractive to developers:
– Support for wide range of host and client VM operating systems
– Snapshot, clone, revert
– Export/import appliances
– Powerful network configuration options
– Advanced display support
– Highly programmable and scriptable
– Easy: it doesn’t get in your way; short learning curve
44
- 45. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Where to get more information
45
- 46. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Stay Connected
• Oracle.com/virtualization
• @virtualbox
• Facebook.com/OracleVMVirtualBox
• Oracle VM Group
• Blogs.oracle.com/virtualization
Join our communities, visit our websites for more information
46
Youtube.com/virtualization
Focus on Virtualization and OpenStack
Download: edelivery.oracle.com/oraclevm
Training: education.oracle.com/virtualization
- 49. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Power
• Easy duplication of virtual machines
• Full clones or linked clones
• Automatic regeneration of UUIDs and
MAC addresses
VM cloning
- 50. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
2D Video App
VirtualBox Guest Additions
VirtualBox
Host OpenGL Libraries
OpenGL Hardware
Guest
Host
OpenGL/Direct3D App
VirtualBox Intercept Libraries
Performance
Graphical Acceleration
- 51. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Performance
2D Video Acceleration
- 52. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Performance
Graphical Acceleration using OpenGL and Direct3D
- 53. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Power
Multiple Virtual Monitors
- 54. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
VirtualBox Power
Virtual Webcam
- 55. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Windows
XP
Windows
XP
Physical Memory
Windows
XP
VirtualBox Power
• Page Fusion = Page Sharing + Hints
• Less computationally expensive with immediate benefits
• Higher density of Virtual Machines
• Windows guests only at present
Page Fusion