Tuesday Jun 12, 2012

Oracle Virtual Desktop Infrastructure

A lot of the recent blog entries here have been about Oracle VM VirtualBox, possibly the coolest personal desktop virtualization product known to man. Deploying VirtualBox on your PC or Mac lets you run many virtual desktops at the same time to one user, you.

But did you know that VirtualBox can also power an Enterprise-scale virtual desktop deployment too, delivering many desktops to many users? 

As part of another Oracle product, Oracle Virtual Desktop Infrastructure (VDI), VirtualBox can run your Windows, Linux or Solaris desktops on servers located in the datacenter. Oracle VDI orchestrates the whole deal by looking after :

  • creating or cloning the virtual desktops from a master template;
  • managing the lifecycle of the desktops (create, start, suspend, resume, stop, delete);
  • assigning which users get which desktops; 
  • delivering easy and fast access to these virtual desktops from almost any device, such as existing PCs or Macs, iPads, or specially designed Sun Ray client devices too;
  • load balancing and session management of all of this.

 Architecturally the solution looks something like this:

VDI Architecture

This is an increasingly hot area of the IT landscape, so the Fat Bloke has decided to create a new blog category (VDI) and dedicate a few blog entries to look into this in a bit more detail over the next few weeks.

Watch this space...

- FB 

Friday Jun 08, 2012

Networking in VirtualBox

VirtualBox.pngNetworking in VirtualBox is extremely powerful, but can also be a bit daunting, so here's a quick overview of the different ways you can setup networking in VirtualBox, with a few pointers as to which configurations should be used and when.

VirtualBox allows you to configure up to 8 virtual NICs (Network Interface Controllers) for each guest vm (although only 4 are exposed in the GUI) and for each of these NICs you can configure:

  1. Which virtualized NIC-type is exposed to the Guest. Examples include:
    • Intel PRO/1000 MT Server (82545EM), 
    • AMD PCNet FAST III (Am79C973, the default) or 
    • a Paravirtualized network adapter (virtio-net).
  2. How the NIC operates with respect to your Host's physical networking. The main modes are:

The choice of NIC-type comes down to whether the guest has drivers for that NIC.  VirtualBox, suggests a NIC based on the guest OS-type that you specify during creation of the vm, and you rarely need to modify this.

But the choice of networking mode depends on how you want to use your vm (client or server) and whether you want other machines on your network to see it. So let's look at each mode in a bit more detail...

Network Address Translation (NAT)

This is the default mode for new vm's and works great in most situations when the Guest is a "client" type of vm. (i.e. most network connections are outbound). Here's how it works:

NAT Networking

When the guest OS boots,  it typically uses DHCP to get an IP address. VirtualBox will field this DHCP request and tell the guest OS its assigned IP address and the gateway address for routing outbound connections. In this mode, every vm is assigned the same IP address (10.0.2.15) because each vm thinks they are on their own isolated network. And when they send their traffic via the gateway (10.0.2.2) VirtualBox rewrites the packets to make them appear as though they originated from the Host, rather than the Guest (running inside the Host).

This means that the Guest will work even as the Host moves from network to network (e.g. laptop moving between locations), and from wireless to wired connections too.

However, how does another computer initiate a connection into a Guest?  e.g. connecting to a web server running in the Guest. This is not (normally) possible using NAT mode as there is no route into the Guest OS. So for vm's running servers we need a different networking mode....

Bridged Networking

Bridged Networking is used when you want your vm to be a full network citizen, i.e. to be an equal to your host machine on the network.

In this mode, a virtual NIC is "bridged" to a physical NIC on your host, like this:

Bridging to wired LAN

The effect of this is that each VM has access to the physical network in the same way as your host. It can access any service on the network such as external DHCP services, name lookup services, and routing information just as the host does. Logically, the network looks like this:

Bridged Networking

The downside of this mode is that if you run many vm's you can quickly run out of IP addresses or your network administrator gets fed up with you asking for statically assigned IP addresses. Secondly, if your host has multiple physical NICs (e.g. Wireless and Wired) you must reconfigure the bridge when your host jumps networks. 

Hmm, so what if you want to run servers in vm's but don't want to involve your network administrator? Maybe one of the next 2 modes is for you...

Internal Networking

When you configure one or more vm's to sit on an Internal network, VirtualBox ensures that all traffic on that network stays within the host and is only visible to vm's on that virtual network. Configuration looks like this:

Configuring Internal Networks

The internal network ( in this example "intnet" ) is a totally isolated network and so is very "quiet". This is good for testing when you need a separate, clean network, and you can create sophisticated internal networks with vm's that provide their own services to the internal network. (e.g. Active Directory, DHCP, etc). Note that not even the Host is a member of the internal network, but this mode allows vm's to function even when the Host is not connected to a network (e.g. on a plane).

Internal Network

Note that in this mode, VirtualBox provides no "convenience" services such as DHCP, so your machines must be statically configured or one of the vm's needs to provide a DHCP/Name service.

Multiple internal networks are possible and you can configure vm's to have multiple NICs to sit across internal and other network modes and thereby provide routes if needed.

But all this sounds tricky. What if you want an Internal Network that the host participates on with VirtualBox providing IP addresses to the Guests? Ah, then for this, you might want to consider Host-only Networking...

Host-only Networking

Host-only Networking is like Internal Networking in that you indicate which network the Guest sits on, in this case, "vboxnet0":

Host-Only Networking

All vm's sitting on this "vboxnet0" network will see each other, and additionally, the host can see these vm's too. However, other external machines cannot see Guests on this network, hence the name "Host-only".

Logically, the network looks like this:

Host-only networking

This looks very similar to Internal Networking but the host is now on "vboxnet0" and can provide DHCP services. To configure how a Host-only network behaves, look in the VirtualBox Manager...Preferences...Network dialog:

Configure Host-only NetworksDHCP Server

Port-Forwarding with NAT Networking

Now you may think that we've provided enough modes here to handle every eventuality but here's just one more...

What if you cart around a mobile-demo or dev environment on, say, a laptop and you have one or more vm's that you need other machines to connect into? And you are continually hopping onto different (customer?) networks.

In this scenario:

  • NAT - won't work because external machines need to connect in.
  • Bridged - possibly an option, but does your customer want you eating IP addresses and can your software cope with changing networks?
  • Internal - we need the vm(s) to be visible on the network, so this is no good.
  • Host-only - same problem as above, we want external machines to connect in to the vm's.

Enter Port-forwarding to save the day!

  1. Configure your vm's to use NAT networking;
  2. Add Port Forwarding rules;
  3. External machines connect to "host":"port number" and connections are forwarded by VirtualBox to the guest:port number specified.

For example, if your vm runs a web server on port 80, you could set up rules like this: 

Port-forwarding Rules

...which reads: "any connections on port 8080 on the Host will be forwarded onto this vm's port 80".

Port Forwarding route

 This provides a mobile demo system which won't need re-configuring every time you open your laptop lid.

Summary

VirtualBox has a very powerful set of options allowing you to set up almost any configuration your heart desires. 
For more information, check out the VirtualBox User Manual on Virtual Networking.

-FB 

Friday Apr 13, 2012

Passing data between the VirtualBox Host and the Guest

Here's a good question: "How can you figure out the VM name from within the VM itself?"

While this data is not automatically available, the general purpose, and very powerful VirtualBox "GuestProperty" APIs can be used from the host and guest to pass arbitrary data, in key/value pairs format, in and out of the guest. Note that this does require that the VirtualBox Guest Additions have been installed in the guest.

To play with this, try using the "VBoxManage" command line on your VirtualBox host machine, and "VBoxControl" in the guest.

Host syntax

VBoxManage guestproperty    get <vmname>|<uuid>
                            <property> [--verbose]

VBoxManage guestproperty    set <vmname>|<uuid>
                            <property> [<value> [--flags <flags>]]

VBoxManage guestproperty    enumerate <vmname>|<uuid>
                            [--patterns <patterns>]

VBoxManage guestproperty    wait <vmname>|<uuid> <patterns>
                            [--timeout <msec>] [--fail-on-timeout]  

Guest syntax

VBoxControl.exe guestproperty        get <property> [-verbose]
VBoxControl.exe guestproperty        set <property> [<value> [-flags <flags>]]
VBoxControl.exe guestproperty        enumerate [-patterns <patterns>]
VBoxControl.exe guestproperty        wait <patterns>
                                     [-timestamp <last timestamp>]
                                     [-timeout <timeout in ms> 

So to solve our problem above, we set the vm name in the Host system on an arbitrary key like this:

$ VBoxManage guestproperty set "Windows 7 (x64)" /MyData/VMname "Windows 7 (x64)"

And within the guest we can use:

C:\Program Files\Oracle\VirtualBox Guest Additions>VBoxControl.exe guestproperty get /MyData/VMname
Oracle VM VirtualBox Guest Additions Command Line Management Interface Version 4.1.14
(C) 2008-2012 Oracle Corporation
All rights reserved.
Value: Windows 7 (x64)

The GuestProperty API is pretty powerful, so for the interested, get more info in the User Manual.

- FB 

Friday Mar 09, 2012

Creating a VirtualBox appliance that uses a click-thru license

Lots of people use VirtualBox to create virtual appliances or vm's which they can share with others. There's a whole host of them over at the OTN Developer VM's page, BTW.

But someone asked me how they would go about about redistributing a vm which required a "click to accept" type of license. Here's how:

When you are happy with the vm that you want to redistribute, you can use the GUI or command-line interface of VirtualBox to export the vm.  

Export 

  1. Choose "File...Export Appliance..." to bring up the Export wizard, then select the vm's that make up your appliance. (Note that you can export multiple vm's here. For example, the database vm may be separate from the business logic vm, etc).

  2. Export Wizard

  3. Choose the flavor of appliance: ovf or ova, and whether to create a manifest (hashes which can be used to determine if the appliance components arrived intact). Note that VirtualBox uses the extension to decide which type (ovf or ova) of appliance to create:

  4. Export Settings

  5. When you get to the Appliance Export Settings dialog you can describe who you are, what the appliance is called as well as specifying license text:

  6. Appliance Export Settings

    You can leave any of these fields empty, however, it is the presence of the License text field that causes VirtualBox to present the License at Import-time.

BTW The command line interface syntax that achieves the same thing is:

$ VBoxManage export
Usage:
VBoxManage export           <machines> --output|-o <ovf/ova>
                            [--legacy09|--ovf09|--ovf10|--ovf20]
                            [--manifest]
                            [--vsys <number of virtual system>]
                                    [--product <product name>]
                                    [--producturl <product url>]
                                    [--vendor <vendor name>]
                                    [--vendorurl <vendor url>]
                                    [--version <version info>]
                                    [--eula <license text>]
                                    [--eulafile <filename>]

So you can create scripts to automate the building of this. 

The end result is the same: an ova file or an ovf file with stream-optimized disk images and an optional manifest file. 

Import

Here's what this appliance would then look like on import: 

  1. From the File...Import... menu in the VirtualBox Manager you select the ova or ovf file and you're show what the appliance contains:

    Appliance Import Settings

    At this point you can modify the devices if required, or change the MAC address (to avoid clashes with existing vm's). 

  2. But on continuing, if there is a License, it gets presented thus:

    Software License Agreement

    So your users can choose whether they want to accept your terms of use or not. 

That's all there is to it.

- FB 

Wednesday Sep 14, 2011

Windows 8 in VirtualBox

Just a quick note for those people who are looking to run Windows 8 in Oracle VM VirtualBox.

Windows 8

Here's how I did it:

  1. Go get it from the MSDN site.  I chose the 64-bit version but, be-warned, you need to assign more RAM (MS recommend 2GB, I used 1.5GB) to it than the 32-bit version (MS recommend 1GB).
  2. Create a New Windows 7 VM in VirtualBox but change the RAM in the VM from 512MB to as above.
  3. Configure the CD/DVD to point to the downloaded Developer Preview iso
  4. Turn it on and go

(FYI I used VirtualBox 4.1.2 on a Mac OS X Lion host)

Note that the Guest Additions  don't recognise Windows 8 (fair enough at this stage, I guess) and the Windows Key features heavily in Windows 8 so if you use the Mac Cmd key as the VirtualBox Host Key, press the right Cmd key or choose a different Host Key in VirtualBox.

Cheers,

- FB 

Tuesday Jul 19, 2011

What's in Oracle VM VirtualBox 4.1?

Another week, another VirtualBox release.

But unlike last week's maintenance release on our stable 4.0.x branch, today's 4.1 release introduces some exciting new cutting edge features:

VM clones

A clone is a copy of an existing VM. So when would you need to copy a vm?

Well, examples include when you want to give many people their own vm to use (e.g. teachers and students, or employees), or for backing up a vm (instead of snapshots), or for when you want to build a grid for, say, a Hadoop-type application.

A clone is an (almost) exact copy of a vm. We say "almost", because you can ask VirtualBox to assign a different MAC address to it so as not to confuse the network when you start 2 or more of them up.

In VirtualBox 4.1 we've made Cloning super easy. In the VirtualBox Manager simply right click on the vm and choose Clone.

Cloning

For the more intrepid, we also support Linked Clones, where the existing vm is the parent of the clone. These are faster to create and more space efficient but a little harder to understand. At the moment the ability to create linked clones is only available via the VBoxManage command line interface.

Larger system support

VirtualBox is used in many places and many ways. 

One example is that VirtualBox is used in another Oracle product, Oracle VDI to deliver a smarter way of running Enterprise desktops, namely by running them in vm's on the server, where they are more secure, manageable, and available from many devices.

Now some servers are pretty big nowadays, not only in terms of CPU horsepower but also in the amount of RAM they can support. So with 4.1 we've enhanced VirtualBox to work great on all sizes of systems, even up to systems with 1 Terabyte of RAM.

Improved remote access

If your vms are running on another machine, VirtualBox provides a way to access them remotely via a service which is Microsoft RDP compatible. We've enhanced this service in a couple of ways:

  • Security: VRDP now supports TLS and server authentication to prevent, for example, Man-in-the-middle attacks.
  • Multiple Monitors: VRDP now supports multiple monitors on your client so your vm's can see and display on your multiple monitors.

Windows 7 Aero

We've developed a new WDDM driver for Windows Vista and 7 guests as part of the VirtualBox Guest Additions on these platforms. Using this driver the Windows guests can use transparency and other effects.

Note that this driver is relatively immature and so we've attached the "experimental" tag to it for now.

Here's an example of what it looks like on a Mac host:

Cloning

Latest platform support

VirtualBox 4.1 is ready for the latest Linux platforms, even when using cutting edge features such as Unity or Gnome 3.

Ubuntu 11.04

And one of these days we expect Apple to release Lion (the newest Mac OS X) and we're ready for that too.

New Networking Mode

VirtualBox already supports a powerful range of networking options from NAT (vm's IP address is translated in communications) to bridged (the vm is a full network citizen with it's own publicly accessible IP address) to host-only and internal networking (where vm's sit on a virtual network inside the host machine).

This latter model is extremely useful for test setups because you don't need to involve system administrators at all. But the downside is that maybe you can't fit all your running vm's in the same host.

UDP Tunneling is a new feature introduced in 4.1 which allows you to interconnect virtual machines running on different hosts.

And lots more...

There are so many more improvements and fixes throughout VirtualBox 4.1 ranging from :

  • features for the mere mortal: an updated Virtual Media Manager, maintaining aspect ratio when in scale-view mode, proxy support for the update checker and an updated USB stack;
  • features for specific constituencies: Crossbow and shared folder automount support for Solaris hosts;
  • advanced features for the very brave: experimental support for SATA disk hotplugging and PCI passthrough.

So there should be something there for everyone :-)

To get the full list of changes, as always checkout the ChangeLog, or download and kick the tires yourself.

- FB 

Wednesday Apr 06, 2011

Errors when importing OVF appliances

This is another quick note to self which others may also benefit from....

There was a bug in the Export OVF code of VirtualBox 3.2.8 (and earlier) with vm's that have multiple hard disks. The bug was that each hard disk was given the same unique ID (UUID). Although the export seemed to work correctly, the resultant ovf looked something like this:

...
      <StorageController name="SATA Controller" type="AHCI" PortCount="2" useHostIOCache="false" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
          <AttachedDevice type="HardDisk" port="0" device="0">
            <Image uuid="{eb5b9e44-321f-4cc7-84c3-781fd9d5a661}"/>
          </AttachedDevice>
          <AttachedDevice type="HardDisk" port="1" device="0">
            <Image uuid="{eb5b9e44-321f-4cc7-84c3-781fd9d5a661}"/>
          </AttachedDevice>
      </StorageController> 
...

and so when you came to import the appliance, the import failed because there are 2 disks with the same UUID.

The right solution is that the creator of the vm should upgrade to 3.2.12 or later and re-export again. But a hacky solution involves hand editing the ovf file:

  1. remove the section between:
  2. <vbox:Machine ....>
    ....
    </vbox:Machine>
    
  3. remove/rename the .mf manifest file (because the digital signature will be wrong now we've changed the .ovf file)
  4. try importing again. 

HTH 

- FB 

Thursday Feb 24, 2011

VirtualBox and the Unbreakable Enterprise Kernel

This has tripped me up twice now, so time to write it down :-)

Oracle Linux 5 and now also Oracle Linux 6 come with a choice of kernels:

  • a 100% Red Hat compatible one; and
  • the Unbreakable Enterprise Kernel.

When installing VirtualBox, or the VirtualBox Guest Additions, we need to build and install kernel drivers which are dependent on the version of Linux you are using. So we need a few packages to be installed to allow us to do this.

Here's how using the standard kernel:

	yum update
	yum install gcc
	yum install kernel-devel

 or if using the Unbreakable kernel:

	yum update
	yum install gcc
	yum install kernel-uek-devel

 There, now I'll never forget how to do this again.

-FB 

Tuesday Jan 04, 2011

VirtualBox 4 configuration files

For those that are long time users of VirtualBox you'll notice a few changes with version 4.0. One of those changes is the location of VirtualBox configuration files for vm's, and where virtual disk and snapshot files are saved too. Here's what we've done:

When creating new vm's in VirtualBox 4.0 we've moved all the info about a vm into a subfolder. This makes it easier to, say, tar up the folder contents in order to share the vm with your friends without going through the export/import process. And because the saved state and snapshot files are under the same subfolder, then you can even move suspended vm's, and those with multi-generational snapshots too.

Here's a summary of where stuff has moved to:

Before 4.0 4.0 or above
Default machines folder $HOME/.VirtualBox/Machines $HOME/VirtualBox VMs
Default disk image location $HOME/.VirtualBox/HardDisks In each machine's folder
Machine settings file extension .xml .vbox

Another benefit of these changes is that we associate files with the .vbox extension with VirtualBox. So you can launch vm's by double clicking on the .vbox file, or create an Alias or Shortcut to a vm when you right click in the vm in the VirtualBox Manager, like this:

Create Shortcut

What about legacy vm's that you created prior to VirtualBox 4.0?

4.0 is backward compatible so things should just continue to work out of the box, with the vm information held in the old locations. However, some new features, such as file associations, won't work (because the config file is still the old .xml extension not the new .vbox one). 

To migrate to the new 4.0 locations and filetypes you can perform a one-time export/import. You can either do this manually ("File...Export Appliance" and "File...Import Appliance), or you script the process. On Linux/Solaris/Mac it would look like this:

VBoxManage list vms | sed 's/.\*{ \*//;s/}//' | while read UUID; do VBoxManage export $UUID -o /tmp/$UUID.ova; VBoxManage import /tmp/$UUID.ova; done

This may take a bit of time, so I'd run it overnight.

Hope this info is useful to someone.

Cheers,

-FB 

Wednesday Dec 22, 2010

Oracle VM VirtualBox 4.0 is released!

VirtualBox 4.0 is hot off the press so you may be wondering what's new? Here's a very quick summary....

VirtualBox Manager
  • Usability Improvements

    • A major revamp of the VirtualBox Manager with features such as VM Preview, an orderable VM list, and optional attribute panes, allows admins or power users to customize the interface to make it as simple or as comprehensive as they require.

    • Easy shortcut creation enables users to launch vm's from their Desktop, Start Menu, or from scripts, without the need to start the VirtualBox Manager.

    • The new scaleable display mode allows users to accommodate more virtual displays on the same amount of physical screen real-estate.

  • Increased capacity and throughput

    • New Asynchronous I/O model for networked (iSCSI) and local storage delivers significant storage related performance improvements, especially over 1GB LANs.

    • Improved ability to run larger vms on smaller 32-bit hosts. This enables large vms, for example, Oracle datacenter-class products, to run on desktop systems such as 32-bit Windows hosts.

  • Powerful Virtual Appliance sharing

    • Strongest support for the Open Virtualization Formats in industry. This release strengthens Oracle's commitment to standards, with the adoption of ovf and now ova format appliances

    • Version 4.0 also provides easier direct sharing of vms too, with a new configuration storage model. This new configuration storage model holds all information about a virtual machine, such as virtual hardware, virtual disk files, snapshots and saved state files into a single folder. vm's in a folder

    • This means that, for the first time, suspended vm's and vm's with snapshots can be transferred.

  • Latest virtual hardware

    • By offering a new, modern chipset supporting PCI Express, VirtualBox can support the most demanding of virtual workloads.

    • High Definition Audio devices deliver fantastic sound quality for both output and input (microphones) devices.

    • Hardware offloading for virtual networking increases throughput via virtual NICs.

    • Powerful port-forwarding rules allow the user to run server vms on their desktop device using NAT networking. This means that user can run, say an Apache web server in a vm and connect to it via a host port.

      Port Forwarding
      Port Forwarding
  • Open Source Packaging and Licensing

    • Fully Open Source base product. No longer will there be any confusion about separate editions of VirtualBox. For the first time there is an OSS licensed binary meaning partners do not need to build and maintain their own source tress. This lowers a barrier and is expected to spark increased interest in VirtualBox virtualization solutions.

    • Flexible Extension Pack mechanism for add-on functions. By delivering a pluggable Extension model in the style of Firefox Extensions, Oracle are providing a way for ecosystem partners to offer value-add functionality in an elegant and powerful way.Extensions

    • The first Oracle VM VirtualBox Extension Pack will offer high-speed USB 2.0, Remote Display Services and Network booting features. This will be licensed under the same free for Personal Use and Evaluation License as previous versions.

There is much, much more going on under the hood too, such as API changes and the introduction of an event driven model for API users, but we don't have time to cover this today. Suffice to say, we're really pleased with 4.0 and hope you are too.

- FB

Friday Nov 19, 2010

Oracle Solaris 11 Express

For the interested and curious, Oracle released a new platform this week: Oracle Solaris 11 Express is Solaris NextGen (FatBloke's term, not Oracle's ;-) ). It has lots of cool new features including a new Image Packaging System which I tried out as part of the Automated Installation.

In a nutshell here's how I used the Automated Installation method:

  1. I chose the smaller Automated Installer iso from the download page
  2. Created a new vm in VirtualBox using OS Type of Solaris and memory of 1024MB;
  3. Started up the vm and point the First Run Wizard at the local Automated Installer iso we just downloaded in 1.;
  4. Followed the on-screen Solaris installation instructions, and it pulled extra packages from the default Solaris repository over the internet.
  5. Don't forget to install the VirtualBox Guest Additions for Solaris for a smoother and faster experience.

Here's the end result (click to enlarge):

Oracle Solaris 11 Express on VirtualBox

Pretty slick, huh? 

-FB

Friday Oct 29, 2010

Running Storage Simulators in VirtualBox

I love hearing what people get up to with VirtualBox...

This week was all about Storage Simulators: using a vm to simulate a NAS device, complete with management tools, so you really get the idea of what you're buying into. I was reminded of 2 this week:

  • How to install the NetApp OnTap Simulator - a comprehensive HowTo that includes how to create the guest, how to install the OS (Oracle Enterprise Linux in this case) and then how to install the Simulator software.
  • How to use the Sun Storage 7000 Simulator which is available as a handy ovf appliance that just imports and goes.

 

Drop me a comment if you have other interesting use cases.

-FB 

Monday Oct 11, 2010

VirtualBox 3.2.10 is released

Version 3.2.10 has just been released and made available from the Usual Places.

It fixes a bunch of stuff and also adds support for yesterday's Ubuntu 10.10 release and the forthcoming Fedora 14.

- FB 

Friday Oct 01, 2010

Starting VirtualBox in FullScreen mode

Regular readers will know that this blog often acts as an extension to my built-in memory :-). So here's another "memo-to-self" which others may find useful:

Most VirtualBox commands start with :

VBoxManage ...
command. But to start up a vm in fullscreen mode use the following command:
VirtualBox --startvm vm_name --fullscreen

-FB 

Wednesday Sep 08, 2010

VirtualBox and Linux kernel updates

In order to weave its magic, VirtualBox uses loadable kernel modules both on the Host, and in the Guest as part of the Guest Additions. On Linux, these kernel modules are related to the version of the kernel that you're running and if you update the kernel then the modules need to be rebuilt to match the new version. Technologies such as dkms handle this and so if you're running dkms you'll be in good shape. But if you aren't running dkms, then you may find that after an update and a reboot, VirtualBox or the Guest Additions don't run anymore. Here's how to fix things... 

If your Linux system is setup to build modules you can just execute one of:

  • Host: 
    /etc/init.d/vboxdrv setup
  • Guest:
    /etc/init.d/vboxadd setup

If your system is not setup to build kernel modules you will need to get the relevant packages to do this. For example, on Oracle Enterprise Linux you need to:

  1. Update your system to the latest version: open a terminal and as root, execute 
  2. yum update
  3. Install the GNU C compiler and the kernel development packages using
  4. yum install gcc 
    
    yum install kernel-devel
  5. Reboot your guest system in order to activate the updates before then running the commands above to rebuild the VirtualBox modules. 

 This is covered in more depth in the VirtualBox User Manual in the sections on Host Modules and Guest Additions.

Hope this is some use to someone

-FB

About

Fat Bloke

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today