Wednesday Jan 29, 2014

FatBloke Sings his Last (at Oracle)

It has been a good run, but onwards and upwards, as they say... 

After a run which incorporated Tarantella, Sun Microsystems and most recently Oracle, the Fat Bloke is finally signing off from Virtualization and Oracle.

As an industry (or maybe simply industrial ;-) ) figure he was always going to be in demand, but how will his departure be received by the multitude (or both) of his fans? And where will they get their regular fix of cool stuff that you can do with VirtualBox and SGD?

Well, we can at least answer that one: future blogs will appear over on the Oracle Virtualization blog .

And for the curious, or maybe plain desperate, look towards the west (  @fatbloke  ) on Monday 3rd Feb, 2014.

Thank you and good night,

- FB 

Thursday Oct 17, 2013

Cloning from a given point in the snapshot tree

VirtualBox.png

Although we have just released VirtualBox 4.3, this quick blog entry is about a longer standing ability of VirtualBox when it comes to Snapshots and Cloning, and was prompted by a question posed internally, here in Oracle: "Is there a way I can create a new VM from a point in my snapshot tree?".

Here's the scenario: Let's say you have your favourite work VM which is Oracle Linux based and as you installed different packages, such as database, middleware, and the apps, you took snapshots at each point like this:

Base system

But you then need to create a new VM for some other testing or to share with a colleague who will be using the same Linux and Database layers but may want to reconfigure the Middleware tier, and may want to install his own Apps. All you have to do is right click on the snapshot that you're happy with and clone:

Give the VM that you are about to create a name, and if you plan to use it on the same host machine as the original VM, it's a good idea to "Reinitialize the MAC address" so there's no clash on the same network:

Now choose the Clone type. If you plan to use this new VM on the same host as the original, you can use Linked Cloning else choose Full. 

At this point you now have a choice about what to do about your snapshot tree. In our example, we're happy with the Linux and Database layers, but we may want to allow our colleague to change the upper tiers, with the option of reverting back to our known-good state, so we'll retain the snapshot data in the new VM from this point on:

The cloning process then chugs along and may take a while if you chose a Full Clone:

Finally, the newly cloned VM is ready with the subset of the Snapshot tree that we wanted to retain:

Pretty powerful, and very useful. 

Cheers,

-FB 

Tuesday Oct 15, 2013

What's New in VirtualBox 4.3?

VirtualBox.png

Great news: Oracle VM VirtualBox 4.3 is available from today!

Let's take a quick look at what's new:

New Platforms 

We're at that time of year when vendors are releasing new versions of their platforms, ready to be installed onto new hardware offerings for the upcoming holiday season. So welcome Mac OS X 10.9 ( "Mavericks" ), Microsoft Windows 8.1 and Windows Server 2012 R2, and all the new Linux distributions too. 

And so it is only natural that VirtualBox 4.3 should add support for these new platforms too.

But sometimes that is easier said than done. For example, some of the new platforms are designed for tablet, or laptop/tablet hybrid platforms and so use a multi-touch interface to navigate around the system. This all means that VirtualBox has to deliver a multi-touch virtual device that the guests can use, which is exactly what we did in 4.3.  So if you're looking to check out such a system, such as Windows 8(.1), remember to choose the correct pointing device:

multi-touch

Another similarity about the new platforms is the increased use of desktop "eye-candy", whether it is translucency, fade-in and out effects, or instant zoom. This means that we've had to improve our 3d acceleration support for guests such as Fedora, seen here on a Mac OS X 10.9 host, using a zoomed out view of running apps and a scaled workspace viewer on the right hand side:

Fedora 19

(Don't forget to update your Guest Additions to the 4.3 version to get this going.)

We also improved the multi-monitor support especially when you are using multiple virtual monitors with multiple physical displays in full screen mode.

Hypervisor improvements

Another significant, but largely invisible change in 4.3 concerns the hypervisor itself. We have significantly revamped the internals of VirtualBox as a platform for future performance enhancements. Today, this has mainly improved boot times of guests, but we'll be building upon this in forthcoming updates. 

Networking Improvements

In the Networking area we've got 3 bits of news:

  1. IPv4 AND IPv6 almost everywhere - Host-only, Internal, Bridged and our new NAT Network mode now all offer IPv6 to guests;
  2. IPv6 in VRDP - You can remotely connect to the consoles of your virtual machines via RDP over IPv6;
  3. New NAT Network mode - yet another way of configuring the network of your vm's...

Our existing NAT mode puts each guest vm on it's own private network. This is nice and easy and has served us very well over the years.

At the same time, many people use our Host-only networking to run multiple vm's on a private network that can talk to each other and also the host.

But what yet another group of people wanted was a private network where the guests could talk to each other but also to the internet too (or at least the network beyond the host). So this is what the new NAT Network mode offers. Diagrammatically, it looks like this:

Diagram

and the configuration dialog looks like this:

Dialogs

Hopefully you can see that this new NAT Network can be IPv6 or IPv4 and has an optional DHCP service. Also Port Forwarding is available to allow connections into the private network from the outside world.

Other Bells and Whistles

There are lots of other smaller improvements in 4.3 but 2 of my favorites are: 

Video Capture

4.3 comes with a built-in video capture facility to record the contents of your guest's screens. The resultant movie is stored in .webm format so can be played back by most movie players or even Google Chrome. 

Virtual Webcam

An extremely cool (but only experimental at this stage) feature is the VirtualBox virtual webcam device. This allows the guest to use the webcam of the host so that you can use Skype or Google Hangouts from within your guest. (Look for a separate blog on this feature)

What next?

In the time it has taken you to read this blog you could have downloaded 4.3 from the Oracle or community site to kick the tires yourself.

But there's still time, VirtualBox is only around 100Mb. Or if you were "born not to lead but to read" (apologies to Matt Groening), take a peek at the User Guide.

All in all, another solid release, one that we hope you'll enjoy discovering.

- FB 

Friday Jul 12, 2013

3D Acceleration with Ubuntu guests

There's a trend with some desktop Linux distributions to use more and more "eye-candy" which puts a greater strain on GPU functions offered by hypervisors.

VirtualBox offers 3D acceleration by intercepting OpenGL requests made by the guest vm, and passing then down to the host's OpenGL library to be executed directly by the host. 

To Configure a VM to use VirtualBox 3D acceleration:

  • Make sure you install the Guest Additions into the Linux guest (Host+D);
  • Enable 3D acceleration in the VM settings;

Then simply crank up your linux guest.

But on some platforms, and in some circumstances, the wrong renderers may be used by the guest OS which results in s l o o w w w performance of the guest.  

To check that you're using VirtualBox 3D acceleration on Ubuntu 12/13 type the following command:

/usr/lib/nux/unity_support_test -p 

If you see something like this:

... i.e. the OpenGL Renderer is NOT Chromium, then you are NOT using the VirtualBox OpenGL drivers. This can occur because of a race condition in the guest OS boot process. One workaround is to force the guest to load video drivers earlier in the boot sequence by running the following command:

sudo bash -c 'echo vboxvideo >> /etc/modules'

Once you do this, and then you reboot the guest you should re-rerun: 

/usr/lib/nux/unity_support_test -p  

Which hopefully will result in the Chromium renderers being seen to be used:

And a consequence is that your Linux guest will be faster and smoother.

Hope this helps. 

- FB 

Thursday Jun 27, 2013

Using VirtualBox to test drive Windows Blue

[Update: From VirtualBox 4.2.16 there's a Windows 8.1 and Windows 2012 OS type which automatically sets this property and makes this blog redundant]

Oracle VM VirtualBox is great for trying out the latest and greatest technologies and platforms. So when Microsoft recently announced the Developer Preview for Windows Server 2012 R2 and Windows 8.1,  it was with eager anticipation that FatBloke ran to the TechNet Evaluation Center to download the isos.

Once downloaded,  a new VM in VirtualBox Manager was created that used Windows 2012 (64-bit) OS type and all the defaults were selected.

And on starting the VM, and pointing to the iso file to install from, the excitement rose as we saw a cool new splashscreen image:

But suddenly our hopes are dashed....

It would seem that this platform requires an instruction (CMPXCHG16B) that VirtualBox doesn't offer "out-of-the-box". 

Fear not, for the VirtualBox team knew that this day would finally arrive and have prepared an "in case of emergency" switch as follows:

  1. Power off the vm;
  2. At the command line type: 
    VBoxManage setextradata [vmname] VBoxInternal/CPUM/CMPXCHG16B 1
  3. Start the VM and install Windows Server 2012 R2

This will be enabled by default in a future release, but geeks can't wait, hence this blog.

Enjoy!

-FB 

Monday Mar 18, 2013

What's New in Oracle VDI 3.5?

Oracle has just released Oracle Virtual Desktop Infrastructure version 3.5, a major new release which introduces some great new features, but also allows a VDI deployment that can start with a single server, yet scale to the Enterprise. Here's a quick review of some of these features:

Single Server to the Enterprise

For too long, the notion of VDI, or server-hosted virtual desktops, has been held back by the perceived high entry cost of the hardware needed to support it. It is assumed that virtualization requires both x86 servers and specialized ( i.e. "expensive" ) shared storage on which to hold the virtual machines. But Oracle's VDI solution challenges this with the option of using the local storage of the x86 server itself. This means that it is possible to build a single server solution using commodity hardware which can host hundreds of desktops. (If you want to build this yourself check out the excellent Getting Started Guide on this VDI documentation site.)

And the architecture is powerful enough such that, to expand capacity you can simply add more servers, or, as your deployment grows, plug-in shared storage devices too. 

So it's easy to get started, and easy to grow, but can it scale to the Enterprise, because Enterprise-scale deployments need Enterprise-scale tools, right?

Oracle Enterprise Manager 12c is such a tool. Now with support for Oracle VDI, Enterprise Manager can monitor your virtual desktop fleet and associated infrastructure, providing an instantaneous dashboard of the health of the system, pre-defined alerts should things start to go wrong, and an historical record of how things changed allowing rapid diagnosis of any issues as soon as they occur.

Dashboard

Smarter Virtual Desktop Management

In VDI, Virtual Drives are just files managed by the server(s). Previous versions of Oracle VDI used this knowledge to streamline how a virtual hard drive can be cloned from a master template (using Linked Clones) and how to separate System Hard Drives (i.e. C: ) from User Data in Personal Hard Drives, which are just another file on the server, but which can be plugged into newly minted virtual desktops, preserving user data across invocations and updates of the System Disk. 

Version 3.5 introduces a few new smart use cases involving Virtual Hard Drives:

Personal Hard Drives

Many organizations use Roaming Profiles allowing users to move between PCs with their data following them. In a virtualized environment, this approach is useful, but expensive on system resources because virtual desktops have a shorter lifecycle meaning that downloading the Profile happens frequently. So Oracle VDI allows profiles to be imported into a Personal Hard Drive which is then mapped into a newly created and provisioned Virtual Desktop without the hit on the network or the storage. 

Similarly, Personal Hard Drives can be exported to a shared location as part of a backup regime.

Application Hard Drives 

In a virtual desktop world how do you install new applications for users? Many sysadmins will install new applications in a new revision of the System Template, but others are using Application Virtualization technology such as Microsoft's App-V. With this, an App-V client is installed on the desktop and applications are streamed from a central server when required. But this results in slow startup times unless the App-V client has the application already in a local cache. And in a large virtual desktop deployment, the 9 o'clock problem is made worse by this approach because newly manufactured vm's will have an empty cache.

Oracle VDI 3.5 solves this with the notion of an Application Hard Drive - a virtual disk specifically assigned to hold an App-V cache, which is shared amongst many users and pre-populated with applications. This means applications startup faster and the load on the network and storage is greatly reduced. 

Virtual Hard Drives

Richer User Experience

So far, we've talked about features which will appeal to the System Administrator or Solution Architect, but what is there in 3.5 for the End-User? 

End users typically access Oracle VDI from an existing device (e.g. PC, iPad, etc) running the OVDC (Oracle Virtual Desktop Client) or from the excellent Sun Ray Clients, which are specifically designed to access your server-hosted virtual desktop securely and easily. And one of the cool things about VDI is that you can move from device to device and access the exact-same desktop session, right down to the last keystroke. Well, with 3.5 it gets even smoother jumping between devices even if the resolution of the displays is radically different, and the orientation changes. You can even resize the OVDC window and the server-hosted desktop changes resolution too, making it a very natural experience.

Oracle VDI was already pretty good at remoting even the richest desktop media types, using special codecs for displaying YouTube videos, for example. But in 3.5 it gets even better. Windows Media applications (Player and IE plugins) get accelerated by intercepting the high level codec and using built-in assists on the client to display media on to the screen.  This eases the load on the server which otherwise would be spending time decoding and encoding video. 

New Platforms

Oracle VDI 3.5 supports the latest Windows desktop platform, Windows 8. But did you know that Oracle VDI also support Linux and Solaris desktops too, including the latest Ubuntu platform. This means that however broad your user base, Oracle VDI can deliver the desktop platform they need. And as for the VDI deployment platform itself, 3.5 runs on Solaris 10 or 11 and on Oracle Linux 5.8 and 6.3 too. See the Release Notes for more details.

Anything else?

There are many, many other new features we've not had the space to cover here but as it is now easy to set up a single, self-contained VDI deployment on a single server, you can find these out for yourself. Here are a few useful links to help you on your journey:

Enjoy,

-FB 

Wednesday Mar 06, 2013

Upgrading Linux Guests

Just last week Oracle released Oracle Linux 6.4 and so it was time that Fat Bloke updated his Oracle Linux guests.

So after a simple and quick:

 yum update

I was in a position to reboot into my freshly updated 6.4 vm. But after rebooting I found myself looking at a stuck screen that looked a little like this:

The reason for getting stuck like this was because the installed VirtualBox Guest Additions were configured for an older X11 server, and the new update had a newer version.

So here's how to fix this:

  1. At this screen, type Ctrl-Alt-F2 to get to another virtual display;
  2. login, and as root type: 
  3. /etc/init.d/vboxadd-x11 setup 

    like this:

  4. reboot
  5. et, voila!

Hope this helps,

-FB

Friday Jan 25, 2013

Using VirtualBox Host-only Networking to run servers in your lap

Since the initial blog about VirtualBox and Networking, there have been lots of people asking how to run multiple server vm's on their laptops, allowing the host to also connect to these servers too. As it happens, I recently needed just such a configuration myself so thought I'd share how I did it...

On my Oracle Linux laptop, I wanted to set up a private network within my host on which I would run:

  • A Oracle Linux server running Oracle VDI which includes a MySQL database, Apache webserver, and other stuff;
  • A Windows Server 2012 providing DNS, DHCP and Active Directory;
  • I also wanted my Linux laptop to be able to reach these guest machines on the private network, too. 

Note that this had to be isolated to within my host machine because I was setting up a new Active Directory Domain (example.com) and we didn't want the Windows Server dishing out DHCP addresses to everyone in the office. But we did want the Linux Server to be able to talk with the Windows Server for directory services and name services.

So logically this looked like:

Network

Creating the Windows Server VM

I used the VirtualBox Manager to create a vm of OS type "Windows 2012 (64-bit)" but before running it for the first time, I modified the Network configuration of the guest to use the VirtualBox Host-only Ethernet Adaptor:

Host Only

I planned to use this Windows server to deliver DHCP addresses for the private host-only network, so I disabled the built-in DHCP server via the Preferences...Network dialog in the VirtualBox Manager (all this can be done form the command line too BTW). Like this:

DHCP Off

And in the interests of full disclosure, here are my private adapter settings too:


I then installed Windows Server 2012 giving it a static IP address of 192.168.245.110 and name ad.example.com.

After initial install I added extra roles to make the server be an Active Directory Domain Controller, DNS Server and DHCP Server:

AD Services

Creating the Linux Server

The Linux server is an Oracle Linux (6.3) server. Again, I set the newly created vm to use a Host-only network (as above), and installed Oracle Linux, giving it  a static IP address: 192.168.245.111 - vdi1.example.com, and set DNS to point to the AD server ad.example.com. 

This all worked swimmingly, and both machines could see each other and use each other's services:

Ping and nslookup

N.B. the servers running in these vm's are full blown instances so watch out for security settings and the like which block connections between them and the host.

The Host as a member of example.com 

The great thing about host-only networks is that the host itself sits on this network and so can partake in the fun.

The host sees this network just as another NIC:

$ ifconfig vboxnet0
vboxnet0  Link encap:Ethernet  HWaddr 0A:00:27:00:00:00  
          inet addr:192.168.245.1  Bcast:192.168.245.255  Mask:255.255.255.0
          inet6 addr: fe80::800:27ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2425 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:643528 (628.4 KiB)

Note that the IP address the host uses is configured when you set up the host-only network above.

Using Multiple NICs

I wanted to update the Windows and Linux guests using Software Update, but to do that I needed access to the Internet, which my host only adaptor did not provide for me. One way of doing this is to temporarily switch from Host-only to NAT networking, do the update, then switch back again. And VirtualBox lets you do this while the VM is running which is very cool.

But for my Linux VM I wanted something a bit more permanent. So I created a second Bridged virtual network adaptor so that my Linux VM had an address on my host's network as well as the example.com host-only network. To do this you do have to shutdown the guest OS, and then reconfigure the VM like this:

The guest simply then sees this as another interface: 

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:31:23:9F  
          inet addr:hidden  Bcast:hidden  Mask:255.255.255.0
          inet6 addr: hidden Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:563846 errors:0 dropped:0 overruns:0 frame:0
          TX packets:360395 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:347709416 (331.6 MiB)  TX bytes:260792184 (248.7 MiB)
eth1      Link encap:Ethernet  HWaddr 08:00:27:4D:34:8B  
          inet addr:192.168.245.111  Bcast:192.168.245.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe4d:348b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:468955 errors:0 dropped:0 overruns:0 frame:0
          TX packets:387661 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:354834569 (338.3 MiB)  TX bytes:104217032 (99.3 MiB)

Things to watch out for 

Firewalls

Server Operating Systems typically come as "secure by default" so watch out for firewalls blocking connections. As your host-only network is private anyway you could simply turn the firewall off, e.g. on Linux:

/etc/init.d/iptables stop 

Nameserver woes 

One issue that had me scratching my head for some time was that after I added a second interface to my VDI server, my name resolution stopped working. Eventually I figured it out: Linux has a feature called NetworkManager which detects new networks and reconfigures the system to use them. One of the results of this "reconfiguration" is an overwrite of the /etc/resolv.conf file which points to the nameservers. In my case this meant that the VDI server was no longer using the AD server for DNS. Linux experts could probably tell me how to elegantly fix this, but I found 2 solutions myself:

  1. Disable the Network Manager, so it will not restart at next boot. (sledgehammer)
  2. chkconfig NetworkManager off

  3. Use entries in /etc/hosts and ensure that /etc/nsswitch.conf has the line:
  4. hosts: files dns 
    

 Conclusion

I now have a very cool setup on my laptop which enables to play around with Oracle VDI, MySQL, Apache, Active Directory, and all the other services that Linux and Windows Servers offer, all without disturbing anyone else on the network.

Desktop

Hope this is useful to someone out there.

- FB

Friday Dec 14, 2012

Growing your VirtualBox Virtual Disk

Don't you just hate it when this happens:

Out of disk space

Fortunately, if you're running inside VirtualBox, you can resize your virtual disk and magically make your guest have a bigger disk very easily. There are 2 steps to doing this...

1. Resize the virtual disk

Use the VBoxManage command line tool to extend the size of the Virtual Disk, specifying the path to the disk and the size in MB:

VBoxManage modifyhd <uuid>|<filename> [--resize <megabytes>|--resizebyte <bytes>]
 

If you booted up your guest at this point, the extra space is seen as an unformatted area on the disk, like this:

So we now need to tell the guest about the extra space available.

2. Extend the guest's partition to use the extra space

How you do this step depends on your guest OS type and the tools you have available.

Linux guests often include the excellent gparted partition editor, whereas Windows 7 and 8 provide the Computer Management tool which can resize partitions.

Unfortunately, with Windows XP the Computer Management tool couldn't do this. But I do have a couple of other options:

Most Linux installable .isos include the aforementioned gparted tool, so I could simply attach, say, an Ubuntu install iso as a Virtual CD/DVD in my Windows XP vm and boot off that. (NB don't install Ubuntu, just run it from the CD). Then use gparted to extend the Windows XP partition, before finally rebooting.

But I took another route and plugged my resized virtual disk to a Windows Server 2012 vm I had lying around. Then I used the Computer Management tool in Windows Server 2012 to extend the partition of the Windows XP disk, before shutting down, unplugging the disk and reattaching to my Windows XP vm. (Note that if your vm's use different disk controllers, Windows will check the disks on booting, don't worry).

When I finally boot up my Windows XP guest I see the available disk space and all is well.

Free Space

At least until the next time ;-)

- FB 

Wednesday Nov 21, 2012

Creating and using VM Groups in VirtualBox

VirtualBox.pngWith VirtualBox 4.2 we introduced the Groups feature which allows you to organize and manage your guest virtual machines collectively, rather than individually.

Groups are quite a powerful concept and there are a few nice features you may not have discovered yet, so here's a bit more information about groups, and how they can be used....

Creating a group

Groups are just ad hoc collections of virtual machines and there are several ways of creating a group:

  • In the VirtualBox Manager GUI:
    • Drag one VM onto another to create a group of those 2 VMs. You can then drag and drop more VMs into that group;
    • Select multiple VMs (using Ctrl or Shift and click) then 
      • select the menu: Machine...Group; or  
      • press Cmd+U (Mac), or Ctrl+U(Windows); or
      • right-click the multiple selection and choose Group, like this:
  • From the command line:
    • Group membership is an attribute of the vm so you can modify the vm to belong in a group. For example, to put the vm "Ubuntu" into the group "TestGroup" run this command:
VBoxManage modifyvm "Ubuntu" --groups "/TestGroup"

Deleting a Group

Groups can be deleted by removing a group attribute from all the VMs that constitute that group. To do this via the command-line the syntax is:

VBoxManage modifyvm "Ubuntu" --groups ""

In the VirtualBox Manager, this is more easily done by right-clicking on a group header and selecting "Ungroup", like this:

Multiple Groups

Now that we understand that Groups are just attributes of VMs, it can be seen that VMs can exist in multiple groups, for example, doing this:

VBoxManage modifyvm "Ubuntu" --groups "/TestGroup","/ProjectX","/ProjectY"

Results in:

Or via the VirtualBox Manager, you can drag VMs while pressing the Alt key (Mac) or Ctrl (other platforms).

Nested Groups

Just like you can drag VMs around in the VirtualBox Manager, you can also drag whole groups around. And dropping a group within a group creates a nested group.

Via the command-line, nested groups are specified using a path-like syntax, like this:

VBoxManage modifyvm "Ubuntu" --groups "/TestGroup/Linux"

...which creates a sub-group and puts the VM in it.

Navigating Groups

In the VirtualBox Manager, Groups can be collapsed and expanded by clicking on the carat to the left in the Group Header.

But you can also Enter and Leave groups too, either by using the right-arrow/left-arrow keys, or by clicking on the carat on the right hand side of the Group Header, like this:

.

..leading to a view of just the Group contents. You can Leave or return to the parent in the same way.

Don't worry if you are imprecise with your clicking, you can use a double click on the entire right half of the Group Header to Enter a group, and the left half to Leave a group. Double-clicking on the left half when you're at the top will roll-up or collapse the group.

 

Group Operations

The real power of Groups is not simply in arranging them prettily in the Manager. Rather it is about performing collective operations on them, once you have grouped them appropriately.

For example, let's say that you are working on a project (Project X) where you have a solution stack of:

  • Database VM,
  • Middleware/App VM, and 
  • a couple of client VMs which you use to test your app.

With VM Groups you can start the whole stack with one operation. Select the Group Header, and choose Start:

The full list of operations that may be performed on Groups are:

  • Start
    • Starts from any state (boot or resume)
    • Start VMs in headless mode (hold Shift while starting)
  • Pause
  • Reset
  • Close
    • Save state
    • Send Shutdown signal
    • Poweroff
  • Discard saved state
  • Show in filesystem
  • Sort

Conclusion

Hopefully we've shown that the introduction of VM Groups not only makes Oracle VM VirtualBox pretty, but pretty powerful too. 

- FB 

Thursday Sep 13, 2012

What's New in Oracle VM VirtualBox 4.2?

VirtualBox.pngA year is a long time in the IT industry. Since the last VirtualBox feature release, which was a little over a year ago, we've seen:

  • new releases of cool new operating systems, such as Windows 8, ChromeOS, and Mountain Lion;
  • we've seen a myriad of new Linux releases from big Enterprise class distributions like Oracle 6.3 and Solaris 11, to accessible desktop distros like Ubuntu 12.04 and Fedora 17;
  • and we've also seen the spec of a typical PC or laptop double in power.

All of these events have influenced our new VirtualBox version which we're releasing today. Here's how...

Powerful hosts 

One of the trends we've seen is that as the average host platform becomes more powerful, our users are consistently running more and more vm's. Some of our users have large libraries of vm's of various vintages, whilst others have groups of vm's that are run together as an assembly of the various tiers in a multi-tiered software solution, for example, a database tier, middleware tier, and front-ends. 

So we're pleased to unveil a more powerful VirtualBox Manager to address the needs of these users:

VirtualBox Manager

VM Groups

Groups allow you to organize your VM library in a sensible way, e.g.  by platform type, by project, by version, by whatever. To create groups you can drag one VM onto another or select one or more VM's and choose Machine...Group from the menu bar. You can expand and collapse groups to save screen real estate, and you can Enter and Leave a group (think iPad navigation here) by using the right and left arrow keys when groups are selected.

But groups are more than passive folders, because you can now also perform operations on groups, rather than all the individual VMs. So if you have a multi-tiered solution you can start the whole stack up with just one click.

Autostart

Many VirtualBox users run dedicated services in their VMs, for example, running a Wiki. With these types of VM workloads, you really want the VM start up when the host machine boots up. So with 4.2 we've introduced a cross-platform Auto-start mechanism to allow you to treat VMs as host services.

Headless VM Launching

With VM's such as web servers, wikis, and other types of server-class workloads, the Console of the VM is pretty much redundant. For some time now VirtualBox has offered a separate launch mechanism for these VM's, namely the command-line interface commands VBoxHeadless or VBoxManage startvm ... --type headless commands. But with 4.2 we also allow you launch headless VMs from the Manager.

Simply hold down Shift when launching the VM from the Manager.  It's that easy.

But how do you stop a headless VM? Well, with 4.2 we allow you to Close the VM from the Manager. (BTW best to use the ACPI Shutdown method which allows the guest VM to close down gracefully.)

Shutdown VM

Easy VM Creation

For our expert users, the  New VM Wizard was a little tiresome, so now there's a faster 2-click VM creation mode. Just Hide the description when creating a new VM.

Powerful VMs 

As the hosts have become more powerful, so are the guests that are running inside them. Here are some of the 4.2 features to accommodate them:

Virtual Network Interface Cards 

With 4.2, it's now possible to create VMs with up to 36 NICs, when using the ICH9 chipset emulation. But with great power comes great responsibility (didn't Obi-Wan say something similar?), and so we have also introduced bandwidth limiting to prevent a rogue VM stealing the whole pipe.

VLAN tagging

Some of our users leverage VLANs extensively so we've enhanced the E1000 NICs to support this. 

Processor Performance

If you are running a CPU which supports Nested Paging (aka EPT in the Intel world) such as most of the Core i5 and i7 CPUs, or are running an AMD Bulldozer or later, you should see some performance improvements from our work with these processors. And while we're talking Processors, we've added support for some of the more modern VIA CPUs too.

Powerful Automation

Because VirtualBox runs atop a fully blown operating system, it makes sense to leverage the capabilities of the host to run scripts that can drive the guest VMs. Guest Automation was introduced in a prior release but with 4.2 we've revamped the APIs to allow a richer and more powerful set of operations to be executed by the guest. Check out the IGuest APIs in the VirtualBox Programming Guide and Reference (SDK).

Powerful Platforms 

All the hardcore engineering that has gone into 4.2 has been done for a purpose and that is to deliver a fast and powerful engine that can run almost any x86 OS because of the integrity of the virtualization. So we're pleased to add support for these platforms:

  • Mac OS X "Mountain Lion" 
  • Windows 8
  • Windows Server 2012
  • Ubuntu 12.04 (“Precise Pangolin”)
  • Fedora 17
  • Oracle Linux 6.3 
  • Solaris 11

Here's the proof:

platforms

We don't have time to go into the myriad of smaller improvements such as support for burning audio CDs from a guest, bi-directional clipboard control,  drag-and-drop of files into Linux guests, etc. so we'll leave that as an exercise for the user as soon as you've downloaded from the Oracle or community site and taken a peek at the User Guide.

So all in all, a pretty solid release, one that we hope you'll enjoy discovering.

- FB 

Tuesday Jul 31, 2012

VirtualBox and Mountain Lion (Mac OS X 10.8)

VirtualBox.png[Update:

VirtualBox 4.1.20 and later are now completely compatible with Mountain Lion and this jiggery-pokery is no longer needed

- FB]

Apple released Mountain Lion (Mac OS X 10.8) late last week and a few people are stumbling over installing VirtualBox on it, so here are a few tips:

At the time of writing, the current version of VirtualBox is 4.1.18. Strictly speaking, this is not commercially supported, but VirtualBox users tend to be an intrepid and gung-ho bunch, and will try to run it on Mountain Lion anyway. They'll download VirtualBox and run the installer by clicking on the VirtualBox.mpkg icon:

...and get a message like this:

This will happen if you are using the default Security settings of Mountain Lion for downloaded applications, which probably look like this:

Application Settings

To get VirtualBox installed you can either:

  1. temporarily allow applications downloaded from Anywhere in the System Preferences box above, changing it back after installation; or
  2. hold Control key down as you click the .mpkg and choose Open. Doing this, you'll get a subtlety different dialog like this:

...which now has an Open button. Clicking on this will get VirtualBox installed too.

HTH someone out there.

-FB 

 P.S. You can expect to see a "Fully Supported" version in the not too distant future ;-)

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 

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