Wednesday Jan 06, 2010

Technology of the Year

Question: what do the following have in common?

  1. Intel Nehalem Processor 
  2. Microsoft Windows 7 
  3. Cisco's Unified Computing System (UCS)
  4. Amazon Web Services 
  5. Apple iPhone OS
  6. Sun VirtualBox

Answer: They were all winners of InfoWorld's 2010 Technology of the Year awards.

-FB 

Monday Jan 04, 2010

Speeding up your Linux Guests

With the clock ticking over to a new decade, now would seem to be a good time for a quick blog on timer interrupts in guests and how you can speed up your guests, while also lightening the load on your host, with the judicious use of a bit of guest configuration.

All operating systems make use of a system clock which ticks at a particular frequency. Common Linux distributions use kernels which drive the clock at 100Hz, 250Hz or 1000Hz. You can find out what your Linux kernel is configured for using this command:

grep CONFIG_HZ /boot/config-<kernel>

where kernel is the version of Linux you're running. The result of this command on my Oracle Enterprise Linux installation looks like this:

[root@localhost grub]# grep CONFIG_HZ /boot/config-2.6.18-164.el5
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000

...which tells me that my kernel is configured to use a 1000Hz clock tick.

In a virtualized environment this means that there will be lots of context switches as the host schedules the guest to deal with clock ticks which don't do very much.  And this will become most visible by seeing a relatively high host cpu usage even when the guest is idle. (Note that the exact behaviour also depends on the host system. For example, the same OEL vm runs comfortably on my Mac host, but my Windows host gets very busy running it.)

If you see an idle Linux guest which is configured for a 1000Hz clock using up lots of host cpu cycles, you may want to reduce the clock frequency using the boot time parameter "divider=10". You can do this by adding the parameter manually as the grub boot loader starts, or by editing the grub configuration file as follows:

  1. Edit /boot/grub/grub.conf
  2. Duplicate the existing Title section, and rename it (this means you can choose at boot time which config to use)
  3. Add the "divider=10" parameter as follows:
 kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup01/LogVol00 rhgb quiet divider=10

Here is what my complete grub.conf looks like now:

Grub.conf

This results in fewer context switches, a lighter host load (as measured by Window Task Manager) and faster guest execution. For example, the speed to boot my OEL vm (on a Windows 7 host) dropped from 115 seconds to 80 seconds which, according to my calculations, is a 30% increase in performance. Not bad for a simple bit of configuration ;-)

-FB 

Thursday Dec 24, 2009

Christmas VirtualBox Movies

The FatBloke loves movies at Christmas. So to add to the festive cheer, he has produced a couple of his own based on some of the new features of VirtualBox 3.1. This special, bumper Christmas double-bill features movies about Teleportation (is this how Santa gets about?) and Snapshots. You can watch in HD and full screen mode, but no 3D yet ;-)

Merry Christmas

-FB 

Thursday Dec 17, 2009

Solaris 10 10/09 Virtual Appliance

Some time ago we talked about virtual appliances as an easier way of distributing operating systems and even complete software stacks. 

Well, for the first time there is now a Solaris 10 10/09 (aka u8) ovf available.

Just:

  • Download the appliance
  • Unzip (if not done automatically for you)
  • Then in VirtualBox, choose the File...Import Appliance menu item
  • Navigate to the ovf file and import

And after clicking Import you will get a sys-unconfig'ed Solaris 10.

On first boot you do the config and hey presto, you have Solaris 10 running in a vm.

Solaris 10

For best results, don't forget to then install the VirtualBox Guest Additions by choosing Devices...Install Guest Additions from the VirtualBox menu.

-FB 

VirtualBox 3.1.2 released!

VirtualBox 3.1.2 has just been released.

It is a bug fix release and available to download from the Usual Places.

For a fuller list of fixes check out the ChangeLog

-FB 

Tuesday Dec 08, 2009

VirtualBox 3.1 released (last week)!

(A little late, I know but last week was kinda busy...)

Even though the version number only moved from 3.0 to 3.1, last week's VirtualBox release was a significant one with lots of very cool, but also very useful, new features:

Teleportation

Teleportation is Live Migration++. It is the ability to move currently running virtual machines across different physical machines with no interruption as you do it. And whereas with Live Migration/vMotion the virtualization platforms have to be near identical to work, teleportation is powerful enough to cope with:

  • different host operating systems, such as Windows to Linux
  • different classes of computer, such as server to laptop; and even
  • different CPU architectures, such as Intel to AMD (yes, the manual has a bug here) 

This means greater choice of platforms for customers, and interesting solution opportunities for our partners.

VirtualBox exposes the teleportation primitives via APIs which higher level logic can call to direct the teleportation process. For people looking to exercise these APIs you can use the VBoxManage command line tool, such as:

VBoxManage modifyvm <vm name> --teleporter on --teleporterport 1234 \\ 
  --teleporterpassword password --teleporteraddress <dns name/ip address>

VBoxManage controlvm <vm name> teleport --port 1234 \\
 --host <dns name/ip address> --password password

(I promise to do a dedicated posting on this real soon now.)

Snapshots 2.0 

Taking snapshots is a great way of saving the state of a virtual machine at various points in its lifecycle. Until this release, VirtualBox only allowed you to revert to the last snapshot state but with 3.1, the Snapshot feature in VirtualBox has been given an overhaul and you can now:

  • Take any number of snapshots of a vm;
  • Revert to any arbitrary snapshot state;
  • Take further snapshots from that point.

This means that you can create sophisticated multi-generational snapshot trees, ideal for testing your software on previous generations of operating systems or Service Packs for example. Or put another way, you can go backward or forward in time to exactly the state of the snapshot that interests you.

For example, here is a snapshot tree where we can revert to whichever Windows XP Service Pack and IE version we need to:

Performance Improvements

This time there are improvements in:

  • execution speed - paging optimizations which in our tests produced a 30% increase when compiling the Linux kernel;
  • network performance - newly introduced support for guests with VirtIO drivers;
  • display performance - new 2D video acceleration for Windows guests which uses the host video acceleration hardware.

Dynamic Network Configuration

Say you're using a Host-only network setup with a couple of vm's talking to each other, but then you need to do a Software Update of one of the vm's. This requires that you need Internet access. You can now switch to a networking mode, say NAT, on the fly without needing to close down the vm.

Multiple concurrent CD/DVDs

Storage handling changed in 3.1 with the most obvious benefit now being that you can have multiple CDs attached to a guest. This meant quite some changes in the GUI and command line.

Support for Parallels disks

For people defecting to VirtualBox but wanting to bring all their worldly goods with them, we now support Parallels .hdd virtual disk format files.

Solaris Host USB

Using a Solaris notebook or PC? Then we're now using the later Nevada (124+) build USB features.

EFI Firmware

Some operating systems (e.g. Fedora) are moving to using the Extensible Firmware Interface (EFI) in place of a more traditional BIOS firmware. VirtualBox 3.1 introduces experimental support for this.

These are just some of the headline features. You can get a fuller list from the ChangeLog, but all-in-all a pretty good crop of features and consistent with the mission to make VirtualBox the best hypervisor out there.

-FB 

Friday Nov 27, 2009

ACPI Shutdown and Windows 7 or Vista

A little something that had me scratching my head for a while and may save others some time....

When you try to close the window of a VirtualBox virtual machine session, a dialog pops up thus:

In the past, the "Send the Shutdown signal" has sent a Powerdown message which caused Windows XP vm's to gracefully shutdown.

But on Windows 7 vm's, the default Power Options when installed on a laptop are undefined:

So to get the previous behaviour you need to change the Power Options as follows:

Hope this saves someone some time.

-FB

Tuesday Nov 17, 2009

Sun VirtualBox 3.0.12 released!

In the spirit of, "Hey we fixed a bunch of bugs, why hold on to them?" VirtualBox 3.0.12 was released today.

You could read about the fixes or just go get the new version

-FB 

Friday Oct 30, 2009

Sun VirtualBox 3.0.10 released!

VirtualBox 3.0.10 just released!

Among other things this maintenance release:

  • fixes a memory leak on Mac hosts;
  • solves a few SMP issues; 
  • detects other active hypervisors (e.g. XP-mode); and
  • fixes a bug with Solaris host DVD support;
  • check the full list

It is available to download from the Usual Places .

-FB 

Tuesday Oct 06, 2009

Sun VirtualBox 3.0.8 released!

VirtualBox 3.0.8 was released today. This aims to increase stability and provides support for very large disks too.

The 3.0.8 maintenance release was made available to download from the Usual Places earlier today.

For a fuller list of fixes check out the ChangeLog

-FB 

Wednesday Sep 23, 2009

VirtualBox Virtual Disk formats

The hard-drive(s) of your virtual machines are simply files which are stored typically on the host's filesystem. On my Mac they're in 

~/Library/VirtualBox/HardDisks/

VirtualBox understands several disk formats including:

  • .vdi or "Virtual Disk Image", the native format for VirtualBox
  • .vmdk - VMware's format
  • .vhd - Microsoft's format

This means that if you have an existing hard drive from another virtualization platform, you can plug it into a VirtualBox vm by telling the system about it using the Virtual Media Manager...

Sun VirtualBox

Virtual Media Manager

 And then configuring it in the vm's Storage configuration dialog (or via the command line):

Android - Storage

Given that VirtualBox not only understands, but can also create, these different formats, one obvious question is "what is the difference?" or "which one is best?" 

One of the VirtualBox team (thanks Klaus) explained:

"The major difference is that VDI uses relatively large blocks (1MB) when growing an image, and thus has less overhead for block pointers etc. but isn't ultimately space efficient in the sense that if a single byte is non-zero in such a 1MB block the entire space is used.
VMDK in contrast uses 64K blocks, and thus has more management overhead and generally a bit less disk space consumption
What offsets this is that VDI is more efficient when it comes to snapshots."

So now you know!

- FB 

Thursday Sep 10, 2009

Sun VirtualBox 3.0.6 released!

VirtualBox marches on with the new version 3.0.6 maintenance release focused on performance and stability. If you use AMD, then this is Christmas morning ;-) And a few Snow Leopard wrinkles were ironed out too. 

Version 3.0.6 also has a few changes in support of the embryonic VirtualBox Web Console project. 

The 3.0.6 maintenance release was made available to download from the Usual Places earlier today.

For a fuller list of fixes check out the ChangeLog

-FB 

Friday Aug 14, 2009

Growing your Virtual Disks

When I create new Virtual Machines, or guests, in VirtualBox I tend to skimp a little on the size of the virtual hard disk I create because I'm trying to save on host disk space. And this tends to come back and bite me when the guest quickly fills the disk and I run out of disk space in the guest. So you think, "wait a minute, this hard disk is just a file, so why can't I make the file bigger?".

The problem here is that, yes, to the host system it is just a file, but to the guest it is a hard disk and they're not expected to suddenly grow. So if or when they do, you need to tell the guest OS about this, by modifying the partition table too.

So here are a few options that you can use to deal with lack of disk space in the guest:

1. Compact the disk

One option is to not grow the disk at all but reorganize the data on it. Achim told us "How to Compact your Virtual Disks" last month. Note that you don't need to mess around with disk partitions with this option. 

2. Create a new bigger disk 

You could simply create a new bigger disk and copy over the old data  but you still need to tell the guest that the new hard disk has bigger partitions. Here's a step by step guide to doing this.

3. Create a bigger disk to start with but with a smaller root partition

One of the VirtualBox team (thanks Frank!) gave me this tip to creating large virtual disks while controlling host disk space at the same time.

"Instead of creating a dynamically growing disk image with, for instance 20GB, the user should create a large disk image, say, 100GB, but he should only partition the first 20GB by the guest. (ed - you typically get the chance to do this during OS install). Doing so, the disk image will never occupy more than 20GB (plus some maintenance information) as long as the guest doesn't need more. Once the guest is short in disk space, simply increase the guest partition using some common tool, for instance boot the guest with a Ubuntu Jaunty LiveCD and use the Partition Manager to increase the guest partition to your needs (that application can handle NTFS partitions as well). "

4. Using a networked storage server.

If you are using VirtualBox's built-in iSCSI support to a networked storage server such as Sun's Storage 7000 systems, or maybe simply a Solaris server running as an iSCSI target with ZFS, then you can resize the disk easily using:

# zfs set volsize=10G poolname/volname

But you still need to repartition this disk, as you need to do in 2 and 3 above too.

Hope one of these works for you.

- FB 

Wednesday Aug 05, 2009

Sun VirtualBox 3.0.4 released!

The 3.0.4 maintenance release was made available to download from the UsualPlaces earlier today.

The myriad of fixes attempt to squash bugs in areas including SMP, 3D and NAT.

For a fuller list of fixes check out the ChangeLog.

- FB 

Friday Jul 10, 2009

Sun VirtualBox 3.0.2 released!

Just a quick note to say that the 3.0.2 maintenance release is now available to download from the Usual Places.

This release fixes a few problems with the 3.0.0 release including networking hangs, SMP performance and "Solaris-as-a-guest" issues. For a fuller list of fixes check out the ChangeLog.

- 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