Using Compiz on Fedora 12 as Linux Guest in VirtualBox

December 9, 2009

To enable Compiz fusion on any Linux Guest (including Fedora 12) in VirtualBox is easy since VirtualBox supports 3D acceleration.

The following procedure is to install and enable Compiz on Fedora 12 as Linux guest in VirtualBox. This procedure might work on other distribution of Linux. This procedure is not for Fedora 12 installed in Microsoft Virtual PC or VMWare.

Installing and Enabling Compiz on Fedora 12 in VirtualBox

VirtualBox Setup

  • In the virtual machine setting for Fedora 12, make sure that you set the display RAM at the maximum of 128MB and checked “Enable 3D Acceleration”

Install VirtualBox Linux Guest Additions

  • Before installing guest additions, you need to install gcc, kernel headers and dkms.
    • #yum install gcc kernel-devel dkms
  • Next, you need to mount the Guest Additions ISO and proceed to the main folder. Run the appropriate guest addition base on your guest OS and architecture such as:
    • #./VBoxLinuxAdditions-x86.run
  • or
    • #./VBoxLinuxAdditions-amd64.run
  • After installation proceed to restart the virtual machine since kernel has been modified.

Install Compiz Fusion

  • The command to install Compiz fusion is as follows:
    • #yum install emerald-themes compiz-fusion-extras emerald compiz-fusion compiz-manager compiz-fusion-extras-gnome gnome-compiz-manager libcompizconfig compiz-fusion-gnome ccsm

Configuring Compiz

You can change the settings using CompizConfig Settings Manager (ccsm) under System >> Preference. However, due to some bug, the changes in ccsm will not affect the system. To rectify this problem you need to change the script file for Compiz in /usr/bin/compiz-gtk

Once you open this file, change the following line from:

  • exec compiz –ignore-desktop-hints glib gconf gnomecompat $@

to:

  • exec compiz –ignore-desktop-hints glib gconf gnomecompat ccp $@

Enabling, Configuring and Using Compiz

  • You enabled Compiz by select System >> Preference >> Desktop Effect. Choose Compiz.
  • You can change the effects using System >> Preference >> CompizConfig Settings Manager
  • To rotate the Window Cube, press Ctrl+Alt and simultaneously use your mouse to rotate the window.

***


Using VirtualBox (VBox) with Linux

October 6, 2009

Installing VBox with Linux Host

Installing VBox in Linux host requires the following:

  • Qt 4.3.0 or higher;
  • SDL 1.2.7 or higher (this graphics library is typically called libsdl or similar).

As VBox uses a special kernel module to manage hardware resources, it is recommend to install DKMS:

For Fedora: #yum install dkms

For Ubuntu: $sudo apt-get install dkms

Installing VirtualBox Using YUM

  1. You can now use yum to install VirtualBox.
  2. First you need to download the repository file for yum located at http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
  3. Then you need to copy the repo file to yum depository folder #cp virtualbox.repo /etc/yum.repos.d/
  4. Make sure dkms is installed as mentioned above
  5. Proceed with the command #yum install VirtualBox
  6. Reboot the PC since kernel file has been modified

Installing Linux as Guest

Installation of Linux is quite easy as long as you stick to the default hardware. Although VirtualBox emulate multiple kind of hardware, some hardware emulation requires additional drivers.

Once the OS is installed, you need to install Linux guest additions for additional functionality such as sharing folders.

To install Linux guest addition, you’ll need GNU compiler, Linux kernel header and a couple of essential software in kernel development. In Fedora, you need to perform yum install as follows:

#yum install gcc kernel-devel

For Ubuntu users, most essential kernel development software has been installed.

Before proceed with guest installation you need to install DKMS

For Fedora: #yum install dkms

For Ubuntu: $sudo apt-get install dkms

Next, you need to mount the CD ISO and proceed to the main folder. Run the appropriate guest addition base on your guest OS and architecture such as:

#./VBoxLinuxAdditions-x86.run or

#./VBoxLinuxAdditions-amd64.run

After installation of guest additions, you can move your mouse freely between guest and host OS. You can expand your screen size by resizing the virtual OS windows.

Sharing Folder with Host System

To share network folders, you need to configure a share folder with a share name in the virtual machine settings.

Then in Linux, you need to mount the share folder using VirtualBox file system:

#mount –t vboxfs name_of_share_folder /mnt/mount_point

please note that the above mounted folder is owned by root.

To allow user to own the files and folder use the command:

#mount -t vboxsf -o uid=1000,gid=1000 name_of_share_folder /mnt/mount_point

If you want to have it mount automatically upon each boot, put the mount command in /etc/rc.local. Using /etc/fstab has little effect, because that  file is processed before the SF module is loaded and will fail to mount the share.

End


Software Virtualization

October 5, 2009

Software virtualization has become popular lately. To solve some of the compatibility issue in Windows 7, Microsoft has incorporated a virtualized Windows XP in Windows 7.

For general user, one the advantages of using software virtualization is, it allows user to run very old application. For example, if you have an application that runs only on DOS, what you need to do is to install DOS on the virtualization software and install the application in the virtual DOS operating system.

As a general user, you can also test other operating system by installing them in the virtualization software. It is now very common for general user to run Windows with virtual Linux. It is more common for Mac users to run Windows operating system in their virtualization software since a lot of applications only runs in Windows operating system. However, you need to purchase additional Windows operating system license.

It is particularly useful for corporate environment, especially in a complex system environment with a mix of UNIX, Linux and Windows. For example, if an application only runs in UNIX, desktop user can install UNIX in their Windows operating system and run the particular application in the virtualized UNIX. Furthermore, virtual operating system can be managed from a virtual server, hence reduce cost in maintaining multiple operating systems. I believe that virtual software market will continue to grow to become an essential part of enterprise architecture. Virtualization software is particularly useful for IT profession in system testing and software development in multiple platform.

There is lots of virtualization software in the market. VM Ware is popular in the corporate environment. For home user, Microsoft Virtual PC is popular with Windows user. Sun’s VirtualBox is available in multiple platforms. Linux users install Xen or VirtualBox.

Microsoft Virtual PC was late in the game in the virtual market; it works well running Windows XP or any earlier version of Microsoft operating system. However, it does not perform well running Linux and it does not provide any integration between host and client OS. Sun’s VirtualBox is the better alternative. Available in multiple platforms, hardware emulation performs better if you install the guest additions.

I have tested a few of the virtualization software mainly VM Ware, Microsoft Virtual PC and Sun’s VirtualBox. For overall usability, I prefer VM Ware and VirtualBox. Please note that you need to purchase the software for VM Ware, and VirtualBox is free for home user.

End.


Running Linux on Sun Virtual Box

October 2, 2009
  • Basically there is no problem running Linux guest in Windows Host using Virtual Box.
  • Besides, Virtual Box also supports vhd used by Microsoft.
  • However, the cloning of hard disk is not straight forward; because each hard disk is assign a UUID. You cannot just do a file copy, instead you need to use its utility tool called “VBoxManage” Use the following command:

C:Program FilesSunVirtualBoxVBoxManage.exe clonehd “Hard Disk 1”.vdi “Hard Disk 2”.vdi

Conclusion:

Although it is not very important but all Linux distribution recognize the emulate sound chip in Virtual Box.

As far as free virtual software is concern, I would prefer Virtual Box from Sun.