Running From Within VirtualBox (At Last!)

Started by Donald Darden, January 20, 2008, 10:02:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Donald Darden

Greetings to you all.

Here I am, running IE from within Windows 2000 Pro, which is a guest OS now installed in a VM provided by VirtualBox.OSE on top of Ubuntu 7.10 (Gutsy Gibbon).  This has been a moment I've struggled to achieve for quite awhile now, and it is good to be here at last.

Some of you may say, "Hey, installing and running Virtualbox on top of Linux is a no brainer".  Not according to my experience.  Perhaps it is what you already know, or what avenue you chance upon as you search out how to do it, but I found it to be a long and frustrating road to get to this point.

Rather than tell you all the things that went wrong, let me tell you what finally worked for me.  First, I selected a distribution that supposedly should support VirtualBox with the idea of just downloading and installing one of the available binaries.  But I must have done something wrong or missed a crutial step or two.  As it turns out, with Ubuntu 7.10, you can use the Add/Remove Programs under Applications and select All, then search for virtualbox, and install it that way.  Then you have to reboot your system to get it to start properly.  Then you have to use App.ications/System Tools/Innotec VirtualBox to bring up the application.  Then you have to use New to create a new VM, then settings to define what OS and devices to allow to the new VM.

Next you have to use Start to initiate the new VM, and this is where I had one problem:  It needs a boot image of the new OS to boot from, but I could not get it to boot from my DVD drive, even with passthru enabled, so I ended up installing K3b CD and DVD Disk Burning tool with the Add/Remove applications, then used it to co;y my Windows 2000 install disk image to an .ISO file on my machine, then redesignated the CDROM drive under Settings on my VM to use that in place of the CDROM drive.  Then I was able to boot up Windows 2000 and install it. 

Now at some point, you also have to go to Devices on the VM menu and select Install Guest Additions, and make sure that gets done, so that you will have a better experience with your video, audio, keyboard, and mouse.  Otherwise, you will likely be locked to a screen resolution of either 640x480 or 800x600 and only 16 colors.

You probably need to set your VM screen resolution to slightly less than your host screen resolution, otherwise you will not be able to access the toolbars at either top or bottom of the guest OS.

If you have problems getting the Virtualbox software working, there are a number of useful posts on the internet.  This one I found to be greatly helpful:  I went through all the steps, and this finally give me a working version of Virtualbox.  Had I gotten the rest right the first time, I might have been able to avoid this effort, but it ssuceeded when all else failed.  You may not be told specifically that a reboot is required, but there is a little icon that appears on upper toolbar on the right side that is suppose to tell you that a reboot is necessary.

Incidently, once you enable the network in Windows 2000 (or XP), you can go to and get all the updates from Microsoft that you need for your guest OS.

Donald Darden

Here's another link that describes how another user got VirtualBox to install on his version of Ubuntu.  Somewhat different method, but it looks simpler and may serve for you.

Note my present concern now is to figure out how to get my guest OS and host to network with each other.  If I can do that, I should be able to access my printer and folders and files on my PC from within my guest environment.  That issue may be resolved here:

Donald Darden

I haven't gotten the networking thing figured out yet, but I did manage to get access to the partitions, folders and files on my PC from my virtual machine guest OS, which is Windows 2000.  To do this, I used the VM Devices selection to pick Shared Folders, then used the top icon on the right to add a new machine folder, then browsed to the /media folder and selected the Linux representation for my C: drive (which is sda1) and selected that.  For a name, I just called it Drive C.  I did the same thing for each partition that I wanted to have access to.  The next step under Windows 2000 is to go to My Network Places and select Add Network Place.  Using Browse, you can then go to the VirtualBox Shared Folders and click on that, which expands to show the lables you created for the partitions to be shared.  After that, they show up under My Network Places.

You also have the option in the guest Windows OS to go to Tools under My Network Places and map your shared network drives to a drive letter of your choice, in which case it will also show up under My Computer.  This would simplify the use of and changes to any path statements under Windows.  Of course a problem is that the VM process assumes that the install of Windows 2000 is to the C: drive, which is actually a folder set up for that purpose, and that means that software on the actual C: drive, which normally has that as the path, would have to be modified before it could be accessed via the VM version of Windows.  In other words, it would be challenging to try to have any software installed under the normal Windows run under the VM installed Windows instead.

Donald Darden

I am using Virtualbox 1.5.4, which is the most current version.  Unfortunately, I am not sure whether there is any USB support with this version.  The problem is, that although the web site says this is a full featured prebuilt version of Virtualbox, the user manual says I should see a place to specify my USB devices in the virtual machine state (VM), but I don't see that as an option when I get into the VM.  And I have the distinct feeling that I'm actually using virtualbox.ose, which is the open source edition of virtualbox, not the commercial version.  And though I see where some people claimed to have gotten the commercial version, I can't find where they could have gotten it from.  And the instructions for downloading and building the source code are incomplete - you are suppose to run ./configure and source, but neither are available.  My suspicion is that some instructions relate to how things were once, but are no longer current.  Anyway, it makes matters a bit complicated and hard to sort out.  Or it may be that the USB support is only available in certain builds, such as with a windows host or in the 64bit version.  It's really hard to tell.

Donald Darden

I'm still using Windows 2000 in VM mode, and once you go to full screen mode, you have no impression of it running on top of a VM environment.  But if you update or install new software that requires a reboot, the only reboot is in the VM environment, which is fast and smooth.

If you try to run PB/CC or PB/Win from your original drive, you will have some problems.  First, you do not have a regular drive letter reference to that drive, and even if you map the networked partition to a drive letter, it probably is not the same letter as used normally.  Second, if you tried to access and use CCEdit or PBEdit from the original drive, it could not load the profile properly, so any opened source files likely appear to be black-on-black.  So you either change paths and set up a new profile (select defaults in Editor), or you do the smart thing and just copy your PB/CC and PB/Win folders from the networked drive to the new C: drive that comes as part of your environment.  Don't forget any support folders and files, such as possibly \Win32API or \PBDX.

The good news is that I have successfully used PB/DOS, PB/CC, and PB/Win under Windows 2000 in the VM environment once I copied them over, and no significant problems.  I was afraid that my max of 1GB RAM would make this experience an awkward one, but everything is running very nicely.  Of course I do not have a fully loaded Windows install here, but a PC with more RAM would likely serve quite well.

I'm very pleased with what I've achieved here.  I don't have support for USB devices right now, which includes my printer, but that is a known bug with Virtualbox 1.5.4, and I expect that to be fixed in time.  Nor can I yet network between my host and guest yet, which has also been reported as a bug, but by sharing partitions via the shared folders method, I have a ready means of getting information back and forth.

There are some unexpected aspects of running a VM, such as the ability to work in more than one environment at once, or having several boot processes with different enablements (one Windows install can access native partitions; another is not allowed to), and (this could be a bug or feature, depending upon your viewpoint), your guest OS appears as your host OS externally.  That is, you may be running IE in your Windows VM and looking for Adobe Reader to download, but externally you appear to be a Linux distribution, and the Adobe web site will attempt to download a RPM package to you instead of a suitable Windows version.  It could also be confusing to boobytrapped web sites that are intent on infecting your PC.

Donald Darden

I was intent on getting Adobe Reader onto my Windows VM, but efforts to acquire it from the internet with IE within the VM and with FireFox on the host both kept me limited to accessing the RPM package - not what I need to install and run it under Windows.

I then tried acquiring it with Opera on my Ubuntu host, and this time my effort to select Windows 2000 SP4 worked.  So I downloaded it to a folder that I created called Download under my user file system.  I then set up Virtualbox again and under Settings/Shared Folders/Machine Folders I added the Download folder by browsing for it (top right icon).  Or you can add it if already in the VM by using Devices/Shared Folders and doing the same thing.

Then with Windows 2000 Running, I had the option to go to My Computer, and under Tools/Map Network Drive, I could allow that Download folder under my Ubuntu account to be access with a drive letter.  Or I could just access the shared folder via My Network Places.  Now when I tried to install Adobe Reader directly from the Download folder, I got an unspecified file error.  But when I drug the install file from the folder to the Windows desktop and ran it from there, I encountered no problems with getting Adobe Reader installed.

Donald Darden

I;ve two installs of Windows 2000 Pro now set up under VM on my PC, and am in the process of setting up Windows XP as well.  I usually avoid XP because of the registration and activation process, but lately I've sort of inherited some defective PCs with their authentication labels, and I was able to reuse the tag id from one of them to activate this install.  I've suggested to people before that if they can get their hands on junked PCs, that they would benefit from recovering the activation codes, and I guess this proves the point.  You have to activate almost as soon as you install and begin trying to get the Windows Updates.  I imagine you can find defunct PCs at flea markets and other places - I got these just because I decided that the cost of repair was too highm and advised the owner to buy a refurbished PC with much better performance and storage capacity.  But software does not wear out, and old licenses are as good as new ones, if you can still get your hands on an install disk. 

Donald Darden

And now I am logged in here using IE7 from my Windows XP install into a VirtualBox VM on top of Ubuntu 7.10.  It took me most of the night, because I had to go through countless Windows Updates and Reboots.  At least the reboots were much faster than doing the same thing outside the VM.  I'm not exactly sure why, though a part of the reason might be that I have very little software installed under Windows XP at this point.  But it is rather incredible that working with Windows in a VM can rival the experience of Windows outside the VM so much.  Believe me, VM is the way to go, rather than messing with WINE or other DOS or Windows emulation.

You understand that many people like VMs because they create an isolated environment on their PC that renders their PC impervious to certain risks.  That's fine, and I feel that can be an advantage as well, but I want the option to work with whatever I have on my PC if the mood strikes me, without having to reboot unnecessarily or to keep making copies from one place to another, and to then have to figure how to keep everything in sync.  VirtualBox is not perfect yet, but it has enough bits and pieces in place to really bridge between two dissimular (or even two identical) operating systems - even more, in fact.  If I wanted, I could have multiple guest OSes all up and running at once, but with limited RAM and a need to keep rather large windows up for my poor eyes, that is not really very feasible for me personally.  But someone else could do it if they want.

And I would say that right now, for me, the issue of whether there will ever be a PowerBasic compiler for Linux has been rendered moot.  If I have to have a program that can access the web, or access files on my PC, I can write and run it under Windows, and share among my installed systems by one means or another.  No need to write code specific to Linux, or master Linux's equivalent to the Windows APIs, or anything like that.  The VM world is really an answer for the questions that have plagued me in this area.  I really count it as time well spent, to have come this far and have realized so much.

Charles Pegge

Well done Donald! You have demonstrated great stamina and your efforts have paid off at last. There is obviously a huge need for clear friendly documentation for these emerging technologies. That takes time and may be it is not as exciting for the developers as breaking new ground. There is of course the commercial motive of not spilling the beans too soon and making life easy for the competition, as many of the key components in a Linux distribution are donations from the big corporates like Sun Microsystems.

Similarly in the Graphics domain, the information needed to put together a high quality project is quite fragmented, while the commercial sector with video games worth billions of dollars, jealosly guards its intellectual assets.

Kent Sarikaya

The little I tinkered with VM stuff, I am very much impressed with what they can do.
I haven't used VirtualBox, but any help for linux is very confusing to me that I have seen.
So to figure all this out, much applauds as Charles said!

Donald Darden

Well. I've run into a few more bumps.  First, in order to continue to work with Ubuntu and have access to Windows as well, I also had to sove a knotty problem about my email.  I did not want to pull my email in Ubuntu and cause a split in my email flow, so I have used webmail access through my provider, but it is not near as handy or easy to use as my regular email client.  So I wanted to fix that.

I use IncrediMail, not because it is the best email client, but because most of my family uses it - they love the customizing features involved.  Some time back, I studied how IncrediMail was set up, which is mostly through the Registry, and it relies heavily on GIUD tags, even for user accounts and folders.  I found I could modify the Registry so that I could install IncrediMail on each of my partitions under different versions of Windows, but have them all reference the same user folders.  That way I can boot to any partition, log into my email account, and always see the same address book and emails.  I can also receive email at any time, and it all ends up in the same common archive.

So I set out today to figure out how to install IncrediMail under my virtual machine Windows, then map the Registry to point to the same archive.  This time instead of manually modifying the Registry, I just searched out the necessary entries and exported each to a separate file (this is under my normal Windows of course), then import them again under the Registry for each VM.  It went well, and I now have recourse to my regular email via my VM installs.

But I ran into a problem with the XP Pro install.  It turns out that the Shared Folders do not automatically appear in My Network Place under XP as happened under Windows 2000 Pro.  I did some research on that, and all I can really find is that some people have used the command line instruction of NET USE with a drive letter and colon, followed by a networked path referencd to the desired folder to be shared.  I tried that, but with no success.  So I reported it as a bug.

I consider it crutial that a user have access to email, folders and files, and peripherals in order for a given PC environment to be viable.  You can work around peripheral limitations by saving and recovering files, but email is something I would want to be able to check fairly often, though some might be able to ignore it for some time.  So right now I feel that Windows 2000 Pro on top of Virtualbox is more viable than Windows XP is, becazuse without being able to share access to my partitions/folders/files with XP and Ubumtu, I also cannot get access to my email archive under XP.  So again, a work in progress.

Another thing I can easily dislike about Windows XP is IE7.  I let Microsoft upgrade me from IE6 during the mass effort to catch up on patches, and now I can see why people dislike it.  It's not terribly slow, but I find it constantly annoying to have it tell me that pages either have secure and unsecure info on them, and having to click a button to move on.  I don't see any easy way to turn this off.  Of course I can (and will) just install FireFox to deal with that problem.

I got another warning that USB support is missing at one point when working with the XP install, and yet I noted that a bug report that USB is not working in VirtualBox on Ubuntu was not confirmed, but marked unsubstantiated or something.  These bug reports are getting responses - I've already had several replies to mine, and I also note that they show a list of proglems that have already been fixed.  I also read that the Ubuntu community is pushing their distrubution development harder than almost any other.  I guess the exception might be Red Hat, with its commercial product, and possibly Fedora, which is the open source equavelent to Red Hat.

This tends to suggest that by sticking with something mainstream like Ubuntu, you are more likely to see rapid process and quicker resolutions to problems.  If you pick a maverick distribution, you may find yourself on the thin and ragged edge, unable to get help from anyone.  You might also have to consider your client, who would be happier with something hear the mainstream because he doesn't want to get stuck either.

And incidently, I did come on another link that details how to get Virtualbox working in Ubuntu 7.10.  Here it is: 

Donald Darden

I'm going to make another attempt to install VirtualBox, this time on Ubuntu 8.04.  Right now several packages are not installing on this version of Ubuntu, and I've contributed my share of bug reports.  But I want to see if a different method of installing VirtualBox is any more successful.  Perhaps I can find a way to get the missing USB support and get my guest XP to recognize the shared folders.  I also want to see if a second install of Virtualbox on a different partition can inherit the VMs I set up on the first partition or not.  Then, depending upon how sucessful I am with all this, I may take a fling at installing OpenVZ and see how well that works out.

Donald Darden

They say that practice makes perfect.  In my case, practice sometimes means progress.  I tried building VirtualBox for my Ubuntu 8.04 install, but I was already having problems with updates, and my efforts took a dark turn when the install became unstable and failed to reboot.  I decided that Ubuntu 8.04 was not my best choice, so I reinstalled 7.10 on this partition today, then did all the available updates.

I put some posts out there about my problems, and one reply was that the Ubuntu build of VirtualBox lacks USB support.  That did not please me, and I;m not sure if that is actually correct or not, but it seems to match up with my experience thus far.  I also got some hints about trying to build VirtualBox, and about the VirtualBox download page.  And I found a new link to guide me:
Following the instructions here, I got the commercial version of VirtualBox and had no problem installing it.  The commercial version is free for personal use, you just have to agree to the terms of the license that pops up when you start it.

I haven't set anything up with it yet, but I wanted to help others by letting them know of what I'm achieved thus far.

Okay, I;m making progress here.  I found a bug report that apparently explains the problem with usb support when VirtualBox is installed on Ubuntu.  It also gives a simple fix.  It does not mention that you need to reboot for the change to be made effective, but that is all it takes.  I've tried it with the VirtualBox (commercial version) I just installed.  Tomorrow I will see if the same fix works for virtualbox-ose, which I have on the first partition of this drive.  Note that the necessary statements are already in the file, but commented out.  Just remove the # which is the comment identifier on each line.

What I am attempting to do right now is see if I can copy all files in the .VirtualBox/VDI folder on my first partition over to the same folder on my second.  If it works, I will not have to install and update each install of my Windows VMs.  I first set up the same VMs as found on my first partition, using the same names and all that.  But there may be some differences between VirtualBox-ose and VirtualBox that will blight this attempt.  I'm just waiting for the copy to complete to see if it works or not.  It will save hours of installing Windows, doing updates, and doing reboots if it succeeds.

Donald Darden

Right now, at this very moment, I no longer have any VMs working on my PC.  What happened?  Well, that is a long story, but it all began with having to make major changes to the partitions on my hard drive, and that means doing many things over from scratch.

Along the way, I learned that VirtualBox is now up to version 1.5.6, so I moved up to that, then had some issues that I thought were due to the new release, so I tried to revert to 1.5.4, only to learn that the Ubuntu install was at fault somehow.  So I had to reinstall that and work back to the same point again.

Right now I have two NTFS partitions, three FAT32 partitions, three EXT3 partitions, three installs of Windows 2K Pro, three installs of Ubuntu 7.10, one install of VirtualBox on top of Windows, and three installs of Virtualbox on top of Ubuntu.  But no VMs created yet.  Everything is still a work in progress.  But it is progress.

Most people simply inherit Windows as their default operating system.  They buy or get a PC, and it comes with Windows.  Back when Windows XP and Me were the newest OSes out there and both showing stability problems, people were writing posts on the internet detailing their many problems,  And then some person would put up a post saying something like:  "Well, my Dell came with XP installed, and I've never had any problems with it".  Right.  Dell had its experts work on the OS until it worked exactly the way they wanted, then used that image on all their PCs so that the end user has a nice experience.  But this person is too ignorant (or dumb) to realize this, and just thinks that everybody else must be pretty stupid if they are having this much difficulty with something he finds so easy to use.

The point I am trying to make is that most users of Windows have never had the pain to getting Windows to work right.  The most they have done is add some new applications and set up their email account.  So they think Windows is easy.
But when it crashes, and they are forced to attempt a restore, or take other steps, they suddenly find themselves in over their head.  Suddenly they are on the other side of the fence.

The difference between the Windows experience and the Linux experience begins with the fact that for most people, Linux is not a given.  You have to acquire it and install it from scratch.  You are suddenly confronted with all the things that the experts have to resolve, only you have to do it pretty much on your own with the help of whatever guides you can find via the Internet.  And if you are going to install Windows as well as some version of Linux, that means a lot of expertise is going to be required that the average Windows user will never be exposed to otherwise.  So it is easy to feel overwhelmed at the get-go.

A part of that picture is likely to change in the future.  For instance, what if your host OS comes equipped with VM software already configured to run other OSes on top of it?  Or what if your host OS is tailored just to be a host for other OSes?  And what if you could simply acquire guest OSes that are preconfigured to do anything that you want them to?  VMWare's VMPlayer is designed to just "play" back the virtual OSes that other people develop, and there are those that create and exchange these guest OSes to fit custom needs.  If any one VM environment begins to dominate the market, there will be real opportunity for people to create, exdhange, acquire, buy and sell virtual OS configurations with suites of applications installed, that will run on any PC set up with the right host OS or VM Manager.

There will likely be efforts to block widespread use of VMs, because it is a real threat to proprietary software.  VM causes OS and applications to become secondary nodes on the machines where VM is installed, and subject to distribution without the benefit of licenses.  As single licensed copy of Vista or Office 2007 could end up on thousands of VMs, and the Mac OS could end up running willy-nilly on many PCs with no benefit to Apple.  But to the user, VM will become the next generation host OS.

VM also has the potential to play well with multicore PCs, because instead of one OS or application demanding most of the computing power, there will be processing to distribute among the many threads handled by the host OS and  powered by the core processors.  There is often talk about the need for new applications (most commonly mentioned are games) to take advantage of the multiple cores becoming available, but this matter can also be addressed by a more core-aware OS as well, and VM would be a prime candidate to take advantage of these.

I speak of VM as a stand-alone host, which today it is not.  The focus has been on adding VM support to existing OSes, and they are getting pretty proficient at doing this.  But significant gains are possible if the host is optimized from the kernel out for this role.  I anticipate that this is a possible course for at least some of the ongoing development efforts out there.

Donald Darden

Ho Hum.  My day with reinstalling and configuring Windows 2K and Office 2K onto a VM under VirtualBox has gone well and without incident.  The reinstall of Ubuntu 7.10 and VirtualBox 1.5.6 was straightforward, and I've had no problems with either.  Of course I had to make certain changes, such as enabling usb support for VirtualBox, and setting up mplayer for FireFox again, but those tasks have been described in some detail previously on other threads.  By directing the Audio to Alsa in VirtualBox, I can even listen to video newsclips through my headset when playing them through IE on Windows running on VirtualBox, which is running on Ubuntu.  Incidently, the video playback is smooth and you can't really see any performance penalty.

Where matters stand now is that I need to install and configure some more applications, most specifically an email client, which will have to be IncrediMail for compatibity with existing email accounts elsewhere on my PC.  And I will also install some protection software as well, for blocking virises and such.  And that is just on this one VM install.  I have the ability create multiple installs, which actually can be copies of this one,  In fact, with two other installs of Ubuntu and VirtualBoxcan migrate this same image over to them as well,  And with one install of VirtualBox on top of Windows, I can eventually see if I can run Windows on top of Windows via VirtualBox using the same image.  So building up this one VM image might end up going a long way, and cut out a lot of work with installs and updates of Windows with all the associated applications.

So what I used to do between multiple PCs by creating a universal image, can be scaled to happen multiple times within the same PC.  This is not normally possible, because Windows demands a system volume, to which there is an associated drive letter, usually the C: drive.  Restoring a typical Windows image to a different drive will fail, because it will get a different drive letter, which will adversely effect all path statements.  But VM gives you a virtual C: drive for your system volume, and no matter what real partition you restore it to, it will have that virtual C: drive intact and require no path changes.