AdSense Mobile Ad

Showing posts with label virtualbox. Show all posts
Showing posts with label virtualbox. Show all posts

Tuesday, October 12, 2010

VirtualBox 3.2.10 Has Been Released

On October, 11th Oracle has released VirtualBox v. 3.2.10, a maintenance release of its desktop virtualization solution. This is the complete changelog and here's the download location.



Sunday, October 3, 2010

Some Reasons Why Solaris Is a Great Java Development Platform

Some days ago I posted "The Death of OpenSolaris: Choosing an OS for a Java Developer" in which I stated that Solaris is a great platform for a Java developer. The point of that post was simply wondering about which Solaris version I'd use since the demise of OpenSolaris. What the post did fail in clarifying, as Neil's comment made me realize, were the reasons why you should choose Solaris as your development platforms. I decided to write this follow up to that post to quickly summarize my favorite ones introducing some use cases where such technologies come in handy.

Software Availability

Although Solaris continues to be a niche OS (such as many other platforms are, anyway) in the last few years Sun and the community made an excellent job at promoting it as a desktop alternative for developers. There existed even a specific distribution for developers: Solaris Express Developer Edition. It was discontinued and there really is no need for it nowadays, anyway. Late Solaris distributions (such as SXCE, OpenSolaris, OpenIndiana), include (either bundled or in the official package repository):
  • Data bases (MySQL, PostgreSQL).
  • Web Servers (Apache, Java Enterprise System Web Server, etc.).
  • Application servers (Glassfish).
  • The SAMP stack (Solaris + Apache + MySQL + PHP).
  • IDEs (NetBeans, Eclipse).
  • Support for other popular languages (Ruby, Groovy, etc.).
  • Identity management (LDAP, Java Enterprise System Identity Server).

Solaris also is a platform of choice in the enterprise hence common enterprise software packages are supported and you, as a Java developer or Java architect, won't miss the pieces you need to build your development environment. The very basic software packages I often need as a Java developers are:
  • Oracle RDBMS.
  • Oracle WebLogic Application Server.
  • IBM WebSphere Application Server.
  • JBoss Application Server.

Solaris' Technologies

Solaris has got some unique technologies that other UNIX (and UNIX-like) systems that might be used as development platforms are lacking (or ported from Solaris.) What's important here is not "technologies on their own" or technologies that are helpful only in big enterprise environments, but the fact that:
  • They're pretty well integrated in Solaris and are built to take advantage of each other.
  • There are common use cases in which these technologies are really helpful to a developer.

Each one of them would deserve several posts on their own, however, I'll try to make some concise examples.

Solaris Service Management Facility

Although this technology is probably most useful to a system administrator, as a developer I often took advantage of it. SMF is a framework that provides a unified model for services and services management. The basic recipe only needs an XML descriptor for a service. SMF lets you:
  • Define a service: startup scripts location, parameters and semantics.
  • Establish dependencies between services:
    • Services and service instances may depend on other service instances.
    • Service startup is preformed in parallel respecting service dependencies.
  • Enhanced security and fine-grained role based access control:
    • A service can be assigned only the minimum required set of privileges it needs to run.
    • Service management can be delegated to non-root users using Solaris RBAC (Role-Based Access Control).
  • Service health control:
    • Service auto-restarts.
    • Service health is enhanced by cooperation with Solaris Fault Manager which prevents service degradation when hardware failures occur.
  • Automatic inetd Services Wrapper: SMF automatically wraps inetd services.

A Typical Use Case

Every software package I use has its own SMF descriptor (either provided with the package or defined by me) and it dramatically reduces the time I need to set up a development machine. In the case of WebSphere Application Server, for example, I have separate service instances for:
  • WebSphere IHS.
  • WebSphere Application Server.
  • WebSphere Application Server DMGR.
  • WebSphere Application Server cluster nodes.

Dependencies are defined between them and I can startup the required WebSphere services with just a line of code:

svcadm enable [websphere-service-name]

and SMF will take care of everything.

The usage pattern for SMF can be enhanced further. Let's suppose you're working in one or more projects and each one of them requires distinct set of running services. What usually happens is one of the following:
  • You install them all and let them run.
  • You install them all and start and stop them manually when you switch working project.

Resources are always few for a developers and some are paranoid about sparing them. With SMF you can:
  • Define a SMF service for each of your projects.
  • For every projects, define dependencies with the services you need.

This way, at a minimum, you can start and shutdown, with a single command, every service you need for a specific project. No more:
  • Custom shell scripts for every service.
  • Custom configuration entries for inetd services (such as Subversion, Apache, etc.)
  • Specific OS customization.
  • Running services when you don't need them and waste resources you could use otherwise.

Example of SMF service manifest customization can be found in the following posts:

ZFS

The ZFS filesystem is unique as far as it concerns flexibility and ease of use. With an incredibly lean set of commands, you can:
  • Create file systems on the fly.
  • Snapshot file systems on the fly.
  • Clone file system on the fly with almost null space usage overhead.

There's a huge literature about ZFS and I'll limit to describe my favorite use cases.

Use case: Multiplexing Your Development Environment.

Software installations are just the beginning of your user experience. Often, we spend time:
  • Configuring our environments.
  • Fine-tuning them.
  • Defining the set of additional libraries we need.
  • Defining the set of server resources (JDBC, JMS, etc.) our applications use.

And so on. The list is endless.

Sometimes it's necessary to prepare different environments for different projects or different development stages of the same application. Instead of losing time and resource to build different environments I'll usually proceed as follows:
  • Install and configure my environment.
  • Make a ZFS snapshot of it.
  • Make a ZFS clone of it for every additional setup I need.

Oracle JDeveloper is a good example of an application I often clone. JDeveloper is fundamentally a single user environment, despite adopting the common approach of using a per-user configuration directory in the user's home directory. Instead of fiddling with scripts to set per-user configuration parameters, I just install it once, snapshot it's installation directory and make a ZFS clone, one per environment. I use several clones of the JDeveloper environment myself, in my user home directory.

The power of ZFS clones can be used by the Zones infrastructure, as we'll see in the following section, thus enhancing further its power. Cloning a ZFS filesystem is also advantageous while dealing with big installations such as disk images of your favorite virtualization technologies.

Additional posts I wrote about ZFS that could clarify some of its use cases are:

Containers and Other Virtualization Technologies

I consider Solaris a superior desktop virtualization platform. Once again, with a couple of commands. you can easily create a paravirtualized Solaris instance (a Zone). The zones infrastructure is ZFS-aware and can take advantage of it.

Zones can be configured with a command line interface to its XML configuration file. Creating a zone is straightforward and, since they're a lightweight technology, you can create as much zones as you need. If you're using ZFS, the process of cloning a zone is incredibly simple and fast.

Use Case: Clustering an Application Server

During the development of your Java EE application you will tipically need an instance of one (or more) of the following:
  • An application server.
  • A web server.
  • A data base;
  • An user registry.

It's also desirable to have them running on isolated environments so that you can mimic the expected production configuration. With zones it's easy: just create as many zones as you need and each one of them will behave as a separate Solaris instance: every zone will have, for example:
  • Its own network card(s) and IP configuration.
  • Its own users, groups, roles and security policies.
  • Its own services.

Instead of installing and configuring an environment multiple times, you will prepare "master" zones with the services you need. I've got a "master" zone for every one of the following:
  • WebSphere Application Server.
  • WebLogic Application Server.
  • Oracle DB.
  • MySQL DB.
  • LDAP directory.

and so forth. With one simple command (zoneadm clone [-m copy] [-s zfs_snapshot] source_zone) you'll end up with a brand new working environment in a question of minutes.

Use Case: VirtualBox and ZFS

Sometimes you'll rather work on a virtualized instance of some other OS, such as GNU/Linux, FreeBSD and Windows. Solaris is a great VirtualBox host and the power of ZFS will let you:
  • Create "master" images for every OS or every "OS role" you need.
  • Clone them on the fly to create a brand new virtual OS image.

In my case, I've got:
  • A master Windows 7 client with Visual Studio for .NET development.
  • A master Windows Server 2008.
  • A master Windows Server 2008 (a clone of the previous one) with SQL Server 2008.
  • A master Debian GNU/Linux.

Every time I need a new instance I just have to clone the disk image. In a matter of seconds I've got the environment I need. Not only I'm sparing precious time, I'm also sparing a vast amount of disk space. Should I store all of the images (and zones) I use without the ZFS technology and I'd need at least 4 times as much disks as I've got.

Use Case: A Virtualized Network Stack

Solaris provides you pretty powerful network virtualization capabilities. You can, for example, create as many virtual NICs as you need and use them independently either in Solaris Zones or as network cards for other virtualization technologies (such as VirtualBox.) Network cards can be interconnected with virtual switch (etherstubs) and enable you to create "networks in a box." Not only you can use virtualized instances to mimic your production environment: you'll be able to create a virtualized network to emulate the complex network policies your environment could need.

If you need to test an environment whose configuration would be impossible to replicate without additional physical machines, that's where virtualization technologies (such as Zones or VirtualBox) and the virtualized network stack come in handy. My developer environment for a project I'm working for is made up of:
  • Two zones with two load balanced IBM IHS instances.
  • A zone with an LDAP directory.
  • Two zones with two clustered instances of IBM WebSphere Application Server.
  • A Zone with an instance of IBM WebSphere DMGR.

With Solaris, I can replicate the production environment in my box and respect each and every network configuration we use. Without these technologies, it would have been much harder to accomplish this goal or I would end up with custom configurations (for example, to avoid port clashes). In all cases, I'd lose much more time on the administration and configuration of such environments if zones weren't so easy to use.

DTrace

DTrace power is extremely easy to explain to a developer. At the same time, it's difficult to grasp its usefulness without trying it yourself. DTrace on Solaris provides tens of thousand of probes out of the box and others can be created on the fly. This "probes" provide you an extremely powerful mean of troubleshoot problems in either your applications and the underlying operating systems. To use the probes you've got to use scripts written in the D language. Fortunately, this language is pretty easy by design and you can write powerful D scripts in a few lines of code.

DTrace is unobtrusive and let you troubleshoot problems immediately, without modifying your application, even in a production environment. Some IDEs, such as NetBeans, have powerful plugins that let you write D scripts and see the data collected by the probes in beautiful graphics.

As a developer, I valued DTrace usefulness more than once. Instead of troubleshooting problems having to dig into the source code and introduce additional code (even in the cases in which aspects come in handy), I could use a D script to observe the application from the outside and quickly collect data that could help me determine where the problem could be.

In some cases, moreover, you could find yourself dealing with situations in which there's no code available. I could quickly troubleshoot a problem I was having with WebSphere Application Server with a D script instead of relying on WebSphere tracing facilities and the task of interpreting log files.

Conclusion

So much for an introductory post. The possibility of building a development environment as close as possible as your target environment is a "must" for any development platform. Additionally, I consider that working on a environment as close as possible as the production environment not only gives you additional value and insights during an application development stage, but should also considered a mandatory requirement for every project we're involved into. Solaris provides all of the tools a developer need to accomplish this goal.

Solaris is a complex enterprise operating system with many features you won't probably ever use. Nevertheless, there's a use case for many others of them, as I tried to point out in this post. Since some of these technologies were developed with an open source license, they are also available on other operating systems: ZFS is available on FreeBSD and there exist a community effort to port it to OS X; DTrace is available on OS X, Linux and FreeBSD.

The "Solaris advantage" is that all of these technologies are highly integrated and take advantage of each other. The result is worth more than the sum of them. These technologies have got a very polished and easy to use administrative interfaces: when time is important, "How you do it" is fundamental.

I hope that these insights might help you understand if and when the Solaris operating system might be useful to you. Even if you consider that it's not, I suggest you give it a try anyway: it's always good to add new technologies to your tool box.

Wednesday, September 29, 2010

The Death of OpenSolaris: Choosing an OS for a Java Developer

A Bit of History: The Struggles of OpenSolaris

This is no news: you probably know all about it.

As a long time Solaris user, the recent years have been full of good news for me.

I remember starting with GNU/Linux at home to have "something similar" to the Solaris workstations I used at work. It was the time when software would most likely compile on Solaris rather than on Linux.

Years later I bought my first Sun Workstation: it was the time when trying to compile on Solaris packages that would supposedly compile on a POSIX system was a pain. Still, I continued to regard Solaris as a stable platform to keep on using it for my work duties, such as Java programming.

Then came Solaris 10 and all of its wonderful technologies such as ZFS, Zones and DTrace, just to cite a few. With it, there came the Solaris Express distributions which, at last, filled a long standing gap between Solaris and other operating systems, providing us a pretty modern desktop environment.

In late 2008 came the first OpenSolaris distribution. I installed it, played with it, but kept on using SXCE for my workstations. The main reason was compatibility with many Sun packages, such as the Java Enterprise System or the Sun Ray Server Software, that had more than one glitch on OpenSolaris.

When SXCE was discontinued, I waited for the 2010.xx OpenSolaris release to upgrade my systems. Unfortunately, that release will never see the light.

The Oracle Leaked Memo (the dignifying uppercase is a must given Oracle prolonged silence over the subject) shed a light over Oracle plans for Solaris proper and OpenSolaris. Part of the "good news" is that the Solaris Express program has been resurrected and the first binary distribution is expected later this year.

The bad news is that the code, at least the parts of it that will be released with an open source license, will be released after the releases of the full Solaris Operating Systems. Basically, our privileged observation point over the development of the operating system has been shut down.

Lots of ink has been been spilled since the Leaked Memo and plenty of information, discussions and wars are going on in the blogosphere. I'm not an authoritative source to speak about the subject and it's not even clear to me what I'm going to do, now.

Benefits of Solaris for a Java Developer

Solaris has been my operating system of choice since before I started working in the IT industry. As a student, I grew up with Solaris at the data center of my University and the Slackware I used at home seemed like a kid toy, compared to it. After graduating, I started working as a design engineer for a leading microprocessors producer. Needless to say, Solaris was the platform we ran our design software upon. Then, I moved to a consulting firm and started my career as a Java architect.

Solaris was and is the platform of choice for most of the clients I've been working for. Even today, the application servers, the cluster software, the database, and most of the infrastructure used by my clients run on Solaris. It always seemed a sound choice to me, then, developing software on the same platform that will run it in production.

IDEs, Tools and Runtimes

As a Java developer, I can run all of my tools I need on a supported platform. My favorite IDEs (NetBeans and JDeveloper), the application servers my clients use (WebLogic and WebSphere, mostly), the databases used by my applications (MySQL, Oracle RDBMS, PostgreSQL): all of them run and are supported on Solaris. Some of them are even bundled with it or readily available by Sun sponsored package repositories. The Eclipse platform, to cite a widely use IDE for Java, is available in the OpenSolaris IPS repository, too.

Solaris Technologies

Solaris 10 also integrates DTrace, a powerful, unobtrusive framework that allows you to observe and troubleshoot application and OS problem in real time, even in production systems with an almost null overhead. DTrace has allowed us to diagnose strange production quirks with no downtime: once you've tried DTrace and the D language, there's no going back to "just" a debugger, even in the development stages of your project.

Other kinds of problems does not show up in your debugger or are extremely hard to catch. It might be the case of network or file systems problems. That's where DTrace comes in handy: it lets you observe with an incredibly high detail what's going on in your application and in the kernel of the operating systems, if it's necessary to dig so deep.

Solaris Virtualization Technologies

Solaris is also an ideal host virtualization platform. Solaris can "virtualize itself" with Containers, Zones and Logical Domains: you can start a Zone in no time (and almost no space overhead), assign a resource cap to it and also build a virtualized network in a box to simulate a complex network environment.

One of the problems that I encountered during the development of big enterprise system is that the development environment, and sometimes even the integration environment, is very different than the production one. It surely is a methodology problem: nevertheless, developers have few weapons to counteract. For example, applications that appear to run fine on a single node may not run correctly on a server cluster, or scale badly.

The more you wait to catch a bug, the more impact will have a patch for it. That's why in my development team, for example, we use Solaris Zones to simulate a network cluster of IBM WebSphere Application Servers and a DB cluster. All of them run in completely isolated Zones in one physical machine and communicate on a virtual network with virtual etherstubs (sort of a network switch), VLANs and routing rules. This environment lets us simulate exactly how the software will behave in the production system. Without a flexible and lightweight virtualization technology it would have been much more difficult and expensive to prepare a similar environment.

And if you (still) need to run other platforms, you can use Xen or VirtualBox to run, for example, your favorite Linux distro, Windows, or *BSD.

Summarizing

Enumerating the advantages of Solaris is difficult in such a reduced space, however I'll try:
  • It's a commercially supported operating system: that's an option, since Solaris is free for development purpose. Nonetheless, it's an important point to take into account.
  • Is (very) well documented: there's plenty of official and unofficial documentation.
  • It's easy to administer: Solaris is pretty easy to administer, even if you're not a seasoned system administrator.
  • It's an UNIX system: with all of its bells and whistles.
  • It is a great virtualization platform.
  • It has some unique technologies that add much value to its offering, such as ZFS and DTrace.


If you're a Java developer and haven't given Solaris I try, I strongly suggest you do it. Maybe you'll start to benefit from other Solaris 10 technologies such as Zones and ZFS, even for running your home file or media server.

Complaints

I often hear complaints about Solaris coming from different sources and with the most imaginative arguments: proprietary, closed, old, difficult to use. I usually answer inviting users to try it and see for themselves before judging it (if that's the case). Most of the times I'm not surprised to discover that the complaining guy had minimal or null exposure to Solaris.

Also, I'd like to point out that no OS I tried is a swiss army knife. Solaris is a server-oriented OS with a good desktop but it's not comparable with other operating systems for such an use. So: no comparison with Linux, please. It would be so unjust as comparing Linux and Mac OS X for the average home user. ;)

Alternatives

Since Java "runs anywhere", there's plenty of choice for a Java developer.

Since I own a laptop with Mac OS X, I've built a small development environment with all of the tools I need. Mac OS X is a great operating systems that comes with many fancy features out of the box and, although it has some idiosyncrasy with Java (read: you have to use the JVM shipped by Apple), it's a good OS for a Java developer. Since the Mac OS X hype has begun, there's plenty of packages for it and a big ecosystem which is still growing. Still, many software packages run in the enterprise aren't supported on Mac OS X. Since I prefer to have an environment as close as possible as the production one, I think that OS X is not the best choice for the average Java EE architect.

I've also been an hardcore Slackware and Debian user for a long time. An enterprise Java developer would miss nothing in a modern GNU/Linux distribution, nowadays, and most of the software packages you'll find in the enterprise will run on your GNU/Linux distribution.

No need to talk about Windows, either.

So, why Solaris? Every OS has its own advantages and disadvantages. The point is to just recognize them. Mac OS X, in my opinion, is the best OS for a home user. I would change it for no Windows and no Linux. But as far as it concerns my developers' duties, every other OS just lacks the features and the stability that make Solaris great. ZFS, DTrace and Zones, for my use cases, are killer features.

What's Next?

You've decided to give Solaris a try, so: which is Your distribution? I don't know.

Solaris Express/Oracle Solaris

I strongly suspect that my wait will be prolonged and I will finally upgrade my machines as soon as Solaris Express has been released. Upgrading to Solaris 10 09/10 is not possible since I'm using some ZFS pools whose version is not yet supported by Solaris proper but it is a sound choice for a starter.

The advantage I see in using one of these versions is the availability of optional support and the good level of integration with the most commonly used software packages that Oracle is likely to guarantee.

OpenIndiana

You should also know that OpenSolaris sources have been (sort-of) forked and two new projects are born: Illumos and OpenIndiana. The project were started by Nexenta employees and volunteers of the OpenSolaris community. The first projects aims at maintaining the OpenSolaris code and the parts of the code that are closed or code that upstream might choose not to maintain. The OpenIndiana project aims at producing binary distribution of the operating system built upon the Illumos source code. OpenIndiana will provide a really open source, binary compatible alternative to Solaris and Solaris Express.

Sounds good and I'll willingly support it. In the meantime I've installed OpenIndiana in a couple of virtual machines and the first impressions are very good. I suppose it hasn't passed enough time yet for diverging changes to have emerged.

If you prefer a more modern desktop with a recent Gnome interface, drop Solaris 10 and go for OpenIndiana, if you don't feel like waiting for Solaris Express. In any case, switching between the two shouldn't pose any problems. What's clear to me is that I won't consider using both operating systems: I'll have to make a choice.

Support Availability

As an enterprise user and a Java developer, I've always been more concerned about OS support and support for the packages I use, rather than about eye candy. Even at the cost of running a proprietary platform.

In conclusion: I'll wait for Solaris Express to be released and only then will decide which one I'll use for my purposes between Oracle Solaris Express and  OpenIndiana. My heart is betting for OpenIndiana. My brain is betting for Oracle Solaris Express and Solaris proper. Only time will tell which one is right (for me.)

Follow-Up

A follow-up of this blog post is avaible at this address. In this post I'll try to summarize some use cases in which the technology we introduced in this post are effective and add real value to your development duties.

I hope you enjoy it.



Saturday, July 3, 2010

VirtualBox: Using Differencing Disks and Immutable Images

As I promised some time ago, I'm now writing an introductory blog post about a subject that some VirtualBox desktop users probably aren't aware of: differencing disks.

When you configure your guest's storage, you might have noticed a Differencing Disks checkbox in the configuration panel. If you tried to check it, chances are that nothing seems to happen. The VirtualBox GUI, indeed, provides no way to configure disks types and, consequently, not even differencing disks. The only clue that differencing disks are there can be seen if you made a snapshot of a virtual machine disk image. In that case, if you inspect the Storage settings of your virtual machine, you will notice that the attached disk is a "Normal (VDI)" disk type, as shown in the following screenshot:


If you now click the Differencing Disks checkbox, you will see that the attached disk actually is a differencing disk:


If you inspect the Hard Disk list box you will notice that what's really attached to your virtual machine is a differencing disk by UUID:


It won't be difficult to discover that UUID corresponds to the disk that stores the "differencing information" of the snapshot I took:


as can be seen in the file system:


There's a chance, then, that differencing disks are already part of your VirtualBox experience as a hidden "side effect" of taking virtual machine snapshots.

In this blog post we'll discover that immutable images (and differencing disks) are disk image types with its own advantages and we'll explore some use cases you can benefit from them.

Image Write Modes

Every virtual disk image you're using in your guests has a property callled image write mode. The mode can be:
  • Normal.
  • Write-through.
  • Immutable.

Normal Images

The default normal images are what you're accustomed to when running your typical guest. The guest instance can read and write to the image without restrictions and the image can be snapshotted. Snapshot data are written to a differencing image that receives the differences to the original image (or to its parent snapshot.) Normal  images can only be attached to one running guest at a time.

Write-through Images

Write-through images, with respect to normal images, aren't affected by snapshots.

Immutable Images

An immutable images, as its name implies, does not permanently record changes: changes are available only while the machine is running. As soon as it's power cycled, changes are lost and the image its reverted to its original state. As in the case of snapshots, VirtualBox will use a differencing image to record changes to an immutable image. The differencing image is then reset to its original state at guest power cycle. The auto-reset feature of a differencing disk can also be turned off. Immutable images can be attached to as many running hosts as you wish: each guest they'll be attached to will create a new differencing image to store their changes.

Use Cases

Each image type has its own pros and cons:
  • Normal images can be easily snapshotted but can't be used by more than a guest at a time.
  • Write-through images aren't affected by snapshots: they're ideal to host critical data that won't be compromised by a snapshot restore.
  • Immutable images won't ever be compromised: a power-cycle will restore them to their initial state. They can be used by multiple host at a time and are the quickest way to deploy multiple (initially) identical guest instances.

Immutable Image with a Differencing Disk

Using immutable images with differencing disks is one of the quickest way to deploy multiple instances of the "same" virtual machine. Since more than one virtual machine will be sharing the same underlying image you'll also spare a good amount of storage space.

I, for example, had to deploy more than ten instances of a proprietary database: all of the instances could share the same immutable image since all of the instance would use the very same operating system and the same initial data base configuration.

Creating A Virtual Machine

The first step to build your own immutable image is creating a virtual machine. This step is the same as usual:
  • I created a virtual machine (with a normal image).
  • Installed the operating system.
  • Installed the data base.
  • Finished to configure the environment with most of the configurations all instances would share.

Cloning the Disk

To clone your hard disk image you've got to use VirtualBox command line interface. Open your favorite shell and use the VBoxManage command to clone your hard disk:

$ VBoxManage clonehd <uid>|<file> <output>


You may check with either VirtualBox GUI, adding your newly created image or with the command line interface, as shown in the following images:


Marking the Image as Immutable

Once you're finished with your virtual machine you've got to mark the image as immutable. Once again, this step can only be performed using VirtualBox command line interface. Open your favorite shell and use the VBoxManage command to mark to change the image type:

$ VBoxManage modifyhd <file> \
  --type immutable


Both VirtualBox GUI and the VBoxManage command may be used to check an image type:



Attaching the Immutable Image to a Virtual Machine

Now you can attach your immutable image to a virtual machine. Every time you attach an immutable image to a virtual machine, VirtualBox will create a differencing disk for you that will store the changes recorded for a specific virtual machine.

As explained in the previous sections, the default differencing disks created by VirtualBox will be reset every time a virtual machine is stopped and restarted. Depending on your use case, you might want changes to be permanent.

Setting an Image Auto Reset Flag to Off

Every differencing disk has got an autoreset flag which, by default, is set to on. To set it to off you have to use the VBoxManage command:

$ VBoxManage modifyhd <uuid>|<filename> \
  --autoreset off

Your differencing disk won't "forget" any more the changes it records.

Conclusion

I hope that this quick walkthrough helps you discover some lesser known functionality of VirtualBox, either if you're using it as a desktop or as a server virtualization platform. Either if you're deploying many images or if you're simply installing a couple of virtual machines for your family, immutable images and differencing disk will help you spare a lot of storage space and, above all, a lot of your precious time.

Further Readings

If you're a Solaris user (at least Solaris 10, OpenSolaris, OpenIndiana, etc.) you will notice that the basic benefit of using immutable images can be achieved using native Solaris technologies such as ZFS snapshots and clones or ZFS deduplication. Using ZFS instead of VirtualBox immutable images is leaner and reduces VirtualBox administration times.

Although not related to VirtualBox, if you're interested at the advantages that the Solaris' ZFS file system can bring even in a deployment of a virtualized desktop environment, these are interesting reads:









Thursday, June 17, 2010

Autoreset Differencing Disks Bug in VirtualBox 3.2 Up to 3.2.4

Since in the latest port I've been suggesting you give VirtualBox a try (including as a small server virtualization platform) I think this is a bug worth knowing: VirtualBox 3.2 up to (at least) VirtualBox 3.2.4 is ignoring the autoreset property of differencing disks. You can just check that the

$ VBoxManage modifyhd name|uuid --autoreset on|off

command will have no effect. What's worse, it seems that the affected versions of VirtualBox are sticking with an autoreset value set to off.

This basically means that, after stopping and starting a virtual machine, the differencing disks won't be wiped off automatically hence changes made into your guest instance will be persisted upon reboot. This defies one of the common use cases where VirtualBox immutable images and differencing disks are most useful.

If you don't know what immutable images and differencing disks are, keep in touch. A future blog post about these features has already been scheduled.

Update: I verified that VirtualBox 3.2.8 is not affected any longer by this bug.

Friday, June 11, 2010

VirtualBox as an Enterprise Server Virtualization Solution

Introduction

Some posts ago I quickly argued that VirtualBox might be used as a server virtualization platform in some scenarios instead of relying on more complex enterprise solutions such as the very Oracle VM or a VMWare. VirtualBox is a great Type 2 Hypervisor that has been rapidly growing in the past few years and now supports a wide range of both host and guest operating systems. Although VirtualBox is the heart of Sun/Oracle offering for desktop virtualization and although Solaris comes with Xen as a Type 1 Hypervisor, I argue that VirtualBox may be a solution to seriously take into consideration especially when using Solaris as a host operating system since VirtualBox itself can leverage Solaris features such as:
  • ZFS.
  • Crossbow (network virtualization and resource control).
  • RBAC, Projects and Resource control.

Solaris comes with other virtualization technologies such as Zones and Containers. If you need a Solaris instance, the quickest way to virtualize one is creating a zone. If you're using Solaris, then, you might want to consider Zones instead of a Type 1 hypervisor. Having said that, VirtualBox might help you in the case you're running Zones alongside other guests: instead of dedicating physical machines to zones and other physical machines to a Type 1 hypervisor such as Oracle VM or VMWare (both based on Linux), you might want to consider OpenSolaris' Xen or VirtualBox.

OpenSolaris' Xen is a Type 1 hypervisor built on the Solaris kernel: as such, it virtualizes guest OSs alongside Solaris Zones on the same physical machine. VirtualBox, being a Type 2 hypervisor, can be executed on a Solaris host alongside Zones as well.

In this post we'll make a quick walkthrough to describe how VirtualBox can be used in a Solaris environment as a server virtualization platform.

Installing VirtualBox

Installing VirtualBox on the Solaris Operating System is very easy. Download VirtualBox, gunzip and untar the distribution (please substitute [virtualbox] with the actual file name of the software bundle you downloaded):

$ gunzip [virtualbox].tar.gz
$ tar xf [virtualbox].tar

If you're upgrading VirtualBox you've got to remove the previous version before installing the new one:

# pkgrm SUNWvbox

Install the VirtualBox native packages:

# pkgadd -d ./[virtualbox].pkg

Clone a Virtual Machine with Solaris ZFS

After installing an OS instance, ZFS may help you to spare time and space with ZFS snapshots and clones. ZFS allows you to instantly snapshot a file system and, optionally, to clone it as promote it to a ZFS file system as well. This way, for example, you could:
  • Install a guest instance (such as a Debian Linux.)
  • Take a snapshot of the virtual machine.
  • Clone it as many times as you need it.

Not only will you spare precious storage space: you'll be executing a set of identical virtual machine in practically no time. If you needed to upgrade your guest OS, you would upgrade the initial image and then you would snapshot and clone it again. If you carefully plan and analyze your requirements in advance, ZFS snapshots and clones may be a real value for your virtual machine deployments.

In an older post I made a quick ZFS snapshost and clones walkthrough.

Solaris Network Virtualization

One of the stoppers that, years ago, would prevent me to use VirtualBox in a server environment was the lack of a network virtualization layer. Basically, you were left with unsuitable choices for configuring your guests' networks on a server environment:
  • NAT: NAT wasn't flexible nor easy to administer. Since you were NAT-ting many guests on the same physical cards, you would quickly find yourself in a "port hell."
  • Dedicated adapter. This is the most flexible option, obviously, but it had a major problem: network adapters are a finite number. You would encounter this problems when configuring Solaris Zones as well.

The solution to all of this problem is called "Crossbow." You can read a previous blog post to discover Solaris Network Virtualization and get started with it.

VirtualBox introduced a feature, called Bridged Networking, that will let guests use NICs (both physical and virtual) with a "net filter" driver. When using VirtualBox Bridged Networking with Crossbow, please take into account the following:
  • A Crossbow VNIC cannot be shared between guest instances.
  • A Crossbow VNIC and the guest network interface must have the same MAC address.

Since Crossbow will let you easily create as many Virtual NIC as you need, the previous points aren't a real issue anyway.

After creating a VNIC for exclusive use of a VirtualBox guest you won't even need to plumb it and bring it up. VirtualBox will do that for you.

Configuring Bridged Networking

To configure bridged networking over a VNIC for a VirtualBox guest you can use the VirtualBox UI or VirtualBox command line interface utilities, such VBoxManage:

$ VBoxManage modifyvm <uid|name>
  --nic<1-N> bridged
  --bridgeadapter<1-N> devicename 

Configuring SMP

VirtualBox introduced SMP support some versions ago. That was a huge step forward: guests can now be assigned a number of CPUs to execute on. As usual, you can use both VirtualBox UI or CLIs to configure your guests. On the following line are summarized VBoxManage options related with CPU management:

$ VBoxManage modifyvm <uid|name>
  --cpus <number>
  --cpuidset <leaf> <eax> <ebx> <ecx> <edx>
  --cpuidremove <leaf>
  --cpuidremoveall
  --cpuhotplugging <on|off>
  --plugcpu <id>
  --unplugcpu <id>
  
Option names are self-explanatory. Nevertheless, if you need further information, please check VirtualBox official documentation.

Controlling VirtualBox Guest Resources with Solaris Resource Control

An interesting feature of Solaris is its Resource Control facility. You can, in fact, execute VirtualBox guests in a Solaris Project and apply fine-grained resource control policies to each of your running guests. That means, for example, that a VirtualBox guest with two CPUs can be executed in the context of a Solaris Project with a resource control policy that limits its cpu (project.cpu-cap) to 150%. Although your guests may use two CPUs concurrently, the total CPU that it may use is limited to 150%.

To apply resource control policies to your guest one strategy could be the following:
  • Create an user for every set of guest that will be subject to a resource control policy.
  • Create a default project for each of these users and define the resource control policies that you need to apply.
  • Execute VirtualBox guests with the defined users.

This way, Solaris will automatically apply the default resource control policies to every process of such users, such as the very same VirtualBox guest instances.

For a walkthrough to get started with Solaris Projects and Resource Controls, you can read a previous blog post.

Controlling a VirtualBox Guest Remotely

To control a VirtualBox guest remotely you can use VirtualBox command line interfaces, such as VBoxManage. With VBoxManage, for example, you will be able to:
  • Create guest instances.
  • Modify guest instances.
  • Start, pause and shutdown guest instances.
  • Control the status of your instances.
  • Teleport instances on demand to another machine.

Starting a VirtualBox Guest

To start a VirtualBox guest remotely you can use VBoxManage or the specific backend command. VBoxManage will start an instance with the following syntax:

$ VBoxManage startvm <uid|name>
  [--type gui|sdl|vrdp|headless]

VBoxManage startvm has been deprecated in favor of the specific backend commands. Since in a server environment you will probably launch guests with the headless backend, the suggested command will be:

$ VBoxHeadless --startvm <uid|name>

Please take into account that VBoxHeadless will not return until the guest has terminated its execution. To start a guest with VBoxHeadless on a remote connection to your server, then, you should use nohup for it not to terminate on shell termination:

$ nohup VBoxHeadless --startvm <uid|name> &

What if my ssh session won't exit?

You might experience a strange issue with VBoxHeadless, which is related with (Open)SSH behavior. After issuing the previous command, the ssh session will seem to hang until the guest execution is terminated. This issue is not related to VBoxHeadless but to (Open)SSH's behavior. Please read this post for an explanation. Meanwhile, the workaround I'm aware of are the following: either invoke VBoxHeadless using /dev/null as standard input:

$ nohup VBoxHeadless --startvm <uid|name> < /dev/null &

or terminate manually the ssh session with the ~. sequence after issuing the exit command.

Accessing a Remote VirtualBox Guest with RDP

VirtualBox has a built-in RDP facility that will let you access a guest console remotely using the RDP protocol. If you start an headless guest the VirtualBox RDP server will be enabled by default. To access the instance remotely, then, a suitable client such as rdesktop (for UNIX systems) will be sufficient.

Controlling a VirtualBox Guest Remotely

To control a VirtualBox guest you could either:
  • Launch the shutdown sequence on the guest itself, which is the procedure I recommend.
  • Use VBoxManage controlvm to send a suitable signal to the guest such as an acpipowerbutton, acpisleepbutton or a hard poweroff signal:

$ VBoxManage controlvm <uid|name>
  pause|resume|poweroff|savestate|
    acpipowerbutton|acpisleepbutton

VirtualBox, as outline in the syntax of the preceding example, will let you pause a virtual machine or even saving its state to disk for a later quick resume.

Teleporting a VirtualBox Guest to Another Server

VirtualBox now supports guest instances teleporting. Teleporting lets you move a running instance to another server with minimal service disruption. To teleport a VirtualBox (teleport-enabled) guest to another (VirtualBox-enabled) machine you can just issue the following command:

$ VBoxManage <uid|name> \
  teleport --host <name> --port <port> \
  --maxdowntime <ms> \
  --password <passwd> \

Flush Requests

VirtualBox, by default, might ignore IDE/SATA FLUSH requests issued by its guests. This is an issue if you're using Solaris ZFS which, by design, assumes that FLUSH requests are never ignored. In such case, just configure your virtual machine not to ignore such requests.

For IDE disks:

$ VBoxManage setextradata "name" \
  "VBoxInternal/Devices/piix3ide/0/LUN#[x]/Config/IgnoreFlush" 0

The x parameters is:

ValueDescription
0Primary master
1Primary slave
2Secondary master
3Secondary slave


For SATA disks:

VBoxManage setextradata "name" \
  "VBoxInternal/Devices/ahci/0/LUN#[x]/Config/IgnoreFlush"

In this case the x parameter is just the disk number.

Next Step

As you can see, VirtualBox is a sophisticated piece of software which is now ready for basic enterprise server virtualization. This post just shows you the beginning, though. VirtualBox offers you many other services I haven't covered (yet.) The Solaris operating system will offer you rock-solid enterprise service that will enhance your overall VirtualBox experience when used as a host.

If you're planning to virtualize guest operating systems in your environment and if your requirements fits in the picture, I suggest you strongly consider using VirtualBox on a Solaris host.

If you already use Solaris, VirtualBox will live alongside other Solaris virtualization facilities such as Solaris Zones.









Friday, June 4, 2010

VirtualBox as a Server Virtualization Platform

I'm a faithful VirtualBox user since its first versions for the Solaris platform. Its simplicity and the Solaris support made it a perfect choice for me, casual user of some Windows virtual machine. I could not imagine that VirtualBox would grow so rapidly to be the kind of platform it is today. I'm really glad to VirtualBox community and to Sun for this great piece of software. 

I'm using VirtualBox even on my MacBook: it's especially useful for me to build demos. Few days ago I built a Sun Ray Server demo with a virtualized OpenSolaris (2009.06 upgraded to b134) on my Mac in a question of minutes.


VirtualBox as a Server Virtualization Platform

VirtualBox, as many of you will know, is also used as a server virtualization platform. The very Sun Virtual Desktop Infrastructure can use a VirtualBox behind the scenes. Years ago, the major stopper for such an use, in my opinion, was the lack of a functional virtualized network stack. Since the introduction of Crossbow in Solaris and the Bridged Adapter functionality in VirtualBox, there's no reason I wouldn't run VirtualBox in a server (except resource consumption considerations that are off topic here.)

Having said that, in my office I get an enormous advantage from using VirtualBox on some Sun Fire servers with ZFS. As I told on older posts (see here and here) I take advantage of ZFS snapshots and clone to build a set of preconfigured virtual machines and clone them whenever I register a new instance. Making a ZFS clone and registering a new VirtualBox virtual machine is a no brainer. You can (and should...) even script it using VirtualBox command line interfaces (such as VBoxManage.) Horizontal scalability of such an environment is very good and, moreover, our infrastructure is very cheap. Some Sun Fire X2270 M2 and OpenStorage appliances have lowered the TCO of our desktop and server platforms. Nowadays, we estimate that the typical virtual machine we're running costs us about $60 per month (including server housing fees in a datacenter.) 

If command line interface falls short and you need more advanced administration tools, you should be aware of the VirtualBox Web Console project. Honestly, I don't use it because our environment is relatively small. Surely it does have a place in a large corporate environment.

Remote Virtual Machines and Desktop Virtualization

For the reasons stated above, I no longer execute virtual machine in my own laptop except in the cases when the virtual machine will be used in an external environment (as in the case of demos for our clients.) Whenever I need to use a virtual machine, unless it's already running, I just start it remotely:

$ VBoxManage startvm your-vm-name --type vrdp

The --type vrdp flag is necessary if you want to remotely connect to the virtual machine using the internal VirtualBox RDP implementation. You can even just launch the command using ssh (in my case, certificate authentication is performed so that I can safely script it):

$ ssh your-server VBoxManage [...]

The last thing you need is an RDP client for your client platform. Solaris has got a couple of clients bundled with it. In the case of OS X I just use Microsoft Remote Desktop Connection (yes, I know...)


One virtual machine per user obviously is not the way to go to provide a virtualized desktop experience to your users. If you want to do that, you can make a step forward and use a VirtualBox powered Sun Virtual Desktop Infrastructure and give them access using Sun Ray clients. This way, we reduced TCO of desktop computers for a wide range of user profiles. When feasible, we later moved such users to a Solaris desktop access and spared Windows license fees.

Is It Ready for the Enterprise?

I would say that it depends on your requirements. I consider VirtualBox a mature and very stable product. Together with Solaris, VirtualBox can bring you plenty of advantages:
  • Reduced storage consumption: Solaris has got two (yes, two) built-in technologies that can help you deduplicate your data and spare costly space of your storage infrastructure: ZFS snapshot and clones and ZFS deduplication. ZFS snapshot and clone, alone, has helped us incredibly reduce the footprint of our virtual machine disk images in our storage arrays.
  • Observability: DTrace. Just read the documentation and learn what DTrace can do for you, even on a production system, with no downtime and no performance penalty.
  • Network Virtualization: Project Crossbow has given Solaris a very flexible network virtualization stack. Creating virtual entities such as etherstubs, virtual network adapters and so on, is easy.
  • Predictive Self-Healing: Solaris has got a set of built-in features to improve observability, diagnostics and self-healing.
  • VirtualBox virtual machine can be teleported between a source and a target host while running.
  • Desktop virtualization with Sun Ray appliances.

These a just a few of the reasons why I consider that VirtualBox can be used in an enterprise environment. Undoubtedly, other server virtualization platforms offer characteristics that VirtualBox does not implement and you should review your requirements on a case by case basis. Sometimes tradeoffs are acceptable and more profitable than overkill solutions. Anyway, where VirtualBox isn't sufficient, there aways is an Oracle VM out there.

Conclusions

VirtualBox is a very flexible product and, for the average user, is pretty simpler than full featured server virtualization platforms such as Sun xVM Server (now dead), Oracle VM, other Xen-based platforms or VMWare ESX. If your requirements allow it, VirtualBox is a software to seriously take into account. If you use Solaris, moreover, you will benefit of some of Solaris' great technologies such as DTrace, ZFS snapshot and clones, ZFS deduplication and Solaris virtual network stack (Crossbow.)

On another blog post I will describe how VirtualBox, together with Solaris, can be an easy to manage and powerful solution for small scale deployments of an enterprise virtualization platform. 


Tuesday, May 18, 2010

VirtualBox v. 3.2.0 Has Been Released Adding Support For Mac OS X


Today, Oracle Corporation has released VirtualBox v. 3.2.0 and renamed it Oracle VM VirtualBox.

This is a major version which includes many new technologies such as:
  • In-hypervisor networking.
  • Remote Video Acceleration.
  • Page Fusion.
  • Memory Ballooning.
  • Virtual SAS Controller.
  • Mac OS X guest support (on Apple hardware only.)

And much more. If your want to read the official announcement please follow this link. If you want to read the change log please follow this link.

Monday, December 21, 2009

iPhone on a Solaris Host

I'm a moderately happy owner of an iPhone and, as I'm usually running Solaris on my systems, I've struggled to find a working solution to connect my handset to an iTunes instance. One of the major drawbacks of the iPhone is that you really need iTunes: whether you want to upgrade it, back it up, or simply transfer the contents you purchased on the Apple stores, you need iTunes to get the job done.

I'm running several virtualized OS on my Solaris guests with Sun xVM VirtualBox, and never managed to make it work because of some limitations of the Solaris USB driver implementation. A couple of days ago, Sun announced the release of xVM VirtualBox 3.1.2 and in the changelog I read the following:
  • Solaris hosts: several USB fixes (including support for Apple iPhone)

I quickly updated my VirtualBox instance, quickly live-upgraded my Solaris Express Nevada build 116 to Nevada build 129 (during the installation, VirtualBox informed me that it needed recent Nevada builds for the USB kernel module to work properly), plugged the iPhone in an USB slot of a Sun Ultra 24 and it worked!





Sun xVM VirtualBox v. 3.1.2 has been released

Sun xVM VirtualBox v. 3.1.2 has been released. This is a minor update and the current changelog is:
  • VMM: fixed SMP stability regression
  • USB: fixed USB related host crashes on 64 bits Windows hosts (#5237)
  • Main: wrong default HWVirtExExclusive value for new VMs (bug #5664)
  • Main: DVD passthrough setting was lost (bug #5681)
  • VBoxManage: iSCSI disks do not support adding a comment (bug #4460)
  • VBoxManage: added missing --cpus and --memory options to OVF --import
  • GUI: fixed VBox URL in update dialog for German and Dutch languages
  • GUI: NLS updates
  • OVF: fixed export of non standard storage controller names (bug #5643)
  • Solaris hosts: several USB fixes (including support for Apple iPhone)
  • Mac OS X hosts: several fixes for the 3D support
  • Mac OS X hosts: re-enabled CMD+Key combinations, even if the Host-Key isn't CMD (bug #5684)
  • Mac OS X hosts: fixed to fast scrolling if the mouse wheel is used inside the guest (bug #5672)
  • Mac OS X hosts: dock & menubar don't disappear in fullscreen when the VM is not running on the primary display (bug #1762)
  • Mac OS X hosts: added an option for enabling "Auto show Dock & Menubar in fullscreen" (bug #5636)
  • Windows host installer: fixed starting VBox with wrong privileges right after installation (bug #4162)
  • Host interface and host-only networking: prevent driver from unloading while a VM is still active (Windows host only)
  • Host-only networking: fixed host-only interface creation (Windows host only) (bug #5708)
  • Virtio-net: don't crash without an attached network
  • Virtio-net: fixed the issue with intermittent network in VM with several virtual CPU cores.
  • NAT: fixed port-forwarding regressions (bug #5666)
  • NAT: fixed crash under certain conditions (bug #5427)
  • NAT: fixed resolving of names containing a slash or underscore when using the host resolver DNS proxy (bug #5698)
  • ATA: fixed sporadic crash when resuming after a VM was forcefully paused (e.g. due to iSCSI target being unavailable)
  • SATA: fixed raw vmdk disks (bug #5724)
  • Linux guests: increased the default memory for Redhat and Fedora guests
  • Linux Guest Additions: fixed installation on RHEL 3.9 guests and on some 64bit guests
  • Linux Guest Additions: prevent SELinux warnings concerning text relocations in VBoxOGL.so (bug #5690)
  • X11 guests: fixed mouse support for some Xorg 1.4 guests (openSUSE 11.0)
  • X11 guests: fixed xorg.conf modification for some older Xorg releases (openSUSE 11.1)
  • Windows guests: fixed some VBoxService shutdown issues
  • Windows guests: fixed VBoxVideo spinlock issues on NT4
  • Windows Guest Additions: fixed uninstallation issues of NT4
  • Shared folders: fixed resolving of symlink target (bug #5631)
  • 2D Video acceleration: delay loading of OpenGL dlls for Windows hosts to avoid GUI crashes on misconfigured systems
  • 2D Video acceleration: fixed issues with video picture not displayed on playback

The changelog claims that support for Apple iPhone has been included for Solaris hosts. If working, that's what I'd been waiting for months!

Tuesday, December 1, 2009

Sun xVM VirtualBox v. 3.1.0 has been released

Sun xVM VirtualBox v. 3.1.0 has been released. This is a major update which introduces some brand-new great features such as (change log excerpt):
  • Teleportation (aka live migration); migrate a live VM session from one host to another (see the manual for more information)
  • VM states can now be restored from arbitrary snapshots instead of only the last one, and new snapshots can be taken from other snapshots as well ("branched snapshots"; see the manual for more information)
  • 2D video acceleration for Windows guests; use the host video hardware for overlay stretching and color conversion (see the manual for more information)
  • More flexible storage attachments: CD/DVD drives can be attached to an arbitrary IDE controller, and there can be more than one such drive (the manual for more information)
  • The network attachment type can be changed while a VM is running
  • Complete rewrite of experimental USB support for OpenSolaris hosts making use of the latest USB enhancements in Solaris Nevada 124 and higher
  • Significant performance improvements for PAE and AMD64 guests (VT-x and AMD-V only; normal (non-nested) paging)
  • Experimental support for EFI (Extensible Firmware Interface; see the manual for more information)
  • Support for paravirtualized network adapters (virtio-net; see the manual for more information)

As far as it concerns myself, teleportation is the feature I was looking forward. Great job, guys.

Read the changelog.
Download Sun xVM VirtualBox now.


Tuesday, November 17, 2009

Sun xVM VirtualBox 3.0.12 has been released

On November, 17th, Sun has announced the release of Sun xVM VirtualBox 3.0.12. The changelog for this release is the following:
  • VMM: reduced IO-APIC overhead for 32 bits Windows NT/2000/XP/2003 guests; requires 64 bits support (VT-x only; bug #4392)
  • VMM: fixed double timer interrupt delivery on old Linux kernels using IO-APIC (caused guest time to run at double speed; bug #3135)
  • VMM: reinitialize VT-x and AMD-V after host suspend or hibernate; some BIOSes forget this (Windows hosts only; bug #5421)
  • VMM: fix loading of saved state when RAM preallocation is enabled
  • BIOS: ignore unknown shutdown codes instead of causing a guru meditation (bug #5389)
  • GUI: never start a VM on a single click into the selector window (bug #2676)
  • Serial: reduce the probability of lost bytes if the host end is connected to a raw file
  • VMDK: fix handling of split image variants and fix a 3.0.10 regression (bug #5355)
  • VRDP: fixed occasional VRDP server crash
  • Network: even if the virtual network cable was disconnected, some guests were able to send / receive packets (E1000; bug #5366)
  • Network: even if the virtual network cable was disconnected,
    the PCNet card received some spurious packets which might confuse the
    guest (bug #4496)
  • Shared folders: fixed changing case of file names (bug #2520)
  • Windows Additions: fix crash in seamless mode (contributed by Huihong Luo)
  • Linux Additions: fix writing to files opened in O_APPEND mode (bug #3805)
  • Solaris Additions: fix regression in guest additions driver
    which among other things caused lost guest property updates and
    periodic error messages being written to the system log

If you want to update or if you want to give VirtualBox a test drive, download it now.

Thursday, October 29, 2009

Sun xVM VirtualBox 3.0.10 has been released

Today, October 29th, Sun released a minor update for its flagship desktop virtualization solution, xVM VirtualBox. The changelog of VirtualBox 3.0.10 is the following:
  • VMM: guest SMP stability fixes
  • VMM: fixed guru meditation with nested paging and SMP guests (bug #5222)
  • VMM: changed VT-x/AMD-V usage to detect other active
    hypervisors; necessary for e.g. Windows 7 XP compatibility mode
    (Windows & Mac OS X hosts only; bug #4239)
  • VMM: guru meditation during SCO OpenServer installation and reboot (VT-x only; bug #5164)
  • VMM: fixed accessed bit handling in certain cases (bug #5248)
  • VMM: fixed VPID flushing (VT-x only)
  • VMM: fixed broken nested paging for 64 bits guests on 32 bits hosts (AMD-V only; bug #5285)
  • VMM: fixed loading of old saved states/snapshots (bug #3984)
  • Mac OS X hosts: fixed memory leaks (bug #5084)
  • Mac OS X hosts (Snow Leopard): fixed redraw problem in a dual screen setup (bug #4942)
  • Windows hosts: installer updates for Windows 7
  • Solaris hosts: out of memory handled incorrectly (bug #5241)
  • Solaris hosts: the previous fix for #5077 broke the DVD host support on Solaris 10 (VBox 3.0.8 regression)
  • Linux hosts: fixed module compilation against Linux 2.6.32rc4 and later
  • Guest Additions: fixed possible guest OS kernel memory exhaustion
  • Guest Additions: fixed stability issues with SMP guests
  • Windows Additions: fixed color depth issue with low resolution hosts, netbooks, etc. (bug #4935)
  • Windows Additions: fixed NO_MORE_FILES error when saving to shared folders (bug #4106)
  • Windows Additions: fixed subdirectory creation on shared folders (bug #4299)
  • Linux Additions: sendfile() returned -EOVERFLOW when executed on a shared folder (bug #2921)
  • Linux Additions: fixed incorrect disk usage value (non-Windows hosts only)
  • Linux installer: register the module sources at DKMS even if the package provides proper modules for the current running kernel
  • 3D support: removed invalid OpenGL assertion (bug #5158)
  • Network: fixed the Am79C973 PCNet emulation for QNX (and probably other) guests (bug #3206)
  • VMDK: fix handling of split image variants
  • VHD: do not delay updating the footer when expanding the image to prevent image inconsistency
  • USB: stability fix for some USB 2.0 devices
  • GUI: added a search index to the .chm help file
  • GUI/Windows hosts: fixed CapsLock handling on French keyboards (bug #2025)
  • Shared clipboard/X11 hosts: fixed a crash when clipboard initialisation failed (bug #4987)

If you want to give VirtualBox a try, you can go and download the package for your platform of choice.

Sunday, October 11, 2009

Sun xVM VirtualBox v. 3.0.8 has been released

On October, 6th 2009 Sun Microsystems announced the release of a minor update to its flagship desktop virtualization solution, Sun xVM VirtualBox v. 3.0.8. As usual, you can check the changelog out at this address.

  • VMM: fixed 64 bits guest on 32 bits host regression in 3.0.6 (VT-x only; bug #4947)
  • VMM: fixed a recompiler triple fault guru meditation (VT-x & AMD-V only; bug #5058)
  • VMM: fixed hang after guest state restore (AMD-V, 32 bits Windows guest and IO-APIC enabled only; bug #5059)
  • VMM: fixed paging issue with OS/2 guests
  • VMM: fixed guru meditation in rare cases (2.0 regression; software virtualization only)
  • VMM: fixed release assertion during state restore when using the Sound Blaster 16 emulation (bug #5042)
  • Security: fixed vulnerability that allowed to execute commands with root privileges
  • Linux hosts: fixed runtime assertion in semaphore implementation which was triggered under certain conditions (bug #616)
  • Linux hosts: change the default USB access mode on certain distributions (bugs #3394 and #4291)
  • Linux hosts: on hardened Gentoo, the VBoxSVC daemon crashed by opening the VM network settings (bug #3732)
  • Linux hosts, Solaris hosts: pass the XAUTHORITY variable along
    the DISPLAY variable when starting a VM from VBoxManage or from the VM
    selector (bug #5063)
  • Linux hosts: use sysfs to enumerate host drives if hal is not available
  • Solaris hosts: fixed a bug which would hang the host sporadically as interrupts were not re-enabled everytime
  • Solaris hosts: fixed a kernel panic with bridged and host-only networking (bug #4775)
  • Solaris hosts: fixed incorrectly persistent CD/DVD-ROMs when changing them (bug #5077)
  • X11-based hosts: support additional function keys on Sun keyboards (bug #4907)
  • Mac OS X hosts (Snow Leopard): fixed problem starting headless VMs without a graphical session (bug #5002)
  • Mac OS X hosts: fixed problem listing host-only adapter names with trailing garbage (attached VMs won't start)
  • Windows Additions: now work with Vista 64-bit Home editions (bug #3865)
  • Windows Additions: fixed screen corruption with ZoomText Magnifier
  • Windows Additions: fixed NPGetUniversalName failure (bug #4853)
  • Windows Additions: fixed Windows NT regression (bug #4946)
  • Windows Additions: fixed VBoxService not running if no Shared Folders are installed
  • Linux Additions: implemented ftrunctate (bug #4771)
  • VRDP: start VM even if configured VRDP port is in use
  • Networking: the PCnet network device stopped receiving under rare conditions (bug #4870)
  • VBoxManage: implemented controlvm vrdpport command
  • iSCSI: fixed issue with NetApp targets (#5072)
  • SCSI: add support for virtual disks larger than 2TB
  • USB: fixed potential crash when unplugging USB2 devices (bug #5089)
  • NAT: IPSEC did not properly work with Linux guests (bug #4801)

Wednesday, August 5, 2009

Sun xVM VirtualBox v. 3.0.4 has been released

On August 4, 2009, Sun Microsystems has released the last minor update to its desktop virtualization solution, xVM VirtualBox. Here's the changelog, as usual.

This is really a maintenance review and there's really nothing new under the Sun. I didn't hit any of the fixed bugs. If you did, it's time to upgrade.

Download Sun xVM VirtualBox.

Tuesday, July 7, 2009

Sun xVM VirtualBox 3.0.0 has been released

Oh yes, a brand new major version. Sun xVM VirtualBox v. 3.0.0 has just been released. Here's the changelog, as usual.

Great features has been introduced:
  • Guest SMP support. Oh yes: guest SMP support (up to 32 CPUs)!
  • Experimental Direct3D 8/9 support for Windows guests
  • OpenGL 2.0 support for Solaris, Linux and Windows guest.
The feature I was interested in was guest SMP support. I admit I'm not running critical tasks here in my laptop but I do have some use cases that would greatly benefit from it: I'm running Windows guests for .NET development using Visual Studio 2008 and yes, there, you can see the difference.

Configuration is just as easy as this:


So download it and enjoy!

Tuesday, June 16, 2009

mplayer: Error opening/initializing the selected video_out (-vo) device

That was indeed the error message that mplayer was presenting me:
Error opening/initializing the selected video_out (-vo) device
Now, I had not chose one. I even deleted my ~/.mplayer folder but nothing, it got stucked there. It's strange, because mplayer should have chosen automatically a video_out device on startup and I swear I never had this problem before on my Debian/testing.

In fact, I had just reinstalled a Debian/testing distribution on Sun xVM VirtualBox on a Solaris Express Community Edition host, because I'm using it as a platform for video transcoding. I'd like to do that on Solaris but I haven't found the time to recompile at least ffmpeg, if not mplayer and all of its dependencies. Blastwave's ffmpeg, indeed, is way too old and I found some bugs that prevented it doing its job. Until then, and thanks to VirtualBox, I'll use Debian/testing instead.

Now, the solution's pretty easy but I'd like to rely on autoprobing... Anyway:
enrico@debian:~$ gmplayer -vo help
MPlayer dev-SVN-r29241Available video output drivers:
xmga Matrox G200/G4x0/G550 overlay in X11 window (using /dev/mga_vid)
mga Matrox G200/G4x0/G550 overlay (/dev/mga_vid)
tdfxfb 3Dfx Banshee/Voodoo3/Voodoo5
s3fb S3 Virge over fbdev
xv X11/Xv
x11 X11 ( XImage/Shm )
xover General X11 driver for overlay capable video output drivers
gl X11 (OpenGL)
gl2 X11 (OpenGL) - multiple textures version
dga DGA ( Direct Graphic Access V2.0 )
sdl SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)
ggi General Graphics Interface (GGI) output
fbdev Framebuffer Device
fbdev2 Framebuffer Device
svga SVGAlib
aa AAlib
caca libcaca
dxr3 DXR3/H+ video out
v4l2 V4L2 MPEG Video Decoder Output
directfb Direct Framebuffer Device
dfbmga DirectFB / Matrox G200/G400/G450/G550
xvidix X11 (VIDIX)
cvidix console VIDIX
null Null video output
xvmc XVideo Motion Compensation
mpegpes MPEG-PES to DVB card
yuv4mpeg yuv4mpeg output for mjpegtools
png PNG file
jpeg JPEG file
gif89a animated GIF output
tga Targa output
pnm PPM/PGM/PGMYUV file
md5sum md5sum of each frame
If you're using gmplayer or another mplayer front-end you can probably access some video preferences menu, such as the following, and set your preference there. It will be remembered the next time you launch mplayer.
In my case I'm using VirtualBox 3D Acceleration so I chose gl:
mplayer -vo gl [my-movie]
By the way: KDE 4.2 just got its way into Debian/testing, but I'll tell you another day. Amazing experience! I wish I could use it on Solaris as well.