WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: VirtualBox: Making it Run!  (Read 32948 times)

Offline MrBojangles

  • Newbie
  • *
  • Posts: 7
VirtualBox: Making it Run!
« on: June 02, 2009, 01:13:14 AM »
So, one of my goals as of lately is to build my own (albeit ghetto) Client Side Hypervisor. That is, what I'm really looking for is to be able to have a distribution of Linux that is  really small as to not use a whole lot of computer resources which will allow for my Virtual Machines to have a lot of resources to consume.

What I know about VirtualBox (when it's running properly) that it has great support for USB Filtering, it's easy to establish a network connection, and it supports a lot of formats. It also exposes ACPI battery information to a guest OS (with the Guest Additions installed in the Guest) which makes it ideal for laptops.

With that said, I downloaded the .run file from the virtualbox.org website. Out of the box, it's first issue is missing GNU Make and Kernel Headers. I was able to get the necessary packages. During the execution of the .run file, it creates the kernel module and netfit kernel module. It mentions errors about ln, but that's just links, right? Of course, it also mentions that it cannot reconize the linux distribution and that it's tossing vboxdrv information into /etc/init.d/

Here's where the fun starts,

When I go over to /etc/init.d/vboxdrv and send the start argument, the first error is "(Cannot change owner vboxusers for device /dev/vboxdrv/). So, I ran the commands and made the vboxusers group. I then ran the command again and apparently it starts, by saying '...done'. If I use the status argument from vboxdrv, it says the modules are loaded. However, when I started vboxdrv (both with the fail error and with the success) it mentions "Starting Virtualbox kernel modulesleep: invalid number '.2'", but as mentioned, both kernel modules claim to start, so I don't know what this really means.

Now, according to VirtualBox.org User Manual:

Quote
You will need to install the following packages on your Linux system before starting the installation (some systems will do this for you automatically when you install VirtualBox):

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

Note
To be precise, these packages are only required if you want to run the VirtualBox graphical user interfaces. In particular, VirtualBox, our main graphical user interface, requires both Qt and SDL; VBoxSDL, our simplified GUI, requires only SDL. By contrast, if you only want to run the headless VRDP server that comes with VirtualBox, neither Qt nor SDL are required.

So I looked through the package manger and found what it was asking for, then I installed it. I also installed Xlib because, somewhere in this mess, it was mentioned. So I installed it.

Now, when I run VirtualBox (which is the GUI as it states above) Xlib gives the error: 'extension "Generic Event Extension" missing on display ":0.0". I also get a pop up window (which is the first sign of some sort of external GUI actually trying to work) saying "Failed to create the VirtualBox COM object. The application will now terminate." If I click on the Details arrow, I get: "Callee RC NS_ERROR_ABORT (0x800004004), and that's that.

Now, it's possible I can get this working over VBoxHeadless (which starts the Virtual Machine as a process which can be accessed through VirtualBox's special implementation of Remote Desktop Connection they call VRDP (V I would assume means Virtual). However, I haven't tried this so I'll have to confirm at a later time.

In any case, that's where I'm at as far as getting the actually GUI and Hypervisor to start. Ideally, I'd like to write some sort of simple interface for booting into a menu for someone to start a Virtual Machine (or if there's only 1 machine, have it boot full screen). Essentially, I'd like to make this slim on the OS side but user friendly would be nice. I'd like to give something like this to technical amatures so that I can assist them into the benefits of Virtualization without the huge learning curve.

The major issue (as I can tell) is the pop up error mentioned above, but then again, I don't know. Any help, input, ideas?! Definitely appreciated.

In any case, great project. I love how slim and easy to use Tiny Core is, but until I can tailor it to my desires, it's obviously not a perfect fit for me. Looking forward to whatever help I can get!

Thanks!

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14788
Re: VirtualBox: Making it Run!
« Reply #1 on: June 02, 2009, 01:26:14 AM »

Offline MrBojangles

  • Newbie
  • *
  • Posts: 7
Re: VirtualBox: Making it Run!
« Reply #2 on: June 02, 2009, 02:04:49 PM »
I've ran down whatever dependency lists I could find that relate to this. I downloaded what I could. Seems that the biggest problem is these COM extensions as I'm unable to even create a virtual machine through the command line. Whatever the issue is, it stems further then just pulling up a GUI for me to work in.

Any thoughts towards these missing COM objects?

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: VirtualBox: Making it Run!
« Reply #3 on: June 02, 2009, 02:58:13 PM »
Quote
* Qt 4.3.0 or higher;
Did you use qt-4.2.2 from the repository?

Offline MrBojangles

  • Newbie
  • *
  • Posts: 7
Re: VirtualBox: Making it Run!
« Reply #4 on: June 02, 2009, 09:47:49 PM »
Well what do you know, 4.2.2, for some reason I thought the 4 was a 3 and... *sigh*, I thought I was over the requirement. I guess I started to go crosseyed over this eventually....

How can I build said requirements?
« Last Edit: June 02, 2009, 09:50:51 PM by MrBojangles »

Offline MrBojangles

  • Newbie
  • *
  • Posts: 7
Re: VirtualBox: Making it Run!
« Reply #5 on: June 03, 2009, 12:31:07 PM »
Well, I decided to install 1.x instead of 2.x (since 2 is all release candiates, you would think I would start with something stable... -_-) anyway, I was able to make VirtualBox (latest) compile and install. I downloaded Minefield simply because I was too lazy to write the full path to the VirtualBox.run file with wget, so I just used the point-and-click method.

With libQT3 support, compiletc, SDL, linux headers, and XLib I was able to install VirtualBox. You need to manually start the VirtualBox kernel which unless you make a 'vboxusers' group manually, it will fail. If you do that, it should start the Kernel, then typing 'VirtualBox' should work.

After running through all of that, I guess the best summary is my problem is solved. =]

Offline dWLkR

  • Newbie
  • *
  • Posts: 27
Re: VirtualBox: Making it Run!
« Reply #6 on: June 30, 2009, 10:09:01 AM »
miiiiister booooojangels - miiiiiister booooooooojangels!!!!!

hi!

THANK YOU!
pls keep on working on this!
because it is really nice!

i was looking for sth. like this for a looooooong time! :D

i.e.: http://forum.tinycorelinux.net/index.php?topic=966.0

fyi: if you do not totally hate windows pls check: www.sanbarrow.com - page of the user "continuum" a mastermind concerning windows and vmware based topics...

pls keep us updated!

Offline MrBojangles

  • Newbie
  • *
  • Posts: 7
Re: VirtualBox: Making it Run!
« Reply #7 on: June 30, 2009, 10:39:24 AM »
Thanks, dWLkR.

This project has been sort of put on hold for me, but it's resurfacing (thus, my visit back to the forums).

I see a lot of power in using VirtualBox as Virtualization software. A lot of people sit here and say that VirtualBox is Type 2, but under the right conditions (such as having a really light OS like TCL as the Bare-metal portion, essentially a Dom0, what makes it so different?) Aside from that, the world is waiting for things such as Xen Client, who knows when that will actually show up. Xen documentation to me, in general, is confusing as hell  ???)

But there is a downside....

Here is a few problems I'm having in hopes that people who are way better at using Linux, or atleast TCL, can help me with. Most of them are part of TCL and either don't come pre-packaged that I don't know how to use or may not be supported.

1. Personal problem, I'd like the xwindow system to start using 1440x900 widescreen resolution. I've been using a Dell Inspirion 9400 for testing and cannot get widescreen. I started secondary xwindows and I know how to manipulate the resolutions, but 1440x900 seems to be off limits. Help?

2. VirtualBox complains about not having USB Support. In other words, I simply can't get the USB Filter to work without additional tweaks. This will be elaborated on a bit more once I get the old project computer powered back on. It's been a while, the information isn't fresh in my head.

3. I might have fixed this (again, it will go with getting the old project computer back on), but there was an issue with VirtualBox Audio support, drivers perhaps. - I installed OSS Audio and when activated (which as of right now, needs to be done on start up), the Audio extensions for VirtualBox works fine! I'm listening to music on projectplaylist.com and it sounds fine! (EDITED)

4. Can someone help me get vboxdrv to start during TCL's startup procedures. I think I left off looking for the boot script, but couldn't find it =/

5. ACPI. I think. Basically, even when running TCL without the power cord, I do not see a battery meter or a way to know how much power is left. A fix for this would be nice. Anyway, it stretches a bit further. VirtualBox has the ability to pass Battery and power management information from the Host to the Guest. On Ubuntu, I can clearly see a Windows XP guest report a battery meter the same as Ubuntu would. Clearly this is to help manage power and give someone running a Virtual Machine in fullscreen mode clear thoughts of power. I'd like to fix it, I just don't know how.

6. VirtualBox has a RAM limitation. I'll have to play with this more, but it is conscious of how much total RAM there is vs. the amount it thinks you should be able to use in a Virtual Machine. My example is that I have 512 RAM in this laptop (which I purchased a 2Gig upgrade for and am waiting on delivery). Of that 512, I was unable to surpass 400 MB of RAM allocation. I forget the EXACT number. I guess one question is roughly how much RAM does TCL use out of box? The Linux Memory commands always seem to report higher than actual use. Someone mind throwing me a way to find out EXACTLY how much RAM the system is using BEFORE VirtualBox allocates VM RAM? (Thanks) - It's possible it might have been 400 + VRAM which I overlooked back then. I'll revisit this and get more information. In a perfect world, if I have 512 and TCL has 10 MB being used, I'd like to be able to allocate 500 MB! - VirtualBox will NOT let you save your settings if the amount of allocated memory is more than 75% of system memory. I don't know if this is just the main GUI or if there is a way around it

7. I'll check on this once again, but I don't think I'm not able to run VirtualBox after a restart without running the .run file and reinstalling it again. If that's the case, this is obviously a huge problem. (EDITED)

Overall, I have it functioning. Number 7 is really the only huge problem. Number 1 is just a problem for widescreen users. 2,3,4,5 is definitely just minor tweaks to improve overall functionality. 6, if I'm right (Which I hope I made a mistake in my previous testing) would be unfortunate. I'd imagine something like that could be overcome with a tweak a recompile, though I personally like letting Sun do the expert work and just worry about using it.

FUTURE PROJECTIONS: At one point in time, if I could get all of this working, I'd like to make some sort of custom interface that's tailered more towards using VirtualBox in a Bare-Metal Hypervisor like mode. For example, have the computer boot directly into the VM if only one VM is present. Otherwise, have it boot to a screen that's designed like the Windows Vista login screen where you have a giant Icon representing a VM and pressing it will boot the VM in full screen mode. I'd like some sort of key combination to swap VM's under this condition, haven't a clue on how to get started, but Numbers 1-7 need to be resolved first anyway.

In short, I see a lot of advantages to this, and so does dWLkR. For anyone who doesn't, please tell me the concerns you have about running VirtualBox as I'd like to either see the light or compel you to join my side and help me get this working. =]

THANKS!

Items (EDITED) above
« Last Edit: June 30, 2009, 04:40:59 PM by MrBojangles »

Offline MrBojangles

  • Newbie
  • *
  • Posts: 7
Re: VirtualBox: Making it Run!
« Reply #8 on: June 30, 2009, 05:08:04 PM »
In reference to #6, which I've verified as having a limit of 75% of system memory (which my 512 MB computer is reporting 494 MB total - I suppose that's what is left after TCL's consumption) that VirtualBox GUI does not let you exceed this number. If you use the VBoxManage CLI function:

Quote
VBoxManage modifyvm VM-NAME --memory #

Where VM-NAME is your VM's name (use quotes if it includes spaces) or that ID number (GUUID, I think) and # is the amount of memory, in MB you want to change it to, you can surpass this limit. Your GUI won't like it, but it can't stop you.

However, running WinXP Pro with 494 (as mentioned above as max) and even with 480 causes it to ABORT the VM while it's running. Obviously they are right in wanting to limit you, but surpassing 75% can't be that bad, can it??

I'm still playing with numbers, but there is a GUI limit and you CAN surpass it.

Seems to like to crash with even 470 as the number of RAM... not sure why. 400 works fine which is 30 MB over the 370 limit based on 75%....
« Last Edit: June 30, 2009, 05:20:03 PM by MrBojangles »

Offline grabur

  • Newbie
  • *
  • Posts: 4
Re: VirtualBox: Making it Run!
« Reply #9 on: July 02, 2009, 03:53:25 PM »
You can remaster tinycore, and while it normall wouldn't be recommended...

Copy out the tinycore image.

Chroot into in:

Take the tces of the components you need for vbox, and just untar them into /usr/local

Try installing vbox - you might need to mount some devices to the chroot env, though I'm pretty dumb when it comes to this, so someone else might be able to help.

You might want to symlink log directories.

Then zip up tinycore, and merge back into the iso - or wherever you put it.

A startup script should be trivial.

I like the idea of this also. How about vmware's esxi instead? Not that I've used that.

Bypassing vbox's gui sounds quite a good idea. But if you do use it like that to host servers, you'd probably be better off with openvz, bsd or solaris or something else.

[^thehatsrule^: whitespace edit]
« Last Edit: July 03, 2009, 04:54:00 AM by ^thehatsrule^ »

Offline dWLkR

  • Newbie
  • *
  • Posts: 27
Re: VirtualBox: Making it Run!
« Reply #10 on: October 13, 2009, 04:38:44 AM »
any news? :)

Offline tclfan

  • Sr. Member
  • ****
  • Posts: 286
Re: VirtualBox: Making it Run!
« Reply #11 on: October 13, 2009, 03:50:59 PM »
As I am reading these posts much later now, as I must have missed them before, this is a very interesting project and I was myself thinking of idea to using TinyCore as base OS for a VM Hypervisor, but making this work was way beyond my Linux knowledge to attempt. An option would be ESXi, but in principle TinyCore should be smaller, so leaving more memory to VMs and running in memory performance should be excellent!
I am curious now if this got accomplished...

Offline dondamiano

  • Newbie
  • *
  • Posts: 5
Re: VirtualBox: Making it Run!
« Reply #12 on: February 26, 2010, 08:16:00 PM »
Hello everyone,
first post here ! Trying to wake up this thread.
I was trying to have VirtualBox working on TinyCore when I found this topic via Google.
It's basically exactly what I'm looking for : a minimal OS acting like a pseudo bare-metal hypevisor using Virtualbox.
I don't know what is the problem, but it just doesn't work for me.
I'm trying to install VirtualBox 3.1.4 in TinyCore 2.8.1.

The User Manual says it needs  :
Qt 4.4.0 or higher;
SDL 1.2.7 or higher (this graphics library is typically called libsdl orsimilar).

Now, which packages needs to be installed on TC to have everything working ?
make, gcc, linux headers are needed to run the "VirtualBox.run" script.
I tried to install qt 4.5 (base and qt3support), make, gcc, linux headers, coreutils, libQT3, compiletc, XLibs_support, SDL and SDL_dev, python, python_dev, Xorg-7.4.

As I understand it, that's should be enough to make it run.
I can compile the script.
When I run this, I've got :
/etc/init.d/vboxdrv start
modprobe: not supported
Starting Virtualbox kernel module...done.

Checking with /etc/init.d/vboxdrv status returns the same "modprobe: not supported" and confirm that every module is loaded.

Then, in one term I run
/opt/VirtualBox/VBoxSVC
In another one, I run :
VirtualBox
and then I have a Xlib error: 'extension "Generic Event Extension" missing on display ":0.0".
and also a pop up saying that it "Failed to create the VirtualBox COM object. The application will now terminate." Details "Callee RC NS_ERROR_ABORT (0x800004004).

Am I missing something obvious or can it be the software version I use (too recent) ?!

Please, give me a hand on this one, I'm stuck on it for three days...

Cheers

dondamiano

Offline Kingdomcome

  • Sr. Member
  • ****
  • Posts: 286
Re: VirtualBox: Making it Run!
« Reply #13 on: February 26, 2010, 11:41:06 PM »
The fix for that particular error is creating the proper user and group and change ownership of the vbox devices.  But I will stop you here.  Ive spent a lot of time trying to get VBox to run on TC and have determined that TC not being able to handle exceptions keeps a VM from booting.  There is a fix coming in TC v2.9, so lets hope we can get VBox running soon.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14788
Re: VirtualBox: Making it Run!
« Reply #14 on: February 27, 2010, 12:38:18 AM »
The fix is in rc5, maybe you could try it out for us  :)