• Welcome to Jose's Read Only Forum 2023.
 

Installing VirtualBox on Ubuntu 7.10

Started by Donald Darden, January 26, 2008, 08:41:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Donald Darden

There are two versions of VirtualBox:  The commercial version, which is available for personal use free of charge, and the virtualbox-ose version, which is an open source edition, and slightly behind the development of the commercial version.  At this point, the commercial version supports USB in the VM environments created, and the OSE version does not.  However, due to a bug in the Ubuntu build, the USB support for the virtual mode is turned off.  It takes an extra step to turn it on.

I've tried to cut down on some of the things I did to get VirtualBox installed, trying to simplify the process.  In doing so, I found one single post really explains it best.  Because of its importance, I am going to quote the essential part verbatum here.

Note that you can download and install VirtualBox from the www.virtualbox.net download page.  However, at least the build for Ubuntu 7.10 is based on the virtualbox-ose source.  I was advised to get the one listed on the bottom for all distributions instead.  This comes as a .run file, meaning you just add ./ in front of it and execute it, but the version of virtualbox it installed did not start on my machine.  When I tried to start it from within a terminal, a number of problems with dependencies came up.  This led me to continued search that found the link mentioned in the paragraph before this one.  When I used those instructions, I noted that the version I had just installed was being removed as an old version.  So pay attention to what follows, and hopefully you will have an easier time of it.

The web site with the best guidance is http://www.ubuntugeek.com/create-and-manage-virtual-machines-using-virtualbox.html

This is the first half of the article and instructions:
===============================================================
VirtualBox is a general-purpose full virtualizer for x86 hardware. Targeted at server, desktop and embedded use, it is now the only professional-quality virtualization solution that is also Open Source Software.

Install Virtualbox in Ubuntu Gutsy

If you want to install Virtualbox in Ubuntu Dapper,Edgy,Feisty,Gutsy you need to download the latest .deb package from here if you are using Ubuntu dapper you need to download the appropriate package from this link.In this example i am showing how to install virtualbox in Ubuntu edgy.
Preparing Your system

First you need to install the following packages

sudo apt-get install libxalan110 libxerces27

wget http://www.virtualbox.org/download/1.5.4/virtualbox_1.5.4-27034_Ubuntu_gutsy_i386.deb

Once you download the package you have virtualbox_1.5.4-27034_Ubuntu_gutsy_i386.deb file

Install.deb file using the following command

sudo dpkg -i virtualbox_1.5.4-27034_Ubuntu_gutsy_i386.deb

At the time of installation if you have any dependency problems like the following errors

Selecting previously deselected package virtualbox.
(Reading database ... 174459 files and directories currently installed.)
Unpacking virtualbox (from virtualbox_1.5.4-27034_Ubuntu_gutsy_i386.deb) ...
dpkg: dependency problems prevent configuration of virtualbox:
virtualbox depends on libxalan110; however:
Package libxalan110 is not installed.
virtualbox depends on libxerces27; however:
Package libxerces27 is not installed.
dpkg: error processing virtualbox (–install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
virtualbox

If you see the above error message you can use the following command to install all the required dependencies

sudo apt-get -f install

This will complete the installation
===============================================================
Before you can start VirtualBox, you have to add yourself to the correct group.  You do this with the commandL

sudo adduser [username] vboxusers

Now at this point, you should be able to start VirtualBox and confirm that it works.  But because of the bug in Ubuntu, you will not have resource to USB under Settings when creating a new VM.  To fix this, you need to edit the following file, as reported in this link: http://www.virtualbox.org/ticket/747

/sudo gedit etc/init.d/mountdevsubfs:

The following lines should already exist in the file, but are likely commented out with a leading pound (#) symbol.  You can remove the pound, and this will activate these lines on the next reboot.  Leave the first three lines commented (just as they are).

    #
    # Magic to make /proc/bus/usb work
    #
    #mkdir -p /dev/bus/usb/.usbfs
    #domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
    #ln -s .usbfs/devices /dev/bus/usb/devices
    #mount --rbind /dev/bus/usb /proc/bus/usb
 
The result should look like this:

    #
    # Magic to make /proc/bus/usb work
    #
    mkdir -p /dev/bus/usb/.usbfs
    domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
    ln -s .usbfs/devices /dev/bus/usb/devices
    mount --rbind /dev/bus/usb /proc/bus/usb
 
Now you can save the changes and quit the editor.  You will need to reboot your system for the changes to take place.

When you first start VirtualBox (you can type it in a terminal window, or find it added automatically under Applications.System Tools on the Desktop), You pick New to begin a new VM.  You pick a name for it, and tell the VirtualBox what type of system you intend to install there.  This will be important later when you attempt to apply GuestAdditions, which will make your VM perform better.  Then you use Settings to define the external aspects permitted to the VM, such as a virtual hard drive, a real or imaged CDROM drive, and so on.  You also allocate RAM and the size of the virtual hard drive.  Then when you use Start for that VM, the system will check for a bootable image (the CDROM image or viirtual hard drive), and attempt to start your

In your VM, you can only have one CDROM image (or real CD) mounted at a time.  It is important to leave this undisturbed until your VM OS is installed.  Once you have done this, you can use the GuestAdditions ISO image and mount and select it, then use the Devices, mount a CDROM, then use a CD or an image with the Guest Additions on it.  You can search for VirtualBox Guest Additions and get it as a download off the internet.

You have to install a guest OS before you can get into the VM.  After it is installed, you can make changes.  If you want to access partitions, folders, or files on your PC from within the VM, you can add these as Shared Folders under Settings.  A partition is signified by just using the root directory for that drive.  Once into your Windows OS, you can perform all updates from Microsoft, install new software, and in order to access the Shared Folders, you can get to them via the My Network Places icon, or under My Computer, use the option to Map Network Drive and give it a drive letter, so that it appears to be a local drive.  However, you will likely have a problem with the assigned drive letters not matching up with the original drive letters, which will usually mean that applications installed under Windows will not run as-is under the virtual OS.  If any such applications are installed on the original C: drive, they can be copied to the virtual CL drive created as part of the VM, but even then some will not run, unless all folder dependencies are resolved and any Registry settings needed are exported out of the original Registry and imported into the virtual OS Registry.  In most cases, the better course is just to reinstall such applications under the Virtual OS, after which it might be possible to share files and folders under both the original and virtual environments.

By default, the clipboard is bydirectional between the host and the guest system.  The virtual system is able to access the Network via the same internet connection as the host system.  The use of the mouse and keyboard depends upon where the focus is.  Normally, the mouse and keyboard will be "captured" once you click on something within the range of the guest, but you can release it to do other things by pressing the Host key on the keyboard (by default, the right Control (Ctrl) key). You can close the VM Manager window and keep the VM Guest window openm then open it again when you need it.  To close the guest VM window, you are effectively shutting down or suspending the vm machine, but the host and PC remain running.





Donald Darden

On the partition where you install VirtualBox on Ubuntu, it will be located at /home/[username]/.VirtualBox, and the different VM drive images will be stored in the /home/[username]/.VirtualBox.VDI folder.  If you have to refer to either of these from a different partion, you will likely have to use this as a path:  /media/[sdb1]/home.[username]/,VirtualBox and /media/[sdb1]/home/[username]/.VirtualBox/VDI.

Note that the drive name and user name as shown in square brackets are just indications of where you will have to use the appropriate drive letter and user name as they appear on your PC.  If you copy the contents from one VDI folder to one on another drive, be aware that these are massive virtual drive files, and it will take a good long time to copy them.

Why copy them?  Well, in my case, I configured virtualbox-ose on one partition, and VirtualBox commerical version on another, and I decided that it would be neat if I could just duplicate the VMs that I created on one partition to the other and run them without reinstalling them.  There was one small holdup:  When I tried it,
VirtualBox still wanted a boot image for my first start.  So I gave it one, but then I elected not to boot from the CD, and it proceeded to boot from the copied VDI drive instead.  It gave me errors initially, because the random network name was different, but Windows resolved that during the boot.  I just had to click on OK or Continue as necessary to get past the warnings.

The other thing I had to deal with was setting up my shared folders and giving them drive letters after the boot was complete into the VM.  As I explained earlier, I figured out how to get IncrediMail to store all email accounts on my E: drive, regardless of which partition I am running IncrediMail from, so everytime I boot up from a different OS, if I can run IncrediMail, I can get to the same emails in the same repository, and have access to the same address book.  Each email userid still has a separate email account, of course. but they all reside on the E: Drive.  So under my Shared Folders, I just map my EL drive to a network E; drive, and my email accounts are automatically synced.

One problem I am experiencing is that the copied XP virtual drive shows the same problem under VirtualBox as I had under virtualbox-ose:  That is, it cannot see the shared folders set up under VirtualBox.  I am going to have to install XP from scratch under VirtualBox to confirm whether that is a problem common to both versions of VirtualBox, or just something that transpired when I installed it on virtualbox-ose.

Right now I consider my efforts with VirtualBox to be a success.  I did look for OpenVZ to see what could be done with it, but found little said, and had the impression that you would have to build it out on your own.  I decided that VirtualBox does not leave me much to desire, and that I would do better to stick with it.

Donald Darden

Okay, I installed Windows XP Pro in a VM on top of VirtualBox, which I installed on top of Ubuntu 7.10,  This did not fix the problem with not being able to access the Shared Folders.  I suspect that this is somehow related to the way XP handles networking - with Windows 2000 Pro, the shared folders show up and can be accessed with no problems.

I guess I will be looking for some answers tomorrow.  My first fiew attempts to research this just came up with the idea that a service might need to be installed and started in order for the Shared Folders to show up under XP.  This is something new to me, and I need to know more about what is involved here.  Without Shared Folders, there is no prospect of access partitions, folders, or files on the rest of the PC.

Donald Darden

I finally got the Shared Folders working under my guest Windows XP Pro system.  Not having tried all the options involved, I cannot definitively say that all this is necessary, but it is what I did, and it workds.

The first tip I found was to turn on IIS in Windows XP Pro.  It seems it is not installed in this version by default.  You can go under Start/Settings/Control Panel/Add/Remove Programs, then in the left pane select Add/Remove Windows Components.  I ended up adding all the missing services, but that might not be necessary.

The next critical thing is to use the GuestAdditions.ISO image and set it up on the Virtual CDROM drive, and run GuestAdditions.exe under your guest OS.  This will enable better keyboard, mouse, and video services, and it is also essential for accessing the Shared Folders.

The third thing, which happened in my case, is to avoid using Shared Folder names that have spaces or other questionable characters in it.  I had my Shared partitions named Drive C, Drive D, Drive E, and so on, and set these as my shared folder names.  My Windows 2000 Pro had no problem with this, but my Windows XP Pro choked on it.  I finally had to type the names in manually, as the browse method would not select them properly.  I ended up with \\vboxsvr\Drive C mounted as my networked F: drive, and my \\vboxsvr\Drive E mounted as my networked E: drive.  My C: drive is the virtual drive that I identified when I created the VM, and my D: drive is the virtual CDROM drive.  I would suggest you name your shared folders something like Drive_C, or C_Drive, or just use the device name, like sda1.

Donald Darden

There have been several updates at the www.virtualbox.org website.  First, a new version of VirtualBox is out, 1.5.6, and it proved to take only a few minutes to download and install.  A real improvement.  The second news is that Virtualbox has been acquired by Sun Microsystems, and it is hard to say what that will mean for it going forward.  But for a lot of visionaries, the future of personal computing could well be tied up somehow with VM and bringing together a disparity of software applications in new ways, while at the same time securing our machines ever more effectively from external probes and attacks.

I also noted in the news lately that VMWare's Workstation was found to have a security vulnerability, which I am sure that won't go without a fix.  But anyone that argues that a product that costs more is therefore less at risk simply fails to understand that software is always vulnerable by its very nature.  You can beat any combination lock if you know the combination, and you can safely cross any minefield if you have an accurate map of where the mines are.  Programs are a reflection of events, processes, and responses, and though it is difficult to take a program and unravel its content, it is possible to do so.

Donald Darden

#5
In downloaded and installed VirtualBox 1.5.6 last night, and immediately had two problems.  The first was that you still have USB support for the guest OS disabled by default.  That is fixable with a little bit of editiing.  Here are some links that basically explain what needs to be done:

http://www.arsgeek.com/?p=2776
http://www.ubuntu1501.com/2007/12/installing-virtualbox-with-usb-support.html
https://help.ubuntu.com/community/VirtualBox

The third link above is a really nice writeup on installing and configuring VirtualBox on Ubuntu, and even for setting up your first guest OS.   I highly recommend it for anyone that wants a blow-by-blow description that uses lots of images and just a few choice words.

With version 1.5.6, they seem to have tightened the rules about setting up your virtual C: partiton.  I ran into problems where it kept telling me that the drive was already registered or already exists.  I guess they decided to try and prevent people from accidently creating multiple guest OSes with the same virtual partition.  I was forced to use the Existing selection for a drive, delete the existing drive, then use the Add as though to add an existing drive, switch to viewing all files, delete all files in the Machine and VDI folders, delete all subordinate folders, delete the Machine and VDI folders, Cancel to get out of that area, Cancel again to get out of the Existing dialog altogether, then use New to establish a new virtual partition, and overwrite the name it wanted to use for the file with the one I wanted instead (Win2K).  THEN I was able to create my VM instance.

Installing a new OS into the VM instance was fairly straightforward.  As I did with version 1.5.4, I selected to enable a CDROM ISO image.  For this, I put my Windows 2000 Professional install disk in the CDROM drive, and when the icon popped up on the desktop (removable drives do not appear until they have media in them), I right clicked on the icon (I had to close the window that opened automatically first), chose Copy disk from my options, changed the Copy Disk to... option to File Image, then at the next stage I gave the folder and file name I wanted to use (the default is to use the disk volume name for the file name),  That took awhile, and it actually took about three times longer than the process bar indicated, so don't get impatient and think that the copy process is hung up.  Give it time to complete.

With VirtualBox, you can either use an actual CD Drive and CDs, or a virtual drive with ISO images.  It generally goes much faster with ISO images, and you can mount, unmount, and change which ISO image is apparently loaded at any time under the Devices heading when in the VM instance.  Under Devices, you also have the option to install the Guest Additions, which is something you can (and ought) to do after you get you VM OS installed.  But in my case, the Guest Additions feature did not work.  In searching for an answer as to why, I found that the Guest Additions is another ISO image that should get installed under /usr/share/virtualbox with the name VBoxGuestAdditions.iso  I also found that I had a CDROM image link to that file already configured.  I removed the link, then added it again, and presto! the Guest Additions option finally worked, adding a number of files to my guest OS that make it work much better.

It's interesting how much faster Windows installs and runs under VirtualBox than it does when used alone.  I can't account for that, but it is apparent, and has been commented on a couple of times.  I guess the isolation provided by the VM means that Windows has far less work to do in probing for new devices and installing or verifying drivers.  Even the use of Windows Update and Microsoft Update were considerably faster when it came to restarts and such.

Under version 1.5.4 of VirtualBox, I found it easy to duplicate one install of Windows for use under other instances by simply copying the virtual C: drive image.  Every install as to applications and updates gets duplicated to the new instance as well, so I really only had to create one complete install of Windows with its applications, and I could use that as a model for several others.  That might not be as easy under 1.5.6, with its emphasis on not allowing you to use a drive that already exists or is already registered, so that is something I will have to experiment with at a later point.  Right now I have a lot of apps to set up under this instance of Windows first.

Donald Darden

First impressions of VirtualBox 1.5.6 is that it is buggy.  Aside from the problem with establishing the virtual CL drive, I have twice rebooted and come back to find VirtualBox devoid of my previous work.  In fact, each time I have been asked to re-register it online.  The time spent creating my Win2K install not longer appears, and yet if I try to create it from scratch again, I am told it already exists.

I guess they will work out the bugs in time, but meanwhile I have decided to revert to version 1.5.4, which is still available for downloading here: http://www.virtualbox.org/wiki/Download_Old_Builds

If you decide to use the old download, you will have to expand the details section in the Package Manager so that you can indicate that you want to keep the current (old) version rather than accept the package manager's update (new version).

I was very pleased with version 1.5.4, so this is no hardship on me.  There was no significant issues that I was aware of at the time.  My previous posts related to installing and configuring VirtualBox still pretty much pertain to both versions, except that I did not have to hack my way to creating the virtual drive in version 1.5.4,

Donald Darden

#7
If you have not worried about multiusers and groups before, this is going to be a new topic for you.  In the Linux world, you can have different users with different rights, and one way to determine what rights are involved is to assign some of those rights to groups, then make certain users members of those groups.  In Windows, you would look in the Control Panel for User Accounts and make changes there.  In Ubuntu, You would use System/Administration/Users and Groups.  Then you would create or modify a user account, or select Manage Groups.  When Managing Groups, you see a list of the groups that are currently defined for your system.  If you installed VirtualBox, you should find it listed as well.  If it does not exist, you can use Add Group to create it.
By checking the Group Properties, you can see who is a member, and you can make change as well.  Each group also gets a unique ID number, and this is often used in place of the group name when specifying which groups have access to what.

Incidently, here is yet another link on changes to make when installing VirtualBox and enabling USB support.  It shows yet another way to achieve the same end goal.
http://www.arsgeek.com/?p=2776


Linux security is much better than found in most versions of Windows.  In several versions of Windows, you have different folder structures for different accounts  underthe  /Documents and Settings folder on your system drive (most often your C: drive.  You have an Administrator user, All Users user, Default User, and another user account for each person you name as a user on that system.  The problem is, you can easily access folders and files associated with other users in Windows, and its common for even novice users to be given administrative rights, which can be dangerous in the wrong hands.  Aside from that, every user potentially has access to all the applications that may be installed on that PC, because the /Program Files folder is held in common to all users, and that is where most applications are primarily intented to be installed.

Linux lets you be much more selective and restrictive, and there is more emphasis on each user having a unique configuration and computing experience.  I bring this up, because VirtualBox is going to use vboxusers to determine who can run the program.  And some instructions suggest adding another group called usbusers to define who can use usbfs (usb file system), or they may prefer to associate this with vboxusers.  You want your username in the right groups.  and finding out how to do this is part of the game.  You can also manage groups from the Terminal Console, and you may see instructions on doing it that way because the instructions can be rather terse with far fewer explanations of the steps taken.

Alright, I have to begin over with VirtualBox 1.5.4, and I will resume posting after I see what happens when I try to install Win2K on top of it again.

Donald Darden

Well, I have some bad news and some good news.  The bad news, is that I replaced VirtualBox with the previous version, and ran into the same problems.  Then I rebooted into each of the other two installs of Ubuntu and found VirtualBox, the new version, seems to be working fine there.  So there had to be something buggy in the install that I did on the first partition.  That meant reinstalling Ubuntu and building everything back up from scratch.  Now VirtualBox seems to be set up right on it as well, and I have the bare virtual drives that now need me to reinstall Win2K into them.  That is something I will attempt tomorrow.  But at least now I am not rebooting and finding VirtualBox reinitiating itself, and losing access to the created virtual drive.

So that is sort of good news, but it does point up a weakness in Ubuntu, which is if things go wrong, you pretty much have to start over from scratch and do it all again.  If you try to install Ubuntu on a partiton without formatting it, you will be prevented from doing so.

You can use multiple partitions for a single install, and manually configure them for different purposes.  For instance, you could have one partition set up as /home, and this would have all your user accounts and the data for each user.  You can also specify a /boot partition, and of course you have to specify a / for the root partition.  So technically, you can split up your install among several partitions in this manner, and then save the contents of the /home partition in order to keep it from being wiped out.  I've often seen a similar technique with older PCs, with the C: drive used for applications, the D: drive used for data files, and perhaps an E: drive used for archives.  Today, many people see their PCs come with the application and data on the C: drive, and a hidden D: drive that keeps an archive of the originally installed software to be used for restoring the PC to its original state.

And while most windows applications default to installing themselves on the system partiton (most often the C: drive), you often have the option to install it to a different drive and.or folder.  The general rule with Windows is that if it gives you flexibility about where to install the application, then that has to be supported with suitable entries in the Registry (although it is possible to steer one's way to an application via a software link instead).

Edwin Knoppert


Donald Darden

Could you elaborate on your question?  I don't know what VPC is, and I'm not sure what help you need.

Edwin Knoppert

You are using Virtual box, my previous complaint about screen resolution was due combination linux (several) and Microsoft Virtual PC.
Not that you need to solve that issue, i won't spend much more time into Linux (setting it up i mean) and i was hoping someone was willing to provide a VPC file with a linux distro having the mono project working.
So we could test if mono is indeed able to run on Windows compiled exe's as they claim.

It's just a question, personally i have had it + not willing to setup a PC with linux, just VPC should be nice.

VPC:
http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx

Mono:
http://www.mono-project.com/FAQ:_General

I often test using VPC like Vista and Windows 98, i don't work with Vista, only for testing purposes.

Donald Darden

Okay, I understand.  Note that VirtualBox is available to run on Linux, and several major distros have had it specifically configured for easy download and install.  In addition, versions are available for Windows, Macs and several other OSes.

There are three reasons I can think of to switch to VirtualBox at this point:  First, it is fast, notibly faster than some competitors.  Second, since it is available for so many OSes, one has the option to use the OS of choice as host, and the VM creations for VirtualBox will likely not be dependent on any given host OS to be able to work on a different PC,  Third, my own experience to date have been very positive with regard to VirtualBox, and I find it both  staightforward are relatively simple to install and use.  And of course now that I am writing up my own experiences with it, this might encourage and help others that want to venture and give it a try.

I guess there is something else worth mentioning as well.  VirtualBox is still in development, and has been acquired by Sun Microsystems.  So there is some expectation for its future.  Yet at present, the commercial version is free for personal use,  At the same time, there is an Open Source Edition that is within a few revisions of being on a par with the commercial version.  That is all to the good.  Now what positives can be stated about the Microsoft product?  As I understand it, it is no longer in development, nor is it supported.  It's just there if you want to use it.  In terms of features and capabilities, a comparison chart I saw did not place it very high.  I'm not trying to knock it, but I think those are points worth considering.