concept VirtualBox in category linux

appears as: VirtualBox
Linux in Action

This is an excerpt from Manning's book Linux in Action.

  • VirtualBox (and VMware’s Player) are perfect for testing and experimenting with live operating systems, one or two at a time, without the need to install them to actual PCs. Their relatively high overhead makes them unsuitable for most production environments.
  • Figure 2.7. The Create Virtual Machine dialog: VirtualBox will try to approximate your OS and OS version to offer intelligent default choices later.

    Getting VirtualBox happily installed on an Ubuntu machine is simple. It takes two commands:

    The next step involves installing all the software dependencies that VirtualBox will need to run properly. A dependency is software that must already be installed on your computer for a new package to work. Back on Ubuntu, APT took care of these important details invisibly; Yum will also often take care of a lot of the backend details. But when it doesn’t, forcing you to do it manually, the details are readily available from the same online sources discussed previously. Here’s a truncated version of what that will look like:

    # dnf install patch kernel-devel dkms
    Last metadata expiration check: 0:43:23 ago on Tue Jun 13 12:56:16 2017.
    [...]
    Dependencies resolved.
    
    ==========================================================================
     Package         Arch    Version                         Repository  Size
    ==========================================================================
    Installing:
    dkms            noarch  2.3-5.20170523git8c3065c.fc25    updates     81 k
     kernel-devel    x86_64  4.11.3-202.fc25                 updates     11 M
     patch           x86_64  2.7.5-3.fc24                    fedora     125 k
    Transaction Summary
    ==========================================================================
    Install  3 Packages
    Total download size: 12 M
    Installed size: 43 M
    Is this ok [y/N]: y                                                        #1
    Downloading Packages:
    (1/3): dkms-2.3-5.20170523git8c3065c.fc25.noarc 382 kB/s |  81 kB     00:00
    (2/3): patch-2.7.5-3.fc24.x86_64.rpm            341 kB/s | 125 kB     00:00
    (3/3): kernel-devel-4.11.3-202.fc25.x86_64.rpm  2.4 MB/s |  11 MB     00:04
    ---------------------------------------------------------------------------
    Total                                           1.8 MB/s |  12 MB     00:06
    [...]
    Running transaction
      Installing  : kernel-devel-4.11.3-202.fc25.x86_64                    1/3
      Installing  : dkms-2.3-5.20170523git8c3065c.fc25.noarch              2/3
      Installing  : patch-2.7.5-3.fc24.x86_64                              3/3
      Verifying   : patch-2.7.5-3.fc24.x86_64                              1/3
      Verifying   : kernel-devel-4.11.3-202.fc25.x86_64                    2/3
      Verifying   : dkms-2.3-5.20170523git8c3065c.fc25.noarch              3/3
    Installed:                                                                 #2
      dkms.noarch 2.3-5.20170523git8c.fc25 kernel-devel.x86_64 4.11.3-202.fc25
      patch.x86_64 2.7.5-3.fc24
    Complete!
    

    It’s been a bit of a journey, but you’re finally ready to install VirtualBox itself on your Red Hat, CentOS, or Fedora machine. The version number I used in this example came from the online guide used earlier. Naturally, by the time you get to try this out, it may no longer be 5.1.